Gossamer Forum
Home : General : Perl Programming :

Modifying $category look in links 2.0 (without CSS)

Quote Reply
Modifying $category look in links 2.0 (without CSS)
Hi,

I've just upgraded from links 1.1 to 2.0, and am using the templates option.

Since I am not too familiar with CSS, I removed the reference to CSS between the <head></head> tags. The Home Page looks o.k, except the $category. Instead of 'verdana, Arial', it displays the default Times New Roman Font!

Also, the category& Subcategory spacing looks a little weird..

It looks like this-->
====================
category
______Sub category1,Sub category2,Sub category3
===================
I'd like to align the subcategories to the left like this -->

category
Sub category1,Sub category2,Sub category3


Can somebody please show me how to modify the look of $category, without using CSS?

Thanks

Joe
Quote Reply
Re: Modifying $category look in links 2.0 (without CSS) In reply to
I posted this many times and nobody helped me with this...

Original:
Code:
# 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>|;
}

Try this modification in the site_html_templates.pl

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">$category_name</a></strong> <small>($numlinks)</small> |;
$output .= qq|<img src="http://www.yourname.com/images/new.gif" width="31" height="11">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<br><span>$description </span>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}

If you are using site_html.pl then do the same modification where it is located in site_html.pl

Hope this helps,
elms

[This message has been edited by elms (edited February 21, 1999).]

[This message has been edited by elms (edited February 21, 1999).]
Quote Reply
Re: Modifying $category look in links 2.0 (without CSS) In reply to
Thanks Elms!

That did the trick! The sub-categories have aligned to the left. Unfortunately, there is now a space <BR> between Categories and Sub-categories. Is there some way of removing the space between them?

Also,Have you managed to change the default font to "Verdana, Arial"? How do I do that?

Half the pages on my site display the Times new roman font now, and half "Verdana,Arial".
Royal mess = Smile

Will be glad if you could help..

Thanks
Joe