View Single Post
Old 2008-09-04, 06:10 PM   #4
Twiceshy
You can now put whatever you want in this space :)
 
Twiceshy's Avatar
 
Join Date: Apr 2003
Location: Canada
Posts: 958
Send a message via ICQ to Twiceshy
ok well im still lost i found were to edit but i just cant seem to get HOW to do it here is the code if anyone knows what i need to change or add would be great


Code:
# 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="50%" 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++;
Twiceshy is offline   Reply With Quote