DEDE5.6 Dream 5.7 Search Results Click to sort the latest available code

Source: Internet
Author: User
Keywords Search results

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

I believe you are very disappointed with the site search DEDE5.6 DEDE5.7, u disk volume production network, although has been optimized to let search results by the title match, but such as the search "Kingston" will appear very many have Kingston keyword articles, is completely according to the latest release time, That is, the latest release of the display in the front, the problem comes, we want to search results are everyone needs, but the latest release is not necessarily required, and a few pages of search results so that users at a loss;

How to solve it, U disk production network thought of the number of clicks to sort the search results, of course, first Baidu Google under no one encountered the same problem, disappointed that most of the online tutorials are dede old version of the tutorial, completely can not use, first/include/inc_arcsaerch_ View.php in the new version of the Dede Dream program can not find, the new version of the site search php file is actually/include/arc.searchview.class.php, followed by $this->orderby = ' Dede_full _search.aid desc '; The code could not be found in the new version of arc.searchview.class.php file, and could not be modified by the online tutorial;

What can I do? The problem must be solved, I found in the arc.searchview.class.php file 467 lines "Sort by" comment below is the search results sorting code, how to solve it! Ask the High master, the solution is as follows:

In the/include/arc.searchview.class.php file 467 line "//Sort Way" Note the following "//search" Note the code above is changed to the following code:

$ordersql = ';
if ($this->channeltype< 0 | | $this->channeltypeid< 0) {
if ($orderby = = "id") {
$ordersql = "ORDER by arc.aid Desc";

}else if ($orderby = = "Senddate") {

$ordersql = "ORDER by arc.senddate Desc";

}else{
$ordersql = "ORDER by arc.click Desc";
}
}else{
if ($orderby = = "Senddate")
{
$ordersql = "ORDER by arc.senddate Desc";
}
else if ($orderby = = "pubdate")
{
$ordersql = "ORDER by arc.pubdate Desc";
}
else if ($orderby = = "id")
{
$ordersql = "ORDER by arc.id Desc";
}
Else
{
$ordersql = "ORDER by arc.click Desc";
}
}

The test is not solved: as shown in the following figure

  

Quickly modify your search code, optimize the search results of dream weaving greatly improve the user experience bar!

This article for U Disk Production Network original reprint please keep this link http://www.upantool.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.