Gossamer Forum
Quote Reply
Plugin Idea
Automated meta tagging by category.

Here is the idea as a step by step:

1. Create the category
2. Populate it with links
3. Run internal plugin that pulls all keywords from the titles and inserts it into the keyword section on the category file.


Sounds easy but I know it isn't.



Any thoughts?
Quote Reply
Re: [Teambldr] Plugin Idea In reply to
Hmmm, if no-one writes this for you... I might stick something similar in the tools plug-in. Sounds like this might be useful to others...

Food for though (for me) anyways.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Plugin Idea In reply to
Hi Ian,

Staying on top of meta tags is crucial to maintain good search engine placement and this seems a logical approach.

Of course some limits need to be put in place on it:


1. Keyword file should not exceed 1000 charactures.

2. Keywords cannot repeat as this can be seen as spam to the search engines.

3. All keywords need to ve seperated by a "," with no spaces at the start or end of the keyword or keyword phrase.

Of course each search engine has its own way of dealing with the data presented but using these guidelines seems to be a good "all around" template for search engines.

Hope that helps!
Quote Reply
Re: [Teambldr] Plugin Idea In reply to
Yes, perhaps a good set of defaults. Of course, one can always make setting configuarable (and should).... its not that hard to make a settings table in a plug-in (as you know).

I will certainly have a look at this, but a little later this week perhaps.... I am getting a little snowed!


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Plugin Idea In reply to
was this ever done?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Plugin Idea In reply to
I tried to use a global - but I don't get the <%Title%> returned with comma... just the spaces - any suggestions?

Code:
sub {
my $tags = shift;
my $kw = $tags->{Title} or return "my, standard, keywords";
length $kw < 200 and return $kw;
my $short = substr ($kw, 0, 200);
$short =~ s| |, |g;
return $short;
}

Thanks in advance

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Plugin Idea In reply to
I am using this global, that I copied from somewhere in the forum, I don't remember where.
Code:
sub {
my $tags = GT::Template->tags;
my $cat = $tags->{category_name};
$cat =~ s|/|,|g;
my $sub_cat = join(",", map { $_->{Name} } @{$tags->{category_loop}});
my $keywords = $cat;
$keywords .= $sub_cat if $sub_cat;
return lc $cat;
}

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Plugin Idea In reply to
What is $keywords there for as you never return it?
Quote Reply
Re: [yogi] Plugin Idea In reply to
Thank Ivan,

Got it sorted using:

Code:
sub {
my $tags = shift;
my $wordlist = $tags->{Title} or return "my, keywords";
my $shortlist = substr ($wordlist, 0, 200);
$shortlist =~ s/ /, /g;
return lc $shortlist;
}

Klaus

http://www.ameinfo.com
Quote Reply
Re: [Paul] Plugin Idea In reply to
I guess I want to return $keywords, not $cats...

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Plugin Idea In reply to
Hi Ivan,



So the change would be like this then:
Code:
sub {
my $tags = GT::Template->tags;
my $cat = $tags->{category_name};
$cat =~ s|/|,|g;
my $sub_cat = join(",", map { $_->{Name} } @{$tags->{category_loop}});
my $keywords = $cat;
$keywords .= $sub_cat if $sub_cat;
return lc $keywords;
}
Quote Reply
Re: [Teambldr] Plugin Idea In reply to
Yeah...that should work.

Cheers

Andy
Quote Reply
Re: [Andy] Plugin Idea In reply to
Thanks Andy.



I was just thinking that it may be a good idea to grab the whole bread crumb if possible (less the HOME of course).

For example:

If the cat name is: HOME/FOOD/BREAD/MANUFACTURERS

Then the above would grab "manufacturers"

If it grabbed the FOOD, BREAD, MANUFACTURERS it would be more targeted than just with MANUFACTURERS.

Can this be done?

Thanks!

Brian
Quote Reply
Re: [Teambldr] Plugin Idea In reply to
You could probably do it by changing:

Code:
my $sub_cat = join(",", map { $_->{Name} } @{$tags->{category_loop}});

...to...

Code:
my $sub_cat = join(",", map { join(",", split(/\//, $_->{Full_Name})) } @{$tags->{category_loop}});
Quote Reply
Re: [Paul] Plugin Idea In reply to
Thanks Paul...



So the final code would look like this then...

Code:
sub {
my $tags = GT::Template->tags;
my $cat = $tags->{category_name};
$cat =~ s|/|,|g;
my $sub_cat = join(",", map { join(",", split(/\//, $_->{Full_Name})) } @{$tags->{category_loop}});
my $keywords = $cat;
$keywords .= $sub_cat if $sub_cat;
return lc $keywords;
}

Last edited by:

Teambldr: Mar 18, 2003, 12:40 PM
Quote Reply
Re: [Paul] Plugin Idea In reply to
Thanks Paul. Works great.

I added this to the template to also add some flex to the design (allowing the site to either enter in the keywords directly or taking the automated keywords in the event none have been entered) as well as the robots control. metakey of course being the global.

Code:


<%if meta_name%>
<meta name="description" content="<%meta_name%>">
<%else%>
<meta name="description" content="<%site_title%>-<%category_name%>">
<%endif%>
<%if meta_keywords%>
<meta name="keywords" content="<%meta_keywords%>">
<%else%>
<meta name="keywords" content="<%metakey%>">
<%endif%>

<meta name="robots" content="INDEX,NOFOLLOW">
Quote Reply
Re: [Teambldr] Plugin Idea In reply to
This one may sound crazy, but as I was working this into the site I was thinking it would be great if the titles of the links as well as the cats above were pulled and placed into the metakey global. Is that possible?


This of course would be relative to the ones actually showing on the page itself.

EDIT:

Actually that may not work well for the following reason...

* Some names include a "," in them such as Acme Fireworks, Inc. and this would show 2 keywords a)Acme Fireworks and b)Inc. and by doing so will repeat the term Inc too many times causing the site to be NOT INDEXED rather than INDEXED due to keyword spamming.


As well there may be a potential to exceed 1000 letters and this is also a bad thing for some major search engines.

Thanks!

Brian

Last edited by:

Teambldr: Mar 18, 2003, 4:31 PM