Gossamer Forum
Home : Products : Links 2.0 : Customization :

Star Site *

Quote Reply
Star Site *
Hey guys,

I want to be abled to highlight a site at the top of the listings by making the title bold and having a star icon next to it, could you tell me if this is possible and how ?
Like DMOZ use ...

Thanks a lot

JCB
Quote Reply
Re: Star Site * In reply to
It is possible...Use the Priority Logo Mod in the Resource Center...Rather than using a logo, change the font properties on the special star links.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Star Site * In reply to
sorry eliot i dont understand what you mean Frown

I apologize .

Thanks
Quote Reply
Re: Star Site * In reply to
GO to the Resource Center...Download and Install the Priority Logo Link. Then from there, we can help you hack the codes to do what you want.

Click on the Resource Center link. Then search for Priority. Then click on the Priority Logo Mod link in the result page!

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Star Site * In reply to
thanks eliot, I have installed the priority mod ......... sort of .

I recieve a "syntax error" on line 37 near "Graphic" i have checked everything and it all seems fine ?

Sorry im so thick Smile

JAB
Quote Reply
Re: Star Site * In reply to
You have to put a comma at the end of the field line for the field BEFORE the Graphics field in the %db_def hash in the links.def file.

FYI: Anytime you add new fields to your %db_def hash, you need to add commas at the end of the line precedding the new field, like the following:

Code:
ID => [0, 'numer', 5, 8, 1, '', '']
,
Title => [1, 'alpha', 40, 200, 1, '', '']
,
URL => [2, 'alpha', 40, 150, 1, 'http://', '^h
ttp|news|mailto|gopher|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, '']
,
Category => [4, 'alpha', 0, 200, 1, '', '']
,
Graphics => [4, 'alpha', 0, 200, 1, '', '']

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Star Site * In reply to
============================================
=My Ratings amazon-image-style (Five stars)=
============================================

- My Ratings amazon-image-style mod (Five stars)(no-templates)
Author : Eduin Yesid Carrillo (yecarrillo@hotmail.com)
URL : http://www.scoutsace.f2s.com/scripts
Thread : http://www.gossamer-threads.com/...um3/HTML/003069.html

- Thanks to:
widgetz : original mod :Ratings amazon-image-style

=====================================================
links/cgi-bin/admin/links.cfg
=====================================================
Change the following codes:

Code:
# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/ratings";
$build_ratings_url = "$build_root_url/ratings";
to the following(change "$build_root_url/images" to the proper
location of where your images will be):

Code:
# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/ratings";
$build_ratings_url = "$build_root_url/ratings";
$build_ratings_images_url = "$build_root_url/images";
=====================================================
links/cgi-bin/admin/site_html.pl
=====================================================

Add this to the end of site_html.pl just before
1; line.
Change the width and the height to the size yours is going to be..

Code:
##########################################################
## Ratings amazon-image-style
##########################################################

sub get_rating_image {
# --------------------------------------------------------
# My Ratings amazon-image-style mod (Five stars)(no-templates)
# Author : Eduin Yesid Carrillo (yecarrillo@hotmail.com)
#
my ($rating,$img) = @_;

my $img1 = int($rating/2);
my $img2 = $img1 + 1;

if ($img1 - ($rating/2) == 0 ) { $img = "$img1"; }
else { $img = "$img1-$img2";}

my $image = qq~<img src="$build_ratings_images_url/rate-$img.gif" width=65 height=12 alt="$rating" border="0">~;

return $image;
}
---------------------------------
FIND THIS AT sub site_html_link SUB:
---------------------------------

Code:
$build_detailed ?
($output = qq~<ul><li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<ul><li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);

if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <small><sup class="new">new</sup></small>~; }
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <small><sup class="pop">pop</sup></small>~; }

$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Rating: $rec{'Rating'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
</ul>
~;
Replace it with:

Code:
$rate_img = (&get_rating_image($rec{'Rating'}));

if ($rec{'isPopular'} eq "Yes") {
$build_detailed ?
($output = qq~<li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension"><strong>$rec{'Title'}</strong></a>~) :
($output = qq~<li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}"><strong>$rec{'Title'}</strong></a>~);
}
else {
$build_detailed ?
($output = qq~<li><a class="link" href="$build_detail_url/$rec{$db_key}$build_extension">$rec{'Title'}</a>~) :
($output = qq~<li><a class="link" href="$build_jump_url?$db_key=$rec{$db_key}">$rec{'Title'}</a>~);
}
if ($rec{'isPopular'} eq "Yes") { $output .= qq~ <img src="$build_ratings_images_url/pop.gif" alt="Popular">~; }
if ($rec{'isNew'} eq "Yes") { $output .= qq~ <img src="$build_ratings_images_url/new.gif" alt="New">~; }
if ($rec{'Rating'} ne 0) { $output .= qq~ $rate_img~; }
if ($rec{'Description'}) { $output .= qq~ <span class="descript">- $rec{'Description'}</span>\n~; }

$output .= qq~ <small class="date">(Added: $rec{'Date'} Hits: $rec{'Hits'} Votes: $rec{'Votes'}) <a href="$build_rate_url?ID=$rec{'ID'}">Rate It</a></small>
~;
if ($in{'query'} ||
$in{'Votes'} ||
$in{'Rating'} ||
$in{'Hits'} ) { $output .= qq~
<small><i>-- $rec{'URL'} ~;
$linkcat = $rec{'Category'};
$linkcat =~ s/\//: /g;
$output .= qq~<a href="$build_root_url/$rec{'Category'}">$linkcat</a></i></small><p>\n~;
}
You will need to rename your images to

rate-1.gif
rate-1-2.gif
rate-2.gif
rate-2-3.gif
rate-3.gif
rate-3-4.gif
rate-4.gif
rate-4-5.gif
rate-5.gif
pop.gif
new.gif

ok.. that's all.