Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Select forum option tab
Avatar
Arno Wakfer
Member
Free Members
sp_UserOfflineSmall Offline
Mar 31, 2015 - 2:27 am

Hi,

Is it possible to only show the main forums (excluding subforums) under the "Select Forum" drop down tab ?

Regards

Arno

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 31, 2015 - 3:05 am

It is not possible without a small change to the code. I think I could justify making this an optional argument actually and then it would just need a small change to the theme template. I will see what I can do. Meanwhile I could give you a small edit to make to core code which would achieve this.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Arno Wakfer
Member
Free Members
sp_UserOfflineSmall Offline
Mar 31, 2015 - 5:19 am

Please share the code with me....thanks 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 31, 2015 - 5:31 am

You would need to edit the file /simple-press/forum/content/sp-common-view-functions.php

The function you need to edit is called sp_QuickLinksForum() and can be found starting around line 1283 of the file.

Locate this line of code within the middle of the function:

if (!empty($forum->subforums)) $out.= sp_compile_forums($forum->subforums, $forum->forum_id, 1, true);

and comment it out.

I have added code to the next update that will enable this as an option to be turned on in the theme template which is how it should be handled.

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: 639
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17342
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10116
Posts: 79581