Hello,
Is there a way to have posts ordered from most recent to oldest in Orca forum?
Hello, Is there a way to have posts ordered from most recent to oldest in Orca forum? |
Hello, yes it's possible I think. Post this in jobs section PS: If possible do not write me personally, please try to ask on the forum first |
Hello, yes it's possible I think. Post this in jobs section seriously, you cant just tell them how to change the sql statement for the sort order? you want this posted in the jobs section. unreal. this should be a controlled factor for administration of the site for the admin to be able to set the sort order of the posts. When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support |
Another issue with Orca forums I've noticed recently is posts remain in the forum even if a user is deleted. I can understand you might not want a deleted member's posts deleted from a forum as it may form the basis of that discussion/thread, but in the case of members who spam the forums it would be nice to not need to delete each post individually. It would be good to have an admin option for purging deleted members posts, if required - or, a at least checkbox when deleting a specific member who is also a persistent spammer (to delete their posts). |
Hello, My question was more to know if this choice (order of posts) is already a parameter that can be set somewhere using web interface. Of course I can try find the SQL request and change DESC by ASC and frankly speaking this is what I did. I have found this SQL request: function getTopicPost ($t, $x = 'last') This let me think that this is already made to use a parameter to define if it must be ASC or DESC. But where and how? |
Anyone have an idea on this yet. I also need to do this fix and not finding the proper file to edit topic display to DESC. thanks |
Hi, I solved this by modifiying modules/boonex/forum/classes/DbForum.php file at line 480. Before: $sql = "SELECT `ft`.`forum_id`, `t1`.`topic_id`, `t1`.`post_id`, `user`, `post_text`, `votes`, `hidden`, $sql_add1 DATE_FORMAT(FROM_UNIXTIME(t1.`when`),'{$gConf['date_format']}') AS `when` FROM " . TF_FORUM_POST . " AS t1 $sql_add2 INNER JOIN " . TF_FORUM_TOPIC . " AS `ft` ON (`ft`.`topic_id` = `t1`.`topic_id`) WHERE $sName = '$sVal' ORDER BY t1.`when` ASC"; After: $sql = "SELECT `ft`.`forum_id`, `t1`.`topic_id`, `t1`.`post_id`, `user`, `post_text`, `votes`, `hidden`, $sql_add1 DATE_FORMAT(FROM_UNIXTIME(t1.`when`),'{$gConf['date_format']}') AS `when` FROM " . TF_FORUM_POST . " AS t1 $sql_add2 INNER JOIN " . TF_FORUM_TOPIC . " AS `ft` ON (`ft`.`topic_id` = `t1`.`topic_id`) WHERE $sName = '$sVal' ORDER BY t1.`when` DESC"; |
That did the the trick. thanks
For groups forum it's - classes/en/DbForum.php |
In 7.1 I think it is like this, it seems to work... $sql = "SELECT `ft`.`forum_id`, `t1`.`topic_id`, `t1`.`post_id`, `user`, `post_text`, `votes`, `hidden`, t1.`when` $sql_add1 FROM " . TF_FORUM_POST . " AS t1 $sql_add2 INNER JOIN " . TF_FORUM_TOPIC . " AS `ft` ON (`ft`.`topic_id` = `t1`.`topic_id`) WHERE $sName = '$sVal' ORDER BY t1.`when` " . ('ASC' == $sOrder ? 'ASC' : 'DESC') . ((int)$iLimit ? ' LIMIT ' . (int)$iLimit : ''); $sql = "SELECT `ft`.`forum_id`, `t1`.`topic_id`, `t1`.`post_id`, `user`, `post_text`, `votes`, `hidden`, t1.`when` $sql_add1 FROM " . TF_FORUM_POST . " AS t1 $sql_add2 INNER JOIN " . TF_FORUM_TOPIC . " AS `ft` ON (`ft`.`topic_id` = `t1`.`topic_id`) WHERE $sName = '$sVal' ORDER BY t1.`when` " . ('DESC' == $sOrder ? 'ASC' : 'DESC') . ((int)$iLimit ? ' LIMIT ' . (int)$iLimit : ''); Baloo |
And in SMF one can set on a per user basis if the forum posts should be ascending or descending as well as the admin setting a default for the board. Geeks, making the world a better place |
Not working for me. $sOrder is passed in the function; but changing it there does not see to matter either. Geeks, making the world a better place |
function getTopicPost ($t, $x = 'last') Works on the test site but not on the production site; caches cleared. Geeks, making the world a better place |
Interesting, even rewriting the files back, the test site order will not change. Geeks, making the world a better place |
Not working for me. $sOrder is passed in the function; but changing it there does not see to matter either. geek_girl it works fine with me since, but I think I have to recompile the language so that it works in addition to clear cache Baloo |
I upgraded to 7.1.4 today (from 7.0.9) and was unable to find a way to get forum posts from most recent as I managed to have. Did anyone find a way to achieve it? |