Phpcms V9 with the relevant articles, topics and other modules do not support order ordering, call related articles, topics default to ascending, this creates a problem, tune out the relevant article is the earliest article, no timeliness. We can only modify the program file, simply modify a file to meet our needs.
To modify the method of sorting related articles:
Open the phpcms/modules/content/classes/content_tag.class.php under the root directory and find
$r = $this->db->select ($sql 2, ' * ', $limit, ', ', ', ' id ');
Modified to:
$r = $this->db->select ($sql 2, ' * ', $limit, $order, ', ', ' id ');
The PC tag format is as follows:
{pc:content action= "relation" relation= "$relation" id= "$id" catid= "$catid" num= "5" order= "Inputtime DESC" keywords= "$ Rs[keywords] "}
Sort by release time: order= "Inputtime DESC"
Sort in descending order by ID: order= "id DESC"
to modify the method of sorting related topics:
Open the phpcms/modules/special/classes/special_tag.class.php under the root directory and 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 tag format is as follows:
"because: in the PC 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
So:
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"}
Sort by release time: order= "Inputtime DESC"
Sort in descending order by ID: order= "id DESC"