Gossamer Forum
Home : Products : Gossamer Links : Discussions :

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

Quote Reply
Re: [Jobu] Building a Cool/New-Like Featured/Priority Page In reply to
I guess that all depends on how you want it to display. The easiest method I can think of is to use a new perl file (featured.cgi) and include it using SSI; or you could just directly use featured.cgi with something like:

Code:

#!/usr/bin/perl
#================================
use strict;
use lib 'path/to/admin';
use Links qw/$DB $IN/;
Links::init('/path/to/admin');
use Links::SiteHTML;
local $SIG{__DIE__} = \&Links::fatal;
main();

sub main {
#---------------------------------------------------
#

my ($sth,$tab,$output);
$tab = $DB->table('Links');
$tab->select_options('LIMIT 2');
$sth = $tab->select( { isValidated => 'Yes', isFeatured => 'Yes' } );
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $rec);
}
print $IN->header();
print Links::SiteHTML::display('your template name', $output);
}


Hopefully this code will work (I just copied it from other stuff). Limit is how many featured you want to display. Fill in the paths and template names and you should be good to go.

Good Luck!

- Jonathan
Subject Author Views Date
Thread; hot thread Building a Cool/New-Like Featured/Priority Page Jobu 12966 Aug 26, 2006, 11:03 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12781 Aug 27, 2006, 4:03 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12694 Aug 27, 2006, 5:31 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12719 Aug 27, 2006, 8:45 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12723 Aug 27, 2006, 9:39 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12670 Aug 28, 2006, 6:50 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12705 Aug 28, 2006, 7:00 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12669 Aug 28, 2006, 7:08 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12748 Aug 28, 2006, 7:11 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12674 Aug 28, 2006, 7:17 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12680 Aug 28, 2006, 7:20 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12798 Aug 28, 2006, 7:36 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12643 Aug 28, 2006, 8:26 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12657 Aug 28, 2006, 9:11 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12645 Aug 28, 2006, 9:42 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12652 Aug 28, 2006, 11:30 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12670 Aug 29, 2006, 7:40 AM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12604 Aug 29, 2006, 8:54 AM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12675 Aug 29, 2006, 9:09 AM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12660 Aug 29, 2006, 11:57 AM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12593 Aug 29, 2006, 12:44 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
jdgamble 12652 Aug 29, 2006, 5:10 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
fuzzy logic 3620 Aug 29, 2006, 7:22 PM
Thread; hot thread Re: [fuzzy logic] Building a Cool/New-Like Featured/Priority Page
jdgamble 3623 Aug 29, 2006, 7:53 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 3611 Aug 29, 2006, 10:56 PM
Thread; hot thread Re: [Jobu] Building a Cool/New-Like Featured/Priority Page
fuzzy logic 3630 Aug 29, 2006, 11:11 PM
Post; hot thread Re: [fuzzy logic] Building a Cool/New-Like Featured/Priority Page
rascal 3554 Sep 23, 2006, 11:56 PM
Thread; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
courierb 3432 Sep 2, 2007, 10:32 PM
Post; hot thread Re: [courierb] Building a Cool/New-Like Featured/Priority Page
courierb 3479 Sep 3, 2007, 12:36 AM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12639 Aug 28, 2006, 8:28 PM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12709 Aug 28, 2006, 7:12 PM
Post; hot thread Re: [jdgamble] Building a Cool/New-Like Featured/Priority Page
Jobu 12673 Aug 28, 2006, 7:06 PM