Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [iplay] Importing to Links from DBMan SQL??

Quote Reply
Re: [iplay] Importing to Links from DBMan SQL?? In reply to
Hi,

That one would simply show a link to the detailed page. It wouldn't be hard to tweak it to actually grab the title as well though: (untested Wink)

Code:
sub {

my ($yyyy,$mm,$dd) = split /\-/, GT::Date::date_get();

my @week_nums;
$week_nums[0] = undef; # should really start here - but thought it would be crearer like this :)
$week_nums[1] = 12343;
$week_nums[2] = 12343;
$week_nums[3] = 12343;
$week_nums[4] = 12343;
$week_nums[5] = 12343;
$week_nums[6] = 12343;
$week_nums[7] = 12343;
$week_nums[8] = 12343;
$week_nums[9] = 12343;
$week_nums[10] = 12343;
$week_nums[11] = 12343;
$week_nums[12] = 12343;
$week_nums[13] = 12343;
$week_nums[14] = 12343;
$week_nums[15] = 12343;
$week_nums[16] = 12343;
$week_nums[17] = 12343;
$week_nums[18] = 12343;
$week_nums[19] = 12343;
$week_nums[20] = 12343;
$week_nums[21] = 12343;
$week_nums[22] = 12343;
$week_nums[23] = 12343;
$week_nums[24] = 12343;
$week_nums[25] = 12343;
$week_nums[26] = 12343;
$week_nums[27] = 12343;
$week_nums[28] = 12343;
$week_nums[29] = 12343;
$week_nums[30] = 12343;
$week_nums[31] = 12343;
$week_nums[32] = 12343;
$week_nums[33] = 12343;
$week_nums[34] = 12343;
$week_nums[35] = 12343;
$week_nums[36] = 12343;
$week_nums[37] = 12343;
$week_nums[38] = 12343;
$week_nums[39] = 12343;
$week_nums[40] = 12343;
$week_nums[41] = 12343;
$week_nums[42] = 12343;
$week_nums[43] = 12343;
$week_nums[44] = 12343;
$week_nums[45] = 12343;
$week_nums[46] = 12343;
$week_nums[47] = 12343;
$week_nums[48] = 12343;
$week_nums[49] = 12343;
$week_nums[50] = 12343;
$week_nums[51] = 12343;
$week_nums[52] = 12343;

use Date::Calc;
my ($week_num,$year) = Week_of_Year($yyyy,$mm,$dd);

my $rec = $DB->table('Links')->get( { ID => $week_nums[$week_num] } ) || {};
$rec->{detailed_url} = $CFG->{build_detail_url} . "/Detailed/" . $DB->table('Links')->detailed_url( $hit->{ID} );

return { 'this_week' => $rec };

}

Then call with:

Code:
<%get_this_week_detailed_page%>
This week "<a href="<%this_week.detailed_url%>"><%this_week.Title%></a>" happened... <%this_week.Description%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Importing to Links from DBMan SQL?? iplay 8277 May 30, 2011, 4:30 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 8120 May 30, 2011, 5:09 AM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 8065 May 30, 2011, 7:02 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 8053 May 30, 2011, 8:07 AM
Post Re: [Andy] Importing to Links from DBMan SQL??
iplay 8082 May 30, 2011, 8:11 AM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 7955 Jun 3, 2011, 1:32 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 7937 Jun 3, 2011, 1:53 AM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 7939 Jun 3, 2011, 9:25 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 8000 Jun 3, 2011, 9:44 AM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 7944 Jun 3, 2011, 10:03 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 7952 Jun 3, 2011, 10:31 AM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 7955 Jun 3, 2011, 11:28 AM
Thread Re: [iplay] Importing to Links from DBMan SQL??
Andy 7904 Jun 3, 2011, 11:56 PM
Thread Re: [Andy] Importing to Links from DBMan SQL??
iplay 7949 Jun 4, 2011, 12:26 AM
Post Re: [iplay] Importing to Links from DBMan SQL??
Andy 7977 Jun 4, 2011, 12:49 AM