Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Getting just groups to show on main page
Avatar
Melissa Van Dam
Member
Free Members
sp_UserOfflineSmall Offline
Apr 7, 2012 - 5:51 pm

I am wondering if there is a way to get only the groups to show on the main forum page, and not all the forums withing the groups? It is fairly lengthy to be displayed all at once.

Thank you!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 7, 2012 - 6:05 pm

really?? what would users click on to get to the forums or topics?

but yeah sure...  its all about themes with 5.0 so you can do pretty much whatever you want...  you just need to edit your sp theme and the template files... first, make sure you create your own sp theme rather than use one of ours to not lose changes on updates...  http://codex.simple-press.com/.....g-a-theme/

and then to do what you want, edit the spGroupView.php template file since that is the theme file that controls display on the main forum page...  and then remove the forum generation stuff...  in the default theme, it would start with:

                # Start the Forum Loop
                # ----------------------------------------------------------------------
                if (sp_has_forums()) : while (sp_loop_forums()) : sp_the_forum();

and then end with

                endwhile; else:
                    sp_NoForumsInGroupMessage('tagClass=spMessage', __sp('There are no forums in this group'));
                endif;

delete those and everything in between...  

give it a shot, but I suspect you won't like it when all done and said, but its all about trial and error...

and with themes, you can custom the look how you want...

Avatar
Melissa Van Dam
Member
Free Members
sp_UserOfflineSmall Offline
Apr 7, 2012 - 7:57 pm

I was thinking that they could click on the group to see the forums in the group, but I see that the group label is not a link, so that may not work. I was more looking for a way to shorten the list, as it is fairly long, but I don't think I should remove any of the forums.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 7, 2012 - 9:24 pm

well, you 'could' do that... just have to stray from the playbook a bit... wink

lets try this...

remove the code as I indicated before...

then in the same spGroupView.php file, find this code:

                sp_GroupHeaderName('tagClass=spHeaderName');

and try changing it to:

                echo '<div class="spHeaderName"><a href="'.add_query_arg('group', $spThisGroup->group_id, sp_url()).'">'.$spThisGroup->group_name.'</a></div>';

now... you probably wont like the link color on the group name which is now a link to the group's list of forums... but see if you like it then we can work the link color...

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: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625