Most webmasters like to use Dede to build websites. They may have encountered such problems during the website building process.
Let's just move on to the topic. Back up the topic before modification!
1. Column URL Standardization
When I used Dede to create a category, I found that the column contains index.html.
Before modification:/ABC/index.html
After modification:/ABC/
Open the file: Include/channelunit. func. php
About 171 rows
$ Reurl = $ typedir. '/'. $ defaultname;
Change to: $ reurl = $ typedir .'/';
Version 5.5 does not have this problem
2. Beautify the topic title and remove the slashes.
Before modification: top-level topic/level-1 topic
After modification: Level 1 topic-top level topic
Open the file: templets \ Default \ LIST _ *. htm
Set <title >{ Dede: field. Title/}-{Dede: Global. pai_webname/} </title>
Modify to: <title> {Dede: Type} [field: typename/] {/Dede: Type}-{Dede: field. Title runphp = 'yes '}
$ Ta = '1'; $ TB = '/'; $ Tc = @ me; $ TD = Split ($ TB, $ TC ); @ me = $ TD [$ Ta-1]; {/Dede: field. title }-
{Dede: Global. pai_webname/} </title>. This method is only applicable to second-level columns.
Method.
Third, add the serial number to the title of the article.
Before modification: title, title, title
After modification: title, title (2), title (3)
Open the file: Include/arc. Archives. Class. php
Modify the following code in line 3:
Reference content is as follows:
// Cyclically generate the HTML file else {for ($ I = 1; $ I <= $ this-> totalpage; $ I ++) {$ temptitle = $ this-> fields ['title']; // temporarily store a Title Copy 2009.10.28if ($ I> 1) {$ truefilename = $ this-> gettruepath (). $ filefirst. "_". $ I. ". ". $ this-> shortname; $ this-> fields ['title'] = $ this-> fields ['title']. '('. $ I. ')'; // Add the serial number 2009.10.28} else {$ truefilename = $ this-> gettruepath (). $ filename;} $ this-> parsedmfields ($ I, 1); $ this-> DTP-> saveto ($ truefilename ); $ this-> fields ['title'] = $ temptitle ;//
4. Do not forget to make related article recommendations after reading the article.
Automatic link document tag reference:
Reference content is as follows:
<Div> <DL> <DT> <strong> about {Dede: field. title/}, others are also interested in: </strong> </DT> <DD> <ul> Dede: likearticle ROW = '6' titlelen = '42' orderby = Rand} <li> <a href = "[field: arcurl/]"> [field: title/] </a> </LI> {/Dede: likearticle} </ul> </DD> </dl> </div>
This article is from the blog of "ba fei yu", please be sure to keep this source http://bafeiyu.blog.51cto.com/5401101/1556412
Dedecms detail optimization solution