Gossamer Forum
Home : Products : Links 2.0 : Discussions :

New/Pop Graphics

Quote Reply
New/Pop Graphics
I'm using a modified version of Alex's templates. On the link.html page there is a new/pop text that gets added based upon system variables. My question is as follows. Is it possible to add graphics for new/pop instead of the text? If so, how can this be done?
Quote Reply
Re: New/Pop Graphics In reply to
This one should be easy. In site_html_templates.pl, at almost the bottom of the document you would fine"
Code:
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a href="$url"><font face=Arial,helvetica>$category_name</font></a></strong> <small>($numlinks)</small> |;
$output .= qq|<small><sup>new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<BR><span><font face=Arial,Helvetica color=#000000 size=-2>$description </font></span>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
Where it says:
Code:
$output .= qq|<small><sup>new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
you change
Code:
<small><sup>new</sup></small>
to the HTML for a graphic instead. Then whenever there is a new link in a category, it will display the graphic. Not I did not provide instructions for changeing the POP text into a graphic becuase there in no Popular categories. You can follow basically the same routine for adding the new and popular graphics to the links.html template file.

------------------
Quote Reply
Re: New/Pop Graphics In reply to
Jimz,

Thank you, I didn't realize that it was such an easy mod!