" that is Can."/> " that is Can.">
search
HomeCMS TutorialDEDECMSHow to automatically add nofollow to the DEDECMS website construction column

How to automatically add nofollow to the DEDECMS website construction column

How to automatically add nofollow to the DEDECMS website construction column?

In website construction and optimization, the issue of column settings and weights has always been a pain point for SEOER. Now I will talk about how to make the backend of DreamWeaver CMS more intelligent. Add and modify the rel=nofollow attribute of the column!

Recommended learning: 梦Weavercms

The first step is to modify the catalog_add.htm and catalog_edit.htm in dede\templets, which is best It is modified using Dreamweaver.

Add code:

The code is as follows:

<tr>
<td width=“150” class=‘bline’ height=“26” style=“padding-left:10px;”>FOLLOW:</td>
<td class=‘bline’> <input type=‘text’ id=“follow” name=‘follow’ value=‘<?php echo $myrow[’follow‘]?>’ class=‘np’/> </td>
</tr>

How to automatically add nofollow to the DEDECMS website construction column

Step 2: Modify catalog_add.php and catalog_edit.php in dede\ , it is best to use Dreamweaver to modify it. 1. Catalog_add.php modification method: At about line 39, add , follow, ='$follow', remember to pay attention to the format! You can place it wherever you like, as long as it is in the code $upquery = "UPDATE, bt_arctype, SET.

As shown below, add, follow, ='$follow' at about line 39, remember to pay attention to the format! You can put it wherever you like, as long as it is in the code $upquery = "UPDATE, bt_arctype, SET." As shown below

How to automatically add nofollow to the DEDECMS website construction column

2.catalog_edit.php needs to be modified in two places, both of which are system column parameter SQL statement A, which is probably at line 65, as follows: A, probably At line 65, as follows:

How to automatically add nofollow to the DEDECMS website construction column

B, approximately at line 227, as follows: B, approximately at line 227, as follows:

How to automatically add nofollow to the DEDECMS website construction column

Need to pay attention to the format! Need to pay attention to the format!

Step 3: Modify the data table dede_arctype and add a follow field to the table

I use phpmyadmin to manage the database. Everything else is similar. Click on your website database to find I use phpmyadmin to manage the dede_arctype table. Everything else is similar. Click on your website database and find the dede_arctype table

How to automatically add nofollow to the DEDECMS website construction column

Click on the structure, and then add fields at the bottom Click Structure for the option, and then there is an option to add fields at the bottom

How to automatically add nofollow to the DEDECMS website construction column

. Just click Execute, and then enter the interface for setting table properties. Just click Execute directly, as shown below. Then enter the interface for setting table properties, as follows

How to automatically add nofollow to the DEDECMS website construction column

If you don’t know how to set it, you can just set it like I did, and then save it and it’s OK! If you don’t know how to set it up, you can just set it up like I did, and then save it and it’s OK! Attachment: If you still don’t dare to operate the database, it’s okay. You can also directly execute the SQL statement in the background of the website to add it. The SQL execution statement is given below: Attachment: If you feel you still don’t dare to operate the database, it’s okay. Just add it directly. You can also execute SQL statements in the background of the website to add them. The SQL execution statements are given below:

ALTER TABLE, dede_arctype, ADD, nofollow, VARCHAR (50) NULL DEFAULT NULL

That’s it. The operation of adding fields is completed. Next, I will teach you how to set and call

How to automatically add nofollow to the DEDECMS website construction column

. Just write rel="nofollow" in it and save it! Just write rel="nofollow" in it and save it!

The second step is to call the method. The second step is to call the column using {dede:channel}. However, if the tag is not called, the follow value cannot be found, so you must use the SQL tag. To call, the code is as follows: Normally calling columns are called using {dede:channel}, but if the tag is not called, the value of follow cannot be found, so you have to use the SQL tag to call, the code is as follows:

The code is as follows:

{dede:sql sql=“select * from dede_arctype ”}
<li>
<a href=“[field:typedir/]” [field:follow/] title=“[field:typename/]”>[field:typename/]</a>
</li>
{/dede:sql}

This is fine, but there will be a problem. [field:typedir/] contains {cmspath} which makes the link invalid, then we can use this and it will be fine, but There will also be a problem, [field:typedir/] contains {cmspath} which makes the link invalid, then we can use

[field:typedir function=‘str_replace(“{cmspath}”,“”,@me)’/] 此标签替换[field:typedir/]

最后,如果看完了这教程也搞不定的话,那么我也没办法了,附件里面直接有修改好的代码,下载,然后直接覆盖就可以了,然后只需要执行一下SQL语句就可以了。

SQL:</span>ALTER TABLE 、dede_arctype、 ADD 、nofollow、 VARCHAR( 50 ) NULL DEFAULT NULL </h1>

The above is the detailed content of How to automatically add nofollow to the DEDECMS website construction column. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
dedecms怎么增加多语言dedecms怎么增加多语言Feb 27, 2023 am 09:21 AM

dedecms增加多语言的方法:1、进入dedecms后台,创建封面栏目;2、将封面栏目“常规选项”的文件保存目录设置为cn或者en;3、将封面栏目“高级选项”的列表模板设置为“cn_index.htm”或者“en_index.htm”;4、单独调用每种语言的封面栏目和每种语言下的导航栏目即可。

织梦cms是什么语言写的织梦cms是什么语言写的Feb 21, 2023 am 09:45 AM

织梦cms是用PHP语言写的。织梦CMS(DedeCMS)是一个PHP开源网站管理系统,作用是构建中小型网站;它采用PHP+MySQL技术开发,可同时使用于windows、linux、unix平台。

dedecms是什么语言dedecms是什么语言Feb 24, 2023 am 09:46 AM

dedecms是PHP语言开发的;dedecms中文全称是织梦内容管理系统,是一个PHP开源网站管理系统;dedecms基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms怎么删除栏目dedecms怎么删除栏目Jul 13, 2023 pm 04:31 PM

dedecms删除栏目的方法:1、登录后台管理;2、进入“栏目管理”,可以看到当前网站所有栏目;3、选择要删除的栏目;4、将鼠标悬停在栏目名称上,删除栏目;5、点击“确认”按钮以继续删除操作;6、删除成功。

2023年织梦dedeCMS视频教程推荐2023年织梦dedeCMS视频教程推荐Oct 25, 2019 pm 01:56 PM

织梦内容管理系统(DedeCMS) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步。

火车头dedecms出现乱码怎么办火车头dedecms出现乱码怎么办Jul 19, 2023 pm 02:19 PM

火车头dedecms出现乱码解决方法:1、检查数据库编码;2、修改dedecms配置文件;3、检查浏览器编码设置;4、清理缓存和临时文件;5、寻求专业帮助。

dedecms是干什么的dedecms是干什么的Feb 22, 2023 am 09:14 AM

dedecms是指织梦内容管理系统,是一个PHP开源网站管理系统,用于个人网站或中小型门户的构建;dedecms是基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms无法修改怎么解决dedecms无法修改怎么解决Jun 25, 2023 pm 04:53 PM

dedecms无法修改的解决方法是:1、检查文件夹和文件的读写权限是否正确;2、使用最新版本的DedeCMS,并保持数据库、插件和主题等组件的版本与CMS核心匹配;3、添加了不兼容的插件或主题,导致DedeCMS无法正常工作;4、检查PHP日志和调试信息以找出问题并解决。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!