How to solve the automatic linking of document keywords in dedecms V5.6
dedecms V5.6 How to solve the automatic linking of document keywords?
Requires the following settings:
1. Backend-Collection-Document Keyword Maintenance Add Keywords and Links
2. Backend-System-Core Settings Keywords Replacement (yes/no) Using this function will affect the speed of HTML generation: Yes
3. Backend-System-Other Options Document Content The number of times to replace the same keyword (0 means all replacements): Set a value (by the way) By the way, for example, if an article contains keywords that include each other, such as dede and dedecms, the system will replace the subsequent dedecms with dede. My approach is to set the number of keyword replacements to 1, and then maintain the document keywords there. Set the frequency of dede and dedecms to be the same and you’re done.)
Modify the file:/include/arc.archives.class.php
Modification method:
Find the code:
The code is as follows:
foreach($kws as $k) { $k = trim($k); if($k!=''") { if($i > $maxkey) { break; } $myrow = $this->dsql->GetOne("select * from dede_keywords where keyword='$k' And rpurl<>'' "); if(is_array($myrow)) { $karr[] = $k; $GLOBALS['replaced'][$k] = 0; $kaarr[] = "<a href='{$myrow['rpurl']}'><u>$k</u></a>"; } $i++; } }
Replace the above code with the following code:
The code is as follows:
global $dsql; $query="SELECT * FROM dede_keywords WHERE rpurl<>'' ORDER BY rank DESC"; $dsql->SetQuery($query); $dsql->Execute(); while($row = $dsql->GetArray()) { $key = trim($row['keyword']); $key_url=trim($row['rpurl']); $karr[] = $key; $kaarr[] = "<a href='$key_url' target='_blank'><u>$key</u></a>"; }
Recommended learning: Dreamweavercms
The above is the detailed content of How to solve the automatic linking of document keywords in dedecms V5.6. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software