Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Font & Caracter

Quote Reply
Font & Caracter
Hi,
How can I change the fonts of the category list in the home template and in the category template?

I like Arial 1 Bold.

Thanks

Mikol

Mikol
Quote Reply
Re: Font & Caracter In reply to
Edit the HTML codes in the $output statements in the sub site_html_print_cat in the site_html_templates.pl file.

Please search the forum more carefully next time as this has been discussed and addressed many times in this forum.

Regards,

Eliot Lee
Quote Reply
Re: Font & Caracter In reply to
Thanks!,

the configuration of my Links 2.0 is templates based.

The lines of "sub site_html_print_cat" section of thr "site_html_templates. pl" file, "IT'S NOT TEMPLATE BASED (YET)!".




Mikol

Mikol
Quote Reply
Re: Font & Caracter In reply to
and...? You still have to edit that subroutine. I'm not sure why Alex didn't make it templated. I posted a mod a while back for this:
http://www.camelsoup.com/links_mods/cat_link/

Happy coding,

--Drew
http://www.camelsoup.com/links_mods/
Quote Reply
Re: Font & Caracter In reply to
Hallo again!
excuse me, but I don't know where I post the category fonts and size.

This is the section "sub site_html_print_cat" of my html_tenplate.pl file.


########################################################################################
# THE FOLLOWING DETERMINES YOUR CATEGORY LISTING, IT'S NOT TEMPLATE BASED (YET)! #
########################################################################################

sub site_html_print_cat {
# --------------------------------------------------------
# This routine determines how the list of categories will look.
# We now use a table to split the category name up into two columns.
# For each category you can use the following variables:
#
# $url : The URL to go to that category
# $category_name : The category name with _ and / removed.
# $category_descriptions{$subcat}: The category description (if any).
# $numlinks : The number of links inside that category (and subcategories).
# $mod : The newest link inside of that category.
#

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="20" 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> |;
my $days_old = &days_old($mod);
if ($days_old <= 2) { $output .= qq| $new_1|; }
elsif ($days_old <= 7) { $output .= qq| $new_3|; }
elsif ($days_old <= 14) { $output .= qq| $new_7|; }
$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;

----------------
Thanks

Mikol

Mikol
Quote Reply
Re: Font & Caracter In reply to
The HTML is there plain as day, just look for it in the $output variable.

Happy coding,

--Drew
http://www.camelsoup.com/links_mods/
Quote Reply
Re: Font & Caracter In reply to
I agree...knowing HTML is the foundation of developing dynamic/interactive web applications. If you don't know HTML, I would suggest buying HTML for Dummies.

And if you can't figure it out...search this forum for sub site_html_print_cat using the following search criteria:

Forum: Links 2.0 Customization
Keywords: sub site_html_print_cat
Options: And
Date Range: All posts
Hits: 250

and you will find MANY other threads where this issue has been discussed before!

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Font & Caracter In reply to
Eliot, I like this quote I found at perl.com a while ago:
In Reply To:
No, I'm not going to explain it. If you can't figure it out, you didn't
want to know anyway... :-)
-- Larry Wall in <1991Aug7.180856.2854@netlabs.com>
Happy coding,

--Drew
http://www.camelsoup.com/links_mods/