hi every one.
I need some help with my global.
I working well in the 2.x versions, but in 3. are now.
there is a listing:
global:
Random_Link2
sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = $tags->{Random_CatID};
my $limit = $tags->{Random_Limit} || 15;
my (@output, $sth); $link_db->select_options ('ORDER BY Rating DESC', "LIMIT $limit");
if ($cat_id) {
$sth = $link_db->select ( { CategoryID => $cat_id });
}
else {
$sth = $link_db->select;
}
while (my $hash = $sth->fetchrow_hashref)
{ push @output, $hash;
}
return { Random_Loop => \@output } }
template code:
<%if FatherID eq '175'%>
<%set Random_CatID = 175%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a> <br>
<%endloop%>
<%elseif FatherID eq '1'%>
<%set Random_CatID = 1%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a> <br>
<%endloop%><%endif%>
as I mentioned, its worked well in the past versions of Links, but wount to work in the 3.
please help to fix it.
I need some help with my global.
I working well in the 2.x versions, but in 3. are now.
there is a listing:
global:
Random_Link2
sub {
my $tags = shift;
my $link_db = $DB->table('Links','CatLinks');
my $cat_id = $tags->{Random_CatID};
my $limit = $tags->{Random_Limit} || 15;
my (@output, $sth); $link_db->select_options ('ORDER BY Rating DESC', "LIMIT $limit");
if ($cat_id) {
$sth = $link_db->select ( { CategoryID => $cat_id });
}
else {
$sth = $link_db->select;
}
while (my $hash = $sth->fetchrow_hashref)
{ push @output, $hash;
}
return { Random_Loop => \@output } }
template code:
<%if FatherID eq '175'%>
<%set Random_CatID = 175%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a> <br>
<%endloop%>
<%elseif FatherID eq '1'%>
<%set Random_CatID = 1%>
<%Random_Link2%>
<%loop Random_Loop%>
<li></li>
<a target="_self" href="<%get_detailled_url($ID)%>">
<font font class=fixed face=arial,helvetica,sans-serif size=-1>
<%Title%></a> <br>
<%endloop%><%endif%>
as I mentioned, its worked well in the past versions of Links, but wount to work in the 3.
please help to fix it.