Gossamer Forum
Quote Reply
Webmasters Choice
Andy,

do you have a plugin that could be used as - or indeed is, a 'webmasters choice' link. Similar in operation to the very good "top weekly link" plugin you have - except I get to insert the link.

The purpose would be to make popular any site that say, I liked or offer a link to a deserving soul.

Thanks Mate.
Quote Reply
Re: [Gypsypup] Webmasters Choice In reply to
You could add another field to the links, say;

Name: IsFaveAdmin
Type: INT

Form Type: SELECT
DB values : 1 and 0
Form Values: Yes and No

Then, have a global like;

Code:
sub {

my $table = $DB->table('Links');
$table->select_options('LIMIT 1');
my $sth = $table->select( { IsFaveAdmin => 1 } );

while (my $hit= $sth->fetchrow_hashref) {
return Links::SiteHTML::display('link', $hit);
}

}

Then just call it with <%global_name%>

The only limitation of doing it this way, is that you may by accident assign 2 links as your favorites. This obviously will only show one of the links.

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!
Quote Reply
Re: [Andy] Webmasters Choice In reply to
Thanks for that mate..

Now, where exactly would I put the selecected link - directly into the database?

And congrats to the Poms for an exccellent win in the Rugby World Cup. Sydney (where I live) was alive on the Sunday and I really have never seen this city universally buzzing with so much good humor. I have not met one Australian who (in reality) believed that the English did not thoroughly deserve the win. Australians have a passion for beating the English at every sport, the sport to us is not in the game, it is in beating the English. So well done.
Quote Reply
Re: [Gypsypup] Webmasters Choice In reply to
Quote:
Now, where exactly would I put the selecected link - directly into the database?

You need to find the link you want to set as a favorite, and change 'IsFaveAdmin' to 'Yes'. Then, when this global runs, it will return the link you set 'IsFaveAdmin' to 'Yes' on.

Quote:
And congrats to the Poms for an exccellent win in the Rugby World Cup. Sydney (where I live) was alive on the Sunday and I really have never seen this city universally buzzing with so much good humor.

Yeah, it was definatly a nail biter Unimpressed

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!