Support Forum
Yes it is possible but you would have to do this a long time before the topic loop. In fact you would need to apply this to the data query. This can be done via a filter hook.
it is important to just point out what the sort (order by) currently is because you would be overriding that. By default the order is:
topic_pinned DESC, spf_sftopics.post_id DESC
This means the list is sorted by the most recent post to the topic placing recently updated topics first. It also ensures that any pinned topics are set to the top. Further, if you use post moderation then this might be different for members and guests who would not be allowed to see these posts. So it can start to get complex.
However - knowing that and if you wanted to do this, then adding the following code to your spFunctions.php file (in your SP theme templates folder) will do the trick:
add_filter('sph_forumview_query', 'topic_by_name'); function topic_by_name($q) { global $sfvars; if($sfvars['forumid'] == XX) { $q->orderby = 'spf_sftopics.topic_name ASC'; } return $q; }
Of course you will need to change the XX for the forum id you want this to work for. Any pinned topics will not be at the top and any posts in moderation will show up in the last post column (although not the post content).
As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)
YELLOW
SWORDFISH
|
1 Guest(s)