Gossamer Forum
Home : Products : Links 2.0 : Customization :

Links 2.0 How do I change the "new" & "pop" to graphic images?

Quote Reply
Links 2.0 How do I change the "new" & "pop" to graphic images?
I'm using Links 2.0. How do I change the "new" & "pop" to graphic inages? I want to use the templates in links 2.0. So, I have it set up to use templates in my links.cfg file. By doing so I don't access the site_html.pl and linkd.css files. This way I can use stander HTML and <tags> to make my templates. So how do I change the new and pop text to graphic images now?

------------------
John
Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
Guess you did not use the search feature in this forum.

Wink

You have to edit the sub site_html_print_cat routine in the SITE_HTML_TEMPLATES.PL file. Look for the $new variable in the $output statements.

This where you change it.

You will notice that above this routine it states that at this time there are NO template files for adjusting the look of categories.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
Okay, I checked into it and have no idea how to do it. I don't know alot about CGI programing. But I have set up links and have it running with the recip mod. So if someone can give a little clue to help, plase do so. Here is a copy of the sub site_html_print_cat routine, what do I need to change to do this?:

my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
my ($half) = int (($#subcat+2) / 2);

# Print Header.
$output = qq|<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top">\n|;

foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];

# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];

# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td class="catlist" valign="top">\n|;
}
$i++;

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span class="descript">$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}

# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}

1;


------------------
John
Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
See the following line:

Code:
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) <$db_new_cutoff);

Put the image codes where it says new.

The pop is actually edited in the links.html template file. Where it says pop, put the image in it.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
Someone care to email me a cool Popular and Cool image? i have looked all over...
Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
Here ia a good web site you can find all kins of cool, hot, new, ect... gif pics.http://www.stargazerstudios.com/free.html

John, webmaster of

http://www.classifiederotica.com
Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
I'm following your discussion and like to butt in .. I want to insert image like what john morgan wants ..is this correct?


qq|<small><sup class="new">
<image src="http://meil.virtualave.net/new.gif"></sup></small>| if (&days_old($mod) < $db_new_cutoff);



there is no error and it won't show up also.
Quote Reply
Re: Links 2.0 How do I change the "new" & "pop" to graphic images? In reply to
alwell,

Just a friendly tip...take a HTML tutorial or read HTML for Dummies.

Wink

It is not image but img that you use for image anchors, like the following:

Code:
<img src="http://meil.virtualave.net/new.gif">

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 09, 1999).]