Xiuno thread__find数组详解

v2016 2020-2-10 2069

调用方法:

$_forumlist = thread__find(array(), array('last_date'=>-1), 1, 5);
thread_list_access_filter($_threadlist, $gid);

其中thread__find数组例:

Array ( [2] => Array ( [fid] => 1 [tid] => 2 [top] => 0 [uid] => 1 [userip] => 2130706433 [subject] => 发表文章 [create_date] => 1580980966 [last_date] => 1581335175 [views] => 120 [posts] => 8 [images] => 0 [files] => 0 [mods] => 0 [closed] => 0 [firstpid] => 3 [lastuid] => 1 [lastpid] => 34 ) [3] => Array ( [fid] => 2 [tid] => 3 [top] => 0 [uid] => 1 [userip] => 2130706433 [subject] => php伪原创源码 [create_date] => 1580983961 [last_date] => 1581153901 [views] => 156 [posts] => 15 [images] => 0 [files] => 0 [mods] => 0 [closed] => 0 [firstpid] => 6 [lastuid] => 1 [lastpid] => 33 ) [1] => Array ( [fid] => 1 [tid] => 1 [top] => 0 [uid] => 1 [userip] => 2130706433 [subject] => 哈哈哈哈 [create_date] => 1580978850 [last_date] => 1581153893 [views] => 140 [posts] => 8 [images] => 0 [files] => 0 [mods] => 0 [closed] => 0 [firstpid] => 1 [lastuid] => 1 [lastpid] => 32 ) )


调用方法中的last_date为排序依据,last_date为最后修改时间,即为最近谁先收到评论谁排在前面,根据thread__find数组例可以自行替换,比如根据评论数量排序则改为posts


要详解的太多了,,,,不说太白的东西了,有感兴趣的ass可以在下面评论补充

最新回复 (0)
返回
发新帖