Support Forum
G'mornin..
It would be useful to be able to define post sorting by forum, or if that is not possible sort by group.
I sort my posts by oldest first, but have another forum for my blog posts that would be best sorted by newest first.
I looked before posting this message, please excuse me if i am incorrect and there is a way to sort by forum.
Thanks..
- Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Can you explain just where you mean you would like this sorting behaviour? You seem to be talking about 'posts' but in what context? If you mean the standard Topic View - i.e, all the posts in a specific topic - then sorting by 'forum' or 'group' is meaningless. So I am a little confused...
YELLOW
SWORDFISH
|
I sometimes confuse myself not knowing how to say what i am thinking.
I have one Group, with 4 Forums installed so far.
All my SP forum posts are sorted by the oldest message first.
Of these 4 Forums, one is for Blog posts that are auto created when i publish a blog post. That one forum is getting fairly long. In just that one Forum would be better to sort the Posts by newest published.
I considered creating another Group for those blog posts copied to SP, but didn't see a sort order there either.
- Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
No worries but still a little confused!
But that s probably academic. Currently SP supports options for the sorting of topic lists (Forum View) and post lists (Topic View) but - they are globally applied to all forums and topics. So the answer sounds like it is - not at the moment.
But I will open a ticekt so we can discuss whether this is something we should consider adding.
YELLOW
SWORDFISH
|
we might try to get it in next release since its straight forward, but no guarantees.
Visit Cruise Talk Central and Mr Papa's World
Dear Simple:press team,
i'll just necromance this thread - i changed the topic order to alphabetical by inserting
add_filter('sph_forumview_query', 'my_sort_function');
function my_sort_function($sqlObj) {
$sqlObj->orderby = SFTOPICS . '.topic_name ASC';
return $sqlObj;
into the spfunctions.php of the template. Of course, now my beloved customer has noticed (after i told him about 15 times ) that this is great for the "collector" part of the forum (german stamps; they seem to have an extremely strict numbering system...), but quite disturbing for the off-topic part (people don't seem to number their threads there :D).
At this, i'm at my wits end. Can you think of any way to implement this; short of setting up a second forum?
best regards and thanks for your time!
The quickest and easiest way to confine your sort change to a single forum would be:
add_filter('sph_forumview_query', 'my_sort_function'); function my_sort_function($sqlObj) { global $sfvars; if($sfvars['forumid'] == XX) { $sqlObj->orderby = SFTOPICS . '.topic_name ASC'; } return $sqlObj; }
Where XX is the forum ID you want to effect.
YELLOW
SWORDFISH
|
1 Guest(s)