Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page

Quote Reply
Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page In reply to
    

i have try to have a test for the scripts however there is no any links returned. i am not sure what is the problems it is
i am tested with latest version of linksql, however it should worked and been tested before by people.
if it is not worked with latest version of linksql? .

i am stucked now. would any one here light me a bit?

-----------------------
featured.cgi
main();
sub main {
#---------------------------------------------------
#
my $pageNum = $IN->param('nh') || 1;
my $linksPP = 10;
my $start = $linksPP * $pageNum - $linksPP;
$start = ($pageNum < 2) ? 0 : $start;
my ($sth,$tab,$output);
$tab = $DB->table('Links');
$tab->select_options('ORDER BY Title', 'LIMIT ' . $linksPP . ' OFFSET ' . $start);
$sth = $tab->select( { isValidated => 'Yes' } );
my $hits = $tab->hits;
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('8linkfeatured', $rec);
}
my $tags;
$tags->{'paging'}->{'url'} = $CFG->{db_cgi_url} . "/featured.cgi";
$tags->{'paging'}->{'num_hits'} = $hits;
$tags->{'paging'}->{'max_hits'} = $linksPP;
$tags->{'paging'}->{'current_page'} = $pageNum;
$tags->{'output'} = $output;
print $IN->header();
print Links::SiteHTML::display('8featured', $tags);
}


----------------------

8linkfeatured.html
<%if Description%><div class="linkdescription"><%if highlight%><%Links::Tools::highlight($Description, $query)%><%else%><%Description%><%endif%></div><%endif%>


------------------------------------------
8featured.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/...ml1-transitional.dtd">
<html>
<head>
<title><%site_title%>: New Links xx</title>
<%include include_common_head.html%>
</head>
<body id="new">
<p>Here are your matching links:<br><br>

<%loop link_results_loop%>
<a href="<%URL%>"><%Title%></a>: <%Hits%>
<%endloop%>

<p><p><p><p><p>
<p>Here are your matching links:<br><br>

<%loop link_results_loop%>
<tr><td><%include 8linkfeatured.html%></td></tr>
<%endloop%>

</body>
</html>

Last edited by:

courierb: Sep 2, 2007, 10:50 PM
Subject Author Views Date
Thread; hot thread Building a Cool/New-Like Featured/Priority Page Jobu 12753 Aug 26, 2006, 11:03 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12569 Aug 27, 2006, 4:03 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12484 Aug 27, 2006, 5:31 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12508 Aug 27, 2006, 8:45 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12513 Aug 27, 2006, 9:39 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12458 Aug 28, 2006, 6:50 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12492 Aug 28, 2006, 7:00 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12456 Aug 28, 2006, 7:08 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12536 Aug 28, 2006, 7:11 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12462 Aug 28, 2006, 7:17 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12468 Aug 28, 2006, 7:20 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12587 Aug 28, 2006, 7:36 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12430 Aug 28, 2006, 8:26 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12446 Aug 28, 2006, 9:11 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12434 Aug 28, 2006, 9:42 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12441 Aug 28, 2006, 11:30 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12459 Aug 29, 2006, 7:40 AM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12394 Aug 29, 2006, 8:54 AM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12465 Aug 29, 2006, 9:09 AM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12449 Aug 29, 2006, 11:57 AM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12382 Aug 29, 2006, 12:44 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12442 Aug 29, 2006, 5:10 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
fuzzy logic 3552 Aug 29, 2006, 7:22 PM
Thread; hot thread Re: [fuzzy logic] Building a Cool/New-Like Featured/Priority Page
jdgamble 3554 Aug 29, 2006, 7:53 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 3542 Aug 29, 2006, 10:56 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
fuzzy logic 3561 Aug 29, 2006, 11:11 PM
Post; hot thread Re: [fuzzy logic] Building a Cool/New-Like Featured/Priority Page
rascal 3486 Sep 23, 2006, 11:56 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
courierb 3362 Sep 2, 2007, 10:32 PM
Post; hot thread Re: [courierb] Building a Cool/New-Like Featured/Priority Page
courierb 3411 Sep 3, 2007, 12:36 AM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12427 Aug 28, 2006, 8:28 PM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12497 Aug 28, 2006, 7:12 PM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12462 Aug 28, 2006, 7:06 PM