Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
requests-topic
Create Post Sort Order by Forum
Avatar
Dosenben
Member
Free Members
sp_UserOfflineSmall Offline
Jun 20, 2012 - 4:36 am

you guys are the best laugh. Thx Andy!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 20, 2012 - 7:02 am

You're welcome

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dosenben
Member
Free Members
sp_UserOfflineSmall Offline
Jun 20, 2012 - 9:39 am

Hey,

 

it worked so far; splendid! But - just to get on your nerves right away (again wink): Would it be possible to do the whole things by group_id? So - sorting a complete forum group by topic_name ASC? I have a feeling that it would not, but i ask in the hope of one of your magic tricks - it's very likely you know something i don't. smile

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 20, 2012 - 10:08 am

We don't actually expose the group_id and have never been asked for it but it seems to me that it somewhat remiss not to do so and we can do basically free of charge.

So two choices.. you can either build a compound IF statement to cover all of the forum IDs in the target group - or - I can give you a small core code edit to add group_id into the $sfvars array and I can make sure that the change will make it into the next SP release.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dosenben
Member
Free Members
sp_UserOfflineSmall Offline
Jun 21, 2012 - 4:19 am

Hey Andy,

 

thx for your reply - the first one sounds challenging (and as if i could easily break something laugh) - so; unless it's far simpler than i read it; i'd prefer the second choice i believe; but basically i'll take whatever you consider the wise path.

 

thank you very much!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 21, 2012 - 4:55 am

Ok - well this following change has already been committed into core code so will be in the next SP update. The core file to edit is

/simple-press/sp-startup/forum/sp-forum-support-functions.php

The function you need to find is sp_populate_support_vars() around line 137

A few lines into that function you will find the line of code:

$sfvars['forumid'] = $record->forum_id;

Below this simply add:

$sfvars['groupid'] = $record->group_id;

Finally, in your SP theme functions file in the small sort routine, change the $sfvars['forumid'] to $sfvars['groupid'] along with the appropriate Group record number.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dosenben
Member
Free Members
sp_UserOfflineSmall Offline
Jun 21, 2012 - 5:04 am

Oh, best of both worlds! Much obliged! smile. I'll implement as soon as iget around to it and report here if it worked as intended.

 

tankhs and best regards!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 21, 2012 - 8:00 am

Do let us know how it goes.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dosenben
Member
Free Members
sp_UserOfflineSmall Offline
Jun 21, 2012 - 12:09 pm

Just did the test run on a single group, worked like a charm. Will add several over the next days; thanks again for the quick help! laugh

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 21, 2012 - 1:54 pm

Good to hear

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625