-
Recently, I was helping a friend build a game software website. When adding test articles, I discovered a problem: the software channel cannot automatically obtain keywords from the TAG like the article channel, but directly decomposes some meaningless keywords from the title. , which also led to the phenomenon that the article was not relevant when calling "Related Articles". By comparing the templates added to the article channel, I found the modification method:
Find the file dede/templets/soft_add.htm in the root directory of the website (dede is the default background management directory of DEDECMS, please find the corresponding folder if you want to modify it), open it and find:
<input name="tags" type="text" id="tags" value="" style="width:300px" />
Replace with:
<input name="tags" type="text" id="tags" value="" style="width:300px" onChange="$Obj('keyWords').value=this.value;" />
Found again:
<input type='text' name="keywords" id="keywords" style="width:290px;" value="" />
Replace with:
<input type='text' name="keywords" id="keywords" style="width:290px;" value="<?php echo $keywords; ?>" />
In this way, the keywords will automatically match the TAG when publishing content in the software channel, and you can also manually modify the keywords as needed.
In addition to reducing unnecessary repeated entry work, this is also of great benefit to friends who want to call related articles on the content page. Everyone knows that DEDECMS calls related articles based on keywords. If If the system automatically extracts keywords, it will leave you speechless. For example, the title of the article I want to post is "[Qixiong] Lufeng General Identifier 1.05 Free Version Download", and the automatically extracted keywords are "Qixiong, Lufeng, Generals" , Identification, 1.05, Free Version, Download, Seven Heroes, Hegemony,” This means that even keywords with “download” will be displayed in related articles. It makes no sense, right? After modifying according to the above method, you only need to set the TAG label to "Qixiong, Lufeng, Discriminator", so that the "related articles" called will be very relevant and more suitable for user experience.
Attached is my related article calling code:
{dede:likearticle row='10' titlelen='60' orderby='click'}
<font color=#666666>[[field:pubdate function="MyDate('m-d',@me)"/]] </font><a href='[field:arcurl/]' title="[ field:title /]" target='_blank'>[field:title function='cn_substr(@me,32)'/]</a> <br>
{/dede:likearticle}
The above is my experience in using DEDECMS. If there is something wrong, please reply and point it out. In the next article, I will share the SEO optimization experience of the DEDE column page. If you are interested, you can go to www.dongmenjie.com. Look, thank you for your support!
Thanks to Shen Mo Zai Jian for your contribution.