Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of automatic linking of keywords in dedecms V5.6 documents

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail the solution to automatic linking of keywords in dedecms V5.6 documents. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

How to solve the problem of automatic linking of keywords in dedecms V5.6 documents?

The following settings are required:

1. Background-Collection-document keyword maintenance, add keywords and links

2. Backend-system-Core setting keyword replacement (Yes / No) the use of this feature will affect the speed of HTML generation: yes

3. Background-system-other options document content the same keyword replacement times (0 is all substitutions): set a value (by the way, for example, an article contains mutually contained keywords, such as dede and dedecms, the system will replace the later dedecms with dede. My practice is to set the keyword replacement times to 1, and then the document keyword maintenance sets the frequency of dede and dedecms to be the same. It's done. )

Modify the file: / include/arc.archives.class.php

Modify method:

Find the code:

The code is as follows:

Foreach ($kws as $k) {$k = trim ($k); if ($kryptonite cake'") {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 [] =" $k ";} $iTunes;}

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 [] = "$key" } on the dedecms V5.6 document keyword automatic link solution is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report