Gossamer Forum
Home : Products : Links 2.0 : Customization :

Graphic bullets

Quote Reply
Graphic bullets
Hi all,

Can anyone give me a pointer on how to go about setting up the category template so that the listings are bulleted with a graphic instead of the standard dot bullet?

I can't find anything relevant by searching the forums.

Thanks,

Thomson.



Quote Reply
Re: Graphic bullets In reply to
Include something like this in your stylesheet (links.css):

UL {
list-style-image: url("http://yourwebsite/bullet.gif");
}

Ivan,
Iyengar Yoga Resources
http://www.iyengar-yoga.com/
Quote Reply
Re: Graphic bullets In reply to
In site_html_templates.pl find;

Code:
$output .= qq|<dl><dt><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
change it to something like;

Code:
$output .= qq|<dl><dt><img BORDER="0" SRC="http://www.location.com/to/image.gif"><strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;
The bold bit needs to be changed to the URL of your bullet / image.

Hope that helps Cool

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Graphic bullets In reply to
Or.....if it is the same image just add it to your link.html

Madonna

Quote Reply
Re: Graphic bullets In reply to
Oh...I'm confused now [cry] Was he meaning the category listings, or the link listings? From the bit saying;

In Reply To:
category template
I was assuming it was the category listing he wanted an image next to. If it was the links he was refering to, then as Madona says, editing link.html would do the job Smile

Sorry if I confused you!

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Graphic bullets In reply to
Thanks for both tips - I ended up putting graphic bullets on both the category titles and the actual listings.

The result is at http://lovelife-books.com/links/pages/ if anyone wants to check it out. It's a work in progress and more of an experiment in using Links than anything else, so ignore the ssi errors etc.

Thanks again, much appreciated :).

Quote Reply
Re: [Andy] Graphic bullets In reply to
Ok, so this really messed things up for me and I don't know how to fix it. A little help anyone?

http://www.highsierratopix.com/directory/

Cheers,

ERIC
Quote Reply
Re: [Topix] Graphic bullets In reply to
In Reply To:
Ok, so this really messed things up for me and I don't know how to fix it. A little help anyone?

http://www.highsierratopix.com/directory/

Cheers,

ERIC


Nevermind... I fixed it. My stupid error... Cool Mod...cheers!
Quote Reply
Re: [Topix] Graphic bullets In reply to
Ok see this and change domain.com to your url it will work in site site_html_template

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="87%" border="0" cellspacing="3" cellpadding="3"><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|<dt><img BORDER="0" SRC="http://www.domian.com/images/catfolder.gif">&nbsp;&nbsp;<strong><a href="$url">$category_name</a></strong> <small>($numlinks)</small> |;
$output .= qq|<img BORDER="0" SRC="http://www.domian.com/images/new.gif">| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
if ($#{$subcategories{$subcat}} >= 0 && $description =~ /^SUB.*/) {
$v = 0;
$sub_length = "";
$output .= qq|<small>|;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) { $subcategory_name = &build_clean($1); }
else { $subcategory_name = &build_clean($subcatsub); }
$sub_length .= qq|, | if ($description =~ /1$/ && $v ne "0");
$sub_length .= qq|$subcategory_name| if ($description =~ /1$/);
if ($description =~ /1$/ && length($sub_length) > $subcat_length) {
$output .= qq|...|;
last;
}
else {
$output .= qq|, | if ($description =~ /1$/ && $v ne "0");
$output .= qq|<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| if ($description =~ /2$/ || $v eq "0");
$output .= qq|&nbsp;&nbsp;| if ($description =~ /2$/);
$output .= qq|<a href="$suburl">$subcategory_name</a>|;
$v++;
}
}
$output .= qq|</small>|;
}
else {
if ($#{$subcategories{$subcat}} >= 0 && $description =~ /^SUB.*/) {
$v = 0;
$sub_length = "";
$output .= qq|<small>|;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) { $subcategory_name = &build_clean($1); }
else { $subcategory_name = &build_clean($subcatsub); }
$sub_length .= qq|, | if ($description =~ /1$/ && $v ne "0");
$sub_length .= qq|$subcategory_name| if ($description =~ /1$/);
if ($description =~ /1$/ && length($sub_length) > $subcat_length) {
$output .= qq|...|;
last;
}
else {
$output .= qq|, | if ($description =~ /1$/ && $v ne "0");
$output .= qq|<br>| if ($description =~ /2$/ || $v eq "0");
$output .= qq|&nbsp;&nbsp;| if ($description =~ /2$/);
$output .= qq|<a href="$suburl">$subcategory_name</a>|;
$v++;
}
}
$output .= qq|</small>|;
}
else {
$output .= qq|<dd><span class="descript">$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
}
}
$output .= qq||;
}
# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}
1;
Megrisoft
Web Hosting Company
India Software Company
SEO Company


Quote Reply
Re: [megri] Graphic bullets In reply to
Hey megri...thanks for the help. Sorry to make you go to the trouble. You might have missed it in my previous post but I already had it fixed. Stupid me, just made a careless mistake like I usually do. Crazy

Cheers anyway,

ERIC