Get the App
SLTechnology News&Howtos  ›  Servers  › 

The realization method of Chinese and English search results in dedecms

Shulou Source: shulou.com Published: 2022-06-02 03:34:26 10月04日 Update

Dedecms chinese and english search results to achieve the method? This problem may be our daily study or work often see. I hope you learned something from this question. The following is the reference content brought to you by Xiaobian. Let's take a look together!

Dedecms English search results how to achieve?

Generally speaking, when we use DEDECMS to make Chinese and English stations, we need to search only the contents of Chinese stations on Chinese stations, while only the contents of English stations will be searched on English stations. At this time, we need to make a separate template for the search column of English stations, which can be realized according to the following methods.

Copy the serach.php file in the plus directory and rename it searche.php as the new search file.

Edit searche.php to find this line of code

The code is as follows:

require_once(DEDEINC. "/arc.searchview.class.php");

Replace with:

The code is as follows:

require_once(DEDEINC. "/arc.searchviewen.class.php");

Copy the arc.searchview.class.php file in the include directory and rename it arc.searchviewen.class.php

Edit arc.searchviewen.class.php to find this line of code

The code is as follows:

$tempfile = $GLOBALS['cfg_basedir'].$ GLOBALS['cfg_templets_dir']. "/".$ GLOBALS['cfg_df_style']. "/search.htm";

changed to

The code is as follows:

$tempfile = $GLOBALS['cfg_basedir'].$ GLOBALS['cfg_templets_dir']. "/".$ GLOBALS['cfg_df_style']. "/search_en.htm";

Copy search.htm in the template and rename it search_en.htm. At this time, the template of the English station has been completed, and find the relevant search code of the English station, as follows:

The code is as follows:

/plus/searche.php, searche.php to search,name="typeid" value="26" This is the specified column ID.

Thank you for reading! After reading the above, do you have a general understanding of the implementation method of dedecms English and Chinese search results? I hope the content of this article is helpful to everyone. If you want to know more about related articles, please pay attention to the industry information channel.

Tags: Search code content English Chinese and English search results methods results files templates articles columns directories questions Chinese generally speaking Chinese stations more see examples Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft vpn Xiaomi OPPO Reno