Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Separate groups
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jan 12, 2016 - 11:07 am

Hello sp community

the question is simple: is it possible ( maybe via hooks ) to create a wordpress page with a "single forum group" instead of the classic page with all-in-one forums ?

A workaround would be to link directly to a "forum" with subforum. But i would accomplish it with groups too.

thanks in advance

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 12, 2016 - 11:47 am

You can obviously create links that display a single forum but SP utilises a single WordPress page to display everything and, as such, can only use the one page.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jan 12, 2016 - 12:24 pm

Yellow Swordfish said
You can obviously create links that display a single forum but SP utilises a single WordPress page to display everything and, as such, can only use the one page.

isn't there any "add_filter" that allow me to remove groups from forum list? i can remove all groups except one if i'm using a query variable for example.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 12, 2016 - 2:15 pm

If you turn on the option for 'single group display' in options  > general display settings you can use a query var of 'group' and the ID - as in:

/forum?group=XX

which will just show the designated forum group. It's been a long time since I looked at that!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jan 14, 2016 - 5:19 am

Seems that doesn't [always] work 

i've tried it forums/?group=4 and initially it showed me only a group ( i was really excited for this plug & play solution )

then i've tried to access at forums/  index hoping it shows the whole forum list, instead it continued to show only group=4. ( i've cleaned all cache )

So i had to disable the option ( it was yesterday night and i had to go to bed .. ) 

Now, i've tried to enable it again and it doesn't work anymore

Is it a little buggy? what is exactly its behaviour ?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 14, 2016 - 6:32 am

No it's not buggy. Just the opposite in fact!
It has been a very long time since that was coded in and I recall now that it does go hand in hand with the single group and is intended to work just as you saw it. I don't have any other methid currently available I am afraid.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jan 14, 2016 - 6:40 am

So today i'll take a look at the code of ?group= option and see which is the filter to remove other groups.

I'll try to adapt it to my needs

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 14, 2016 - 6:55 am

Take a look at the filter:

sph_groupview_query

This passes in two parameters. The first is the sql object that goes to the building of the query. The second is the data object being collected to populate the group view data.

So the ->where property could be changed to include a specific group_id clause.

I can help with this if you need it but I will be going out in a few minutes for about an hour,.

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626