Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Category meta-tag generator - freebie =)

Quote Reply
Category meta-tag generator - freebie =)
Hi,

This script lets you create meta_keywords and meta_descriptions for your categories.

Simply upload, and run via SSH with:

Code:
cd /path/to/admin
perl meta_tags.cgi

If you want to add extra keywords, appart from the "split up" Full_Name, then you can change:

Code:
my $meta_keywords = join(",",@meta_keywords);

..to:

Code:
my $meta_keywords = qq|your,keywords,can,go here,| . join(",",@meta_keywords);

Enjoy =)

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] Category meta-tag generator - freebie =) In reply to
Nice :)

Pity it overwrites existing content, but still cool

Does it work with older versions of Links SQL?
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Category meta-tag generator - freebie =) In reply to
Hi,

Yeah, this one was designed for a new database, so we didn't have any existing values -=)

A quick fix would be to change:

Code:
while (my $hit = $sth->fetchrow_hashref) {

my $full_name = $hit->{Full_Name};
my $name = $hit->{Name};


..change to:
Code:
while (my $hit = $sth->fetchrow_hashref) {

if ($hit->{Meta_Keywords} || $hit->{Meta_Description}) {
print qq|$hit->{Full_Name} already seems to have a value for either/or Meta_Description and Meta_Keywords \n|;
}


my $full_name = $hit->{Full_Name};
my $name = $hit->{Name};

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!