Support Forum

Separate groups

YE Yehonal
Yehonal
Member

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

7 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

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.

YE Yehonal
Yehonal
Member

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.

YS Yellow Swordfish
Yellow Swordfish
Member

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!

YE Yehonal
Yehonal
Member

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 ?

YS Yellow Swordfish
Yellow Swordfish
Member

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.

YE Yehonal
Yehonal
Member

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

YS Yellow Swordfish
Yellow Swordfish
Member

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,.