Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Icon variables, how do I...?

Quote Reply
Icon variables, how do I...?
With locked threads and sticky threads, an extra icon is added. I want this icon to replace the status icon.

How can I do this? Here is the relevant section from the forum_view template:

Code:
<%-- This gives the appropriate Icon and IconAlt variables --%>
<%GForum::Post::status_icon($post_thread_hot, $post_new, $post_replies, $new_replies)%>
<nobr>
<img src="<%image_url%>/<%Icon%>" alt="<%IconAlt%>" title="<%IconAlt%>" border="0" width="13" height="15">
<%if post_locked%>&nbsp;
<img src="<%image_url%>/locked.gif" alt="This thread is locked" border="0" width="11" height="15">
<%GForum::Template::store_gvars(legend_locked => 1)%>
<%endif%>
<%if post_sticky and not post_root_id%>
<font size="-2">&nbsp;</font>
<img src="<%image_url%>/sticky.gif" title="Sticky thread" border="0" width="13" height="15">
<%GForum::Template::store_gvars(legend_sticky => 1)%>
<%endif%>
</nobr>
Quote Reply
Re: [ArmyAirForces] Icon variables, how do I...? In reply to
Just throw "<%if not post_sticky or post_root_id%>" and "<%endif%> around:

Code:
<%-- This gives the appropriate Icon and IconAlt variables --%>
<%GForum::Post::status_icon($post_thread_hot, $post_new, $post_replies, $new_replies)%>
<nobr>
<img src="<%image_url%>/<%Icon%>" alt="<%IconAlt%>" title="<%IconAlt%>" border="0" width="13" height="15">

Then the status icon won't show up for sticky threads. Is that what you're after?

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Post deleted by ArmyAirForces In reply to
Quote Reply
Re: [Jagerman] Icon variables, how do I...? In reply to
Right, I think. What I want is this. When the thread is locked or sticky, I want the locked or sticky icon to be displayed in lieu of the status icon.

Image 1 - as it is now.

Image 2 - what I'd like it to do.

Last edited by:

ArmyAirForces: May 24, 2003, 3:41 PM
Quote Reply
Re: [ArmyAirForces] Icon variables, how do I...? In reply to
That will work. The locked thread icon doesn't get used on our board anyway.

Thanks.
Quote Reply
Re: [ArmyAirForces] Icon variables, how do I...? In reply to
You can simply extend the <%if%> statement around the locked icon part as well, to prevent it from showing up for sticky threads.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com