Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

again with the - + question

Quote Reply
again with the - + question
Turns out I would like to be able to control the collapsed or expanded view feature on forum headers on the main index page.

http://perlguru.com/

These guys do it on the main page....all subjects are expanded....there are no - + options.

Thanks
Quote Reply
Re: [steven199] again with the - + question In reply to
Just remove the option from the template entirely if all you want is to have all expanded.
Below is the code in the template (NOTE: I broke the <a href line up for easier reading but it should be one contiguous line in the template).

Code:

category_list.html

<%if current_user_id and cat_show_forums and main_page%>
<a href="gforum.cgi?<%if cat_hidden%>un<%endif%>hide_cat=<%cat_id%>;
<%hidden_query%>" title="<%if cat_hidden%>Expand<%else%>Collapse<%endif%>
this category"><small><%if cat_hidden%>[+]<%else%>[-]<%endif%></small></a>
<%endif%>


If you want them all disabled just remove it entirely. Although if it was previously enabled you will need to empty the user_hidden_cats field in the users table for gforum. Some people may have already hid some and there will be entries there - you will want to clear those out.

If there is a particular forum (like we have one - policies/announcements) that we do not want users to be able to hide. Then you can modify the entry in the template to something like:

Code:

<%-- Disallow hiding of policy/announcements category--%>
<%if cat_id == 2%>
&nbsp;
<%else%>
<%if current_user_id and cat_show_forums and main_page%>
<a href="gforum.cgi?<%if cat_hidden%>un<%endif%>hide_cat=<%cat_id%>;
<%hidden_query%>" title="<%if cat_hidden%>Expand<%else%>Collapse<%endif%>
this category"><small><%if cat_hidden%>[+]<%else%>[-]<%endif%></small></a>
<%endif%>
<%endif%>


Again you will have to check your users table in the user_hidden_cats field to remove any that are for the forum that you want to force to appear.

I think this is what you are talking about...but your message was a little vague.


Herpeton
VegPeople.com