Gossamer Forum
Home : Products : Links 2.0 : Customization :

Problem: MyLinks & Rate Images Mod

Quote Reply
Problem: MyLinks & Rate Images Mod
Hi,

I'm using Links 2.0 (template-based) w/"MyLinks Modification" by Widgetz??? and "Replacing Ratings with a Varying Images" Phoenix Amon and several other mods. I posted this problem a few months ago and tried to fix the problem, but I couldn't cope with it. Although in the category pages the rate images are displayed, this isn't the case in the mylinks pages. So I added this Code:

rate_img => $rate_img,

to all mylinks subs in site_html_templates.pl:

sub site_html_my_home
sub site_html_my_add
sub site_html_my_add_error
sub site_html_my_delete
sub site_html_my_delete_all
sub site_html_my_delete_error
sub site_html_my_link

After the changes the rate images weren't displayed as well. So I added the Code also to the %globals paragraph in the beginning of site_html_templates.pl. Nothing changed.

What can I do so that all rate images are also displayed with MyLinks?

I'm appreciating your answers.

Phil.

Quote Reply
Re: Problem: MyLinks & Rate Images Mod In reply to
Do you have this in the sub display in your mylinks.cgi?

Code:
sub display {
# --------------------------------------------------------
# Creates page for links to be displayed.
#

my (%links, %cat, %rec);
foreach (@c) {
last if ($_ eq "");
%rec = &get_record ($_);
%{$links{$_}} = %rec;
push (@{$cat{$rec{Category}}}, $_);
}

CAT: foreach (sort keys %cat) {
$OUT{links} .= qq~<p>$_
~;
LINK: foreach (@{$cat{$_}}) {
$OUT{links} .= &site_html_bklink (%{$links{$_}});
}
}

my (%links, %cat, %rec);
foreach (@c) {
last if ($_ eq "");
%rec = &get_record ($_);
%{$links{$_}} = %rec;
push (@{$cat{$rec{Category}}}, $_);
}

CAT: foreach (sort keys %cat) {
$OUT{links} .= qq~<p>$_
~;
LINK: foreach (@{$cat{$_}}) {
$OUT{links} .= &site_html_myadd (%{$links{$_}});
}
}

my (%links, %cat, %rec);
foreach (@c) {
last if ($_ eq "");
%rec = &get_record ($_);
%{$links{$_}} = %rec;
push (@{$cat{$rec{Category}}}, $_);
}

CAT: foreach (sort keys %cat) {
$OUT{links} .= qq~<p>$_
~;
LINK: foreach (@{$cat{$_}}) {
$OUT{links} .= &site_html_mydelete (%{$links{$_}});
}
}
Jimmy Crow
http://www.homewithgod.com/