Support Forum

Subforum question

ME Meztli
Meztli
Member

Hello guys,

I have two standard forum with several subforums:

  1. http://friskyttarna.eu/forum/tyria/ (3 subforums)
  2. http://friskyttarna.eu/forum/klasser-gw2/ (8 subforums)

When i change the role of nr2 from standard forum to subforums (together with the 8 subforums) like this:

Forum

——— Subforum1

——— Subforum2

——— Subforum3

——— Subforum4

———————— Sub-Subforum 1-8

Both the subforums and sub-subforums is visible in group view: http://friskyttarna.eu/forum/

I would like the subforums to be visible in group view and sub-subforums only in forum view. Is this possible?

 

Sorry for the confusing text, but since english is not my native language, this was the best explanation i could come up with.

Cheers

Thomas

24 Answers

New Answer

MP Mr Papa
Mr Papa
Member

see:  http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/group-view/sp_forumindexsubforums/

in particular the nested option…

ME Meztli
Meztli
Member

Mr Papa said
see:  http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/group-view/sp_forumindexsubforums/

in particular the nested option…

Thank you Steve. Much appricated.

I changed the AllNested option from 1 to 0. It did wonders.

However if i understand it correctly, this option will be reset next time i update to a new SP version. Is there any way to add the AllNested string to my own SP child theme?

 

YS Yellow Swordfish
Yellow Swordfish
Member

Not sure I fully understand. The ‘allNested’ argument is available using that template display function no matter what the theme being used is. If your theme includes that function then the ‘allNested=’ argument can be utilised…

MP Mr Papa
Mr Papa
Member

are you asking how to make your own sp theme so changes to it dont get overwritten? if so, see:

http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

ME Meztli
Meztli
Member

I followed the codex which pointed out plugins/simple-press/forum/content/sp-group-view-functions.php and changed:

allNested      => from 1 to 0

I supose that directory will be overwritten next time i am updating my forum with a new SP release from you or maybe i am wrong?

My own SP theme is located sp-resources/forum-themes/friskyttarna.

 

Cheers

 

YS Yellow Swordfish
Yellow Swordfish
Member

No no – you change your theme NOT the code file. ‘allNested’ is an argument you pass in the call within your theme to that function. As in:

sp_ForumIndexSubForums('allNested=0', __sp('Sub-Forums'), __sp('Browse topics in %NAME%'));

 

ME Meztli
Meztli
Member

Yellow Swordfish said
No no – you change your theme NOT the code file. ‘allNested’ is an argument you pass in the call within your theme to that function. As in:

sp_ForumIndexSubForums('allNested=0', __sp('Sub-Forums'), __sp('Browse topics in %NAME%'));

 

Should i add that line of code to friskyttarna.php?

 

YS Yellow Swordfish
Yellow Swordfish
Member

No you add that argument to the function in the spGroupView/php template of your theme.

ME Meztli
Meztli
Member

Yellow Swordfish said
No you add that argument to the function in the spGroupView/php template of your theme.

Great, now i got it.

Thank you for your patient Andy!

 

ME Meztli
Meztli
Member

Hello guys,

One more question regarding subforums.

I just noticed that when a subforum get a new topic/post. The forum shows it in the drop down meny (most recent topics with unread posts), as well with an icon in the subforum (this forum has unread posts in..), but no icon in the parent forum.

Is this an result of

  sp_ForumIndexSubForums(‘allNested=0’, __sp(‘Sub-Forums’), __sp(‘Browse topics in %NAME%’));

or is there any way i can accomplish this?

Thank you in advance!

/Thomas

MP Mr Papa
Mr Papa
Member

Andy knows better than I, but believe because you said dont nest, the info from the subforum wont bubble up to the parent…

ME Meztli
Meztli
Member

Mr Papa said
Andy knows better than I, but believe because you said dont nest, the info from the subforum wont bubble up to the parent…

That´s a pity.

Simple Machines Forum have the option i was asking for, and I was hoping there was a way to make it work in SP as well.

However i cant be lucky all the time. smile

Keep up the good work!

 

YS Yellow Swordfish
Yellow Swordfish
Member

If you were just referring to the QuickLinks listing then those links are links directly to the forum in question so I believe it is right that a subforum post should only highlight the subforum the post is in. If you are meaning something else then I think i need some more explanation.