Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Different User Colors

Quote Reply
Different User Colors
Hi,

I'd like to give Moderators a different color in the sidebar and everywhere where their Names show (most recent post, user list, moderator list etc.) I've already managed to change the color on the sidebar but everything there is in a different color now.. (Date, number of times read.. etc.).

Can anyone please tell me how i can change only the color of the name- not the info- and how I can change moderator colors globally?


Thanks,

Mike
Quote Reply
Re: [Acoisa] Different User Colors In reply to
Not sure how you're doing this, but it sounds like you didn't close a tag properly if it's changing the colours of everything. Maybe if you posted your changes we could see what's wrong.

Adrian
Quote Reply
Re: [brewt] Different User Colors In reply to
Hi Adrian,

here is the piece of code I changed:

user_status%>username=<%escape_url user_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
<big><%nbsp post_username%></big>
</a>
<%else%>
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
<big><%nbsp post_username%></big>
<%endif%>
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
</b>
<br>
<%user_title%>
<%if post_user_is_moderator%>
Moderator
<%endif%>
<br>
<%if post_anonymous_email%>
<a href="mailto:<%post_anonymous_email%>"><%post_anonymous_email%></a>
<br>
<%endif%>

Last edited by:

Acoisa: Mar 22, 2009, 12:22 AM
Quote Reply
Re: [Acoisa] Different User Colors In reply to
After the last line - please try adding:

</font>

You just don't seem to have closed it =) (although its hard without seeing the whole template)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Different User Colors In reply to
Hi Andy,

unfortunately that didn't work..

here is the whole template: I took out the </font> again..

<%--

File
====
include_post_display.html

Description
===========
Every time a post is displayed (including a preview or
delete confirmation) this page will be used to format the
post.

If change this page, you'll probably also want to make the
equivelant changes in the "default_top" template set.

--%>
<%if preview%><%body_font%><b><i>Vorschau:</i></b><%/body_font%><%endif%>
<%unless preview%><a name="<%post_id%>"></a><%endunless%>
<table border="0" cellspacing="0" cellpadding="4" width="100%"<%unless printing%> bgcolor="<%odd_color%>"<%endif%> style="border: 1px solid <%if printing%>black<%else%><%dark_beige%><%endif%>">
<tr>
<td valign="top" width="180"<%unless printing%> bgcolor="<%light_beige%>"<%endif%>>
<img src="<%image_url%>/clear_shim.gif" width="180" height="1"><br>
<%body_font%><small>
<b>
<%if user_id%>
<a href="gforum.cgi?<%if user_status%>username=<%escape_url user_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
<big><%nbsp post_username%></big>
</a>
<%else%>
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
<big><%nbsp post_username%></big>
<%endif%>
<%if post_user_is_moderator%>
<%moderator_font%>
<%endif%>
<%if user_status eq 3%>
<%administrator_font%>
<%endif%>
</b>
<br>
<%user_title%>
<%if post_user_is_moderator%>
Moderator
<%endif%>
<br>
<%if post_anonymous_email%>
<a href="mailto:<%post_anonymous_email%>"><%post_anonymous_email%></a>
<br>
<%endif%>

<%if user_icon%><%if not current_user_id or current_user_show_user_icons%>
<%-- The person viewing this page is either a guest or hasn't turned off viewing user icons --%>
<%GForum::User::icon_dimensions($user_icon)%>
<img src="<%image_url%>/<%user_icon%>" border=0 width="<%icon_width%>" height="<%icon_height%>"><br>
<%endif%><%endif%>
<br>
<%nbsp post_date%>
<br><br>
<%if this_do eq post_view_flat%>
Beitrag #<%post_num%> von <%num_posts%><br>
<%endif%>

<%if post_views or post_views eq 0%>
<% if this_do eq post_view_flat%>
(<%post_views%> mal gelesen)
<% else%>
<br>gelesen: <%post_views%>
<% endif%>
<%endif%>
<br>
<%if this_do eq post_view_threaded or this_do eq post_view_flat%><%if is_ie and ie_version >= 4%>
<a href="javascript: postShortcut(<%post_id%>)">URL zum Beitrag kopieren</a>
<br>
<%else%>
<a href="<%cgi_root_url%>/gforum.cgi?post=<%post_id%>#<%post_id%>">URL zum Beitrag kopieren</a>
<br>
<%endif%><%endif%>

<%-- Moderator/Administrator functionality --%>
<%if user_perm_moderator and not preview and not deleteview and not hide_post_menu%>
<hr width="100%" color="<%unless printing%><%dark_beige%><%endif%>">
IP:
<%post_ip%><br>
Sperrung:<br>
<a href="gforum.cgi?do=forum_ban_write;forum=<%forum_id%>;ban_type=user_id_fk;ban_value=<%user_id%>;ban_username=<%escape_url user_username%>;<%hidden_query%>">Benutzer</a>
|
<a href="gforum.cgi?do=forum_ban_write;forum=<%forum_id%>;ban_type=ban_ip;ban_value=<%post_ip%>;<%hidden_query%>">IP</a>
<% if current_user_status = 3%><%-- An administrator --%>
|
<a href="gforum.cgi?do=ban_ip;redo=<%this_do%>;post=<%post_id%>;so=<%so%>;sb=<%sb%>;ip=<%post_ip%>;<%hidden_query%>">Website IP</a>
<br>
Sperrung:<br>
<a href="gforum.cgi?do=disable_user;redo=<%this_do%>;post=<%post_id%>;so=<%so%>;sb=<%sb%>;user_id=<%user_id%>;<%hidden_query%>">Benutzer</a>
<% endif%>
<br>
Thema:<br>
<%if post_keep%>
<a href="gforum.cgi?do=post_unkeep;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">Unkeep</a> |
<%else%>
<a href="gforum.cgi?do=post_keep;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">Keep</a> |
<%endif%>
<%if post_locked%>
<a href="gforum.cgi?do=post_unlock;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">freigeben</a> |
<%else%>
<a href="gforum.cgi?do=post_lock;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">sperren</a>
<%endif%>
<br>
Thema:
<a href="gforum.cgi?do=post_move_select;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">verschieben</a> |
<%if post_sticky%>
<a href="gforum.cgi?do=post_unstick;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">Unstick</a>
<%else%>
<a href="gforum.cgi?do=post_stick;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;root_id=<%if post_root_id%><%post_root_id%><%else%><%post_id%><%endif%>;post=<%post_id%>;<%hidden_query%>">Stick</a>
<%endif%>

<%if post_root_id%>
<br>
Beitrag:<br>
<a href="gforum.cgi?do=post_detach_select;redo=<%this_do%>;so=<%so%>;sb=<%sb%>;post_id=<%post_id%>;<%hidden_query%>">l&ouml;sen und verschieben</a>
<%endif%>

<%endif%>
<%/body_font%>
</td>
<td valign="top" width="100%" style="border-left: 1px solid <%if printing%>black<%else%><%dark_beige%><%endif%>">
<table border=0 width="100%">
<tr>
<td valign="top" align="left">
<%body_font%>
<%if post_locked%>
&nbsp;&nbsp;<img src="<%image_url%>/locked.gif" border=0>&nbsp;&nbsp;
<%endif%>
<b>
<%if post_deleted and user_perm_moderator%>
Beitrag wurde von <%post_deleted_by%> gel&ouml;scht: <%if post_icon%><img src="<%image_url%>/<%post_icon%>" align=absmiddle><%endif%> <%post_subject%>
<%elsif post_deleted%>
Beitrag wurde von <%post_deleted_by%> gel&ouml;scht.
<%else%>
<%if post_icon%><img src="<%image_url%>/<%post_icon%>" align=absmiddle><%endif%>
<%if post_moved%>verschoben:<%endif%>
<%post_subject%>
<%if post_new%><font color=red> - NEU</font><%endif%>
<%endif%>
</b>
<%if not preview and not deleteview and not hide_post_menu and post_father_id%>
[<small><a href="<%ifnot post_father_on_page%>gforum.cgi?do=<%this_do%>;post=<%post_father_id%>;so=<%so%>;sb=<%sb%>;<%hidden_query%><%endifnot%>#<%post_father_id%>">Antwort auf</a></small>]
<%endif%>
<%if post_keep and user_perm_moderator%>
<br><small>(Dieser Beitrag wird nicht gel&ouml;scht, wenn Sie &auml;ltere Beitr&auml;ge l&ouml;schen.)<br></small>
<%endif%>
<%/body_font%>
</td>
<td valign="top" align="right">
<%body_font%><b>
<%GForum::GUI::draw(
draw => post_display_options,
separator => " | ",
edit => "&auml;ndern",
delete => "l&ouml;schen",
cant_post => "Hier d&uuml;rfen Sie keine Beitr&auml;ge verfassen.",
quote => "zitieren",
reply => "antworten",
a_attribs => ""
)%>
</b><%/body_font%>
</td>
</tr>
<tr><td colspan=2><hr size=1></td></tr>
</table>
<%body_font%>
<%if post_deleted and not user_perm_moderator%>
&nbsp;
<%elsif post_deleted%><%-- a moderator --%>
<small>(Dieser Beitrag wurde von <%post_deleted_by%><%if post_deleted_time%> am <%post_deleted_date%><%endif%> gel&ouml;scht)<br></small>
<%post_message%>
<% if post_last_edit_username%>
<small>(Dieser Beitrag wurde von <%post_last_edit_username%> am <%post_last_edit_date%> <a href="gforum.cgi?do=post_editlog;post=<%post_id%>;<%hidden_query%>">ge&auml;ndert</a>)<br></small>
<% endif%>
<%elsif post_moved%><%-- An empty record of the moved post --%>
Beitrag verschoben: <a href="gforum.cgi?post=<%post_moved_id%>;<%hidden_query%>">ursprünglicher Beitrag hier</a>.
<%else%>
<%post_message%>
<% if post_last_edit_username%>
<small><br><br>(Dieser Beitrag wurde von <%post_last_edit_username%> am <%post_last_edit_date%> <a href="gforum.cgi?do=post_editlog;post=<%post_id%>;<%hidden_query%>">ge&auml;ndert</a>)<br></small>
<% endif%>
<%endif%>
<%/body_font%>
</td>
</tr>
<%loop post_attachments%>
<%if postatt_inline%><%if forum_attachment_inline or not forum_id%><%nextloop%><%endif%><%endif%>
<tr<%unless printing%> bgcolor="<%medium_beige%>"<%endif%>>
<td align=right style="border-top: 1px solid <%dark_beige%>">
<%if first%>
<%body_font%>Attachments:<%/body_font%>
<%else%>
&nbsp;
<%endif%>
</td>
<td valign="top" style="border-top: 1px solid <%dark_beige%>">
<%body_font%>
<a href="gforum.cgi?do=post_attachment;postatt_id=<%postatt_id%>;<%hidden_query%>">
<img src="<%GForum::Attachment::icon($postatt_content, $postatt_filename)%>" border=0>
<%postatt_filename%>
</a>
(<%GForum::Attachment::friendly_size($postatt_size)%>)
<%/body_font%>
</td>
</tr>
<%endloop%>
</table>




Mike
Quote Reply
Re: [Acoisa] Different User Colors In reply to
Hi,

Could you please email it to me - as its hard to even work out whats going on where , when its all non-indented Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Different User Colors In reply to
Hey Andy.. basically it' supposed to look like your name on the left .. Thanks for your help!
Quote Reply
Re: [Acoisa] Different User Colors In reply to
Ya, thats cos its done via an <a href, so simply putting <font color=""> around the title, doesn't work (cos it gets overwritten by the link factor).

Adding in a "class", like:

Code:
<a <%if user_status eq 3%>class="administrator"<%elsif post_user_is_moderator%>class="moderator"<%endif%> href="gforum.cgi?<%if user_status%>username=<%escape_url user_username%><%else%>user=<%user_id%><%endif%>;<%hidden_query%>">

..and then adding this to include_css.html, adding:


Code:
.administrator a:link, .administrator a:visited, .administrator a:hover, .administrator a:active {
color: red;
}

.moderator a:link, .moderator a:visited, .moderator a:hover, .moderator a:active {
color: green;
}

..and that should work fine Cool

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!