Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

A cool Tip for show moderator in category list

Quote Reply
A cool Tip for show moderator in category list
For thoses user that want show the moderator list in the category list, here i show a tip to display the moderators list in a displayed list. I achieve this editing the category_list.html template:

1) First, include the javascript below the </head> tag, first lines of the template:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

2) uncomment when you find this code (you can follow the instruction tags inside the template)

<%top_row_font%>
Moderador/es
<%/top_row_font%>

3) Change colspan to 5 (is 4 by default) when you fins this code: (also, following the instrucion tags insede the template)

<td colspan=5 bgcolor="<%GForum::Utils::alternation(everything => $odd_color, $even_color)%>" style="border-bottom: <%dark_beige%> 1px solid">

4) Find this code:

<%-- The actual moderator cell - uncomment if you want to show the moderator list. Also, you might do well to add: style="border-right:1px solid <%dark_beige%>" to the "last post" columns
<td valign=top>
<%body_font%>
<%GForum::Forum::moderators($forum_id)%>
<% if forum_num_moderators%>
<% loop forum_moderators%>
<a href="gforum.cgi?username=<%GT::CGI::escape($user_username)%>;<%hidden_query%>"><%nbsp user_username%></a><%unless last%>,<%endunless%>
<% endloop%>
<% else%>
No moderators
<% endif%>
<%/body_font%>
</td>
--%>

5) uncomment it and replace for this code:

<%-- The actual moderator cell - uncomment if you want to show the moderator list. Also, you might do well to add: style="border-right:1px solid <%dark_beige%>" to the "last post" columns--%>
<td border="0" cellspacing="0" valign=middle align="center">
<%body_font%>
<%GForum::Forum::moderators($forum_id)%>
<%if forum_num_moderators%>
<form name="form1" method="post" action="">
<div align="center">
<table width="0%" border="0" align="center" cellpadding="0" cellspacing="0" valign=middle>
<tr>
<td><img src="<%image_url%>/moderadores.gif" alt="Moderators"></td>
<td><select name="select" onChange="MM_jumpMenu('parent',this,0)" size="1" class="button">
<option selected>Moderators</option>
<option>...........</option>
<%loop forum_moderators%>
<option value="gforum.cgi?username=<%nbsp user_username%>">
<%nbsp user_username%>
</option>
<%endloop%>
</select></td></tr></table></div>
</form>
<%else%>No Moderator<%endif%>
<%/body_font%>

I put my image as attachment if you want use this, or simply replace it with another image of your choice.

An example about this you can see in this url (not always on line, and a spanish test) http://acido.d2g.com/...nidad/cgi/gforum.cgi
Is my test installation.

Well... i dont know if i was clear, but i wanted return some what i receive in this forum.
This work perfectly for me (after a long test) and as you can see i'm not so skilled in html edition... Hope it is so usefull as it was for me Wink. Ask me anything about this.




http://www.webconferencia.net/
Subject Author Views Date
Thread A cool Tip for show moderator in category list webconferencia 1961 Aug 31, 2002, 7:37 AM
Post Re: [webconferencia] A cool Tip for show moderator in category list
hoefti 1763 Oct 23, 2003, 11:34 PM