Phpcms V9 Self-brought related articles, topics and other modules do not support order ordering, the related articles called, the topic default to ascending, which caused a problem, the related article is the earliest article, no timeliness. We can only modify the program files, simply modify a file, we can meet our needs.
To modify related article sorting methods:
Open the root directory of the phpcms/modules/content/classes/content_tag.class.php, find
$r = $this->db->select ($sql 2, ' * ', $limit, ' ', ', ' id ');
modified to:
$r = $this->db->select ($sql 2, ' * ', $limit, $order, ' ', ' ', ' id ');
The PC label format is as follows:
{pc:content action= "relation" relation= "$relation" id= "$id" catid= "$catid" num= "5" order= "Inputtime DESC" keywords= "$ Rs[keywords] "}
Sorted by release time: order= "Inputtime DESC"
Sort by ID Descending: order= "id DESC"
Ways to modify related thematic sequencing:
Open Phpcms/modules/special/classes/special_tag.class.php in the root directory to find
$listorder = array (' ID ' ASC ', ' ID ' desc ', ' listorder ' ASC, ' ID ' desc ', ' listorder ' desc, ' ID ' desc ');
Modified to:
$listorder = array (' ID ' ASC ', ' ID ' desc ', ' listorder ' ASC ', ' listorder ' desc ');
The PC label format is as follows:
"because: in thepc tag
order= "Listorder DESC" and listorder= "3" are different
$listorder = array (' ID ' ASC ', ' ID ' desc ', ' listorder ' ASC ', ' listorder ' desc ');
0 1 2 34 options, respectively
Then:
listorder= "0" equals order= "id ASC"
listorder= "1" equals order= "id DESC"
listorder= "2" Equals order= "Listorder ASC"
listorder= "3" Equals order= "Listorder DESC" "
{pc:special action= "content_list" specialid= "$id" typeid= "$t [typeid]" listorder= "3" num= "9"}
Sorted by release time: order= "Inputtime DESC"
Sort by ID Descending: order= "id DESC"