Gossamer Forum
Quote Reply
Hmmmmmm
How do i change the Links 2.0 Script so there are no spaces between the categories ?

An example of what i mean is here: http://www.everyone.net/ResourceCenter/index.html

Anyone knows how to modify the code ?
Thanks!
Quote Reply
Re: Hmmmmmm In reply to
Look for the following code line in the sub site_html_print_cat routine in the site_html_templates.pl file:

Code:
$output .= qq|<BR>|;

In the next line you should see two break lines (<br><br> ) in the $description line.

DELETE the <br><br> and there will not be a space between categories.

Wink

Regards,

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




Quote Reply
Re: Hmmmmmm In reply to
Code:

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="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;


I've been searching for the <BR><BR> Code, but it looks like i have another code in the site_html_template.pl file.
Quote Reply
Re: Hmmmmmm In reply to
Oops...Sorry...I have moded my site_html_templates.pl to death. I will try to refer to my original copy before posting advice.

Take out the <dl><dt> tags (definition list). This is what is putting the space between the categories.

Regards,

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




Quote Reply
Re: Hmmmmmm In reply to
Or alter your CSS to change the border-bottom of a definition list... basic HTML.

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)