Find the list resolution file include/arc.listview.class.php
find that the collation does not follow the weight sort of judgment, so the modifier is added to the collation
| code is as follows |
copy code |
//sort $ordersql = '; if ($orderby = "Senddate" | | $orderby = = " Id ' { $ordersql = ' ORDER by arc.id $orderWay '; } Else if ($orderby = = "Hot" | | $orderb y== "click" { $ordersql = "ORDER by Arc.click $orderWay"; } Else if ($orderby = = Las Tpost ") { $ordersql =" ORDER by Arc.lastpost $orderWay "; } Else if ($orderby = = "Weight") { $ordersql = " ORDER by Arc.weight $orderWay"; } else { ; $ordersql = "ORDER by Arc.sortrank $orderWay"; } |
While modifying the condition if (ereg (' Hot|click|lastpost ', $orderby)) is if (Ereg (' Hot|click|lastpost|weight ', $orderby)), [Search hot|click| Lastpost positioning]
Other than that:
Arclist is also inaccurate for weight ordering, which requires a isweight attribute to be added.
| The code is as follows |
Copy Code |
| {dede:arclist typeid= ' pagesize= ' isweight= ' Y ' orderby= ' weight ' orderway= ' ASC '} |