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

DEDE 5.7the method of sorting the home page by weight

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

Share

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

DEDE 5.7 how to sort the home page by weight? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

DEDE 5.7How is the home page sorted by weight?

DEDE 5.7Home page [arclist] add sort by weight

1. Find the arclist.lib.php file in the following directory\ include\ taglib in the dream weaving system and open it.

Find it on lines 74 or 75:

/ / whether weight sorting is required for arclist. Default is "N". If sorting is required, set to "Y" $isweight = $ctag- > GetAtt ('isweight').

Change this line to:

$weight = $ctag- > GetAtt ('weight')

Find it at about line 327

/ / how documents are sorted $ordersql =''; if ($orderby=='hot' | | $orderby=='click') $ordersql = "ORDER BY arc.click $orderWay"; else if ($orderby==' sortrank' | | $orderby=='pubdate') $ordersql = "ORDER BY arc.sortrank $orderWay"; else if ($orderby==' id') $ordersql = "ORDER BY arc.id $orderWay"; else if ($orderby==' near') $ordersql = "ORDER BY ABS (arc.id -". $arcid. ")" Else if ($orderby = = 'lastpost') $ordersql = "ORDER BY arc.lastpost $orderWay"; else if ($orderby = =' scores') $ordersql = "ORDER BY arc.scores $orderWay"; else if ($orderby = = 'rand') $ordersql = "ORDER BY rand ()"; else $ordersql = "ORDER BY arc.sortrank $orderWay"

Modified to:

/ / how documents are sorted $ordersql =''; if ($orderby=='hot' | | $orderby=='click') $ordersql = "ORDER BY arc.click $orderWay"; else if ($orderby==' sortrank' | | $orderby=='pubdate') $ordersql = "ORDER BY arc.sortrank $orderWay"; else if ($orderby==' id') $ordersql = "ORDER BY arc.id $orderWay"; else if ($orderby==' near') $ordersql = "ORDER BY ABS (arc.id -". $arcid. ")" Else if ($orderby = = 'lastpost') $ordersql = "ORDER BY arc.lastpost $orderWay"; else if ($orderby = =' scores') $ordersql = "ORDER BY arc.scores $orderWay"; else if ($orderby = = 'rand') $ordersql = "ORDER BY rand ()"; else if ($orderby = =' weight') $ordersql = "orderby arc.weight $orderWay"; / / sort else $ordersql = "ORDER BY arc.sortrank $orderWay" by weight if there are no specific settings

Now that OK has saved this document, we can sort it on the home page using orderby='weight'.

Thank you for reading! After reading the above, do you have a general understanding of the method of sorting the home page of DEDE 5.7by weight? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

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