Gossamer Forum
Home : Products : Links 2.0 : Customization :

image ahead of the link (priority links)

Quote Reply
image ahead of the link (priority links)
I think itīs a very simple question - I want to display the images of the priority mod ahead of the link.
I use site_html.pl and I donīt know where I have to insert the priority image code.

here you can see how I added the priority code in site_html.pl. The image appears after the link. But
how can change this so that the image will be ahead of the link?

sub site_html_link {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like. It's a little complex looking just because we have to
# check for blank entries..

my (%rec) = @_;
if ($imcool) {
$linkurl = $rec{'URL'};
}
else {
$linkurl = "$build_jump_url?$db_key=$rec{$db_key}";
}
$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="$linkurl">$rec{'Title'}</a>~);

#***** Priority Image Code ********
if ($rec{'Priority'} eq "Yes") {
$output .= qq~
<a href="$build_jump_url?$db_key=$rec{'ID'}">
<img src="$build_root_url/image/$rec{'Graphic'}"width="$rec{'Gwidth'}" height="$rec{'Gheight'}" alt="$rec{'Title'}" border="0"></a>~; }
#****** Priority Image Code End ******

if ($rec{'Description'}) { $output .= qq~
$rec{'Description'}\n~; }

$output .= qq~
</ul>
~;

return $output;
}

Quote Reply
Re: image ahead of the link (priority links) In reply to
I've never used site_html.pl but can't it be solved just by put the priority code nearer the top of the sub and putting in a line break like this:


my (%rec) = @_;
#***** Priority Image Code ********
if ($rec{'Priority'} eq "Yes") {
$output .= qq~
<a href="$build_jump_url?$db_key=$rec{'ID'}">
<img src="$build_root_url/image/$rec{'Graphic'}"width="$rec{'Gwidth'}" height="$rec{'Gheight'}" alt="$rec{'Title'}" border="0"></a>
~; }
#****** Priority Image Code End ******
if ($imcool) {
$linkurl = $rec{'URL'};
}
else {
$linkurl = "$build_jump_url?$db_key=$rec{$db_key}";
}
$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="$linkurl">$rec{'Title'}</a>~);
if ($rec{'Description'}) { $output .= qq~
$rec{'Description'}\n~; }

$output .= qq~
</ul>
~;

return $output;
}


Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: image ahead of the link (priority links) In reply to
Glenn, I thought the same but this is not the solution - it doesnīt work !

Who is an expert with site_html.pl and can help?