Add Keywords

Note: Upgrade to Version .2.1.  See below.

Joomla! provides a great system for including metadata keywords on articles; when editing an article there is a spot on the right hand side of the page to edit the keywords (it’s under “Metadata Information”). This information is used to provide the <meta> tags for the page and to connect pages using the standard Related Articles module that comes with Joomla!

But what if you don’t want to have to think up and type in keywords every time?  Wouldn’t it be nice if the related articles plugin could just always work on the full text of the articles?  That’s what this plugin solves.  More below.

Originally Written by Daniel Beck

To give credit where it is due, I am not the author of this plugin.  It was written by my friend Daniel Beck; the most I did was provide a few ideas for its implementation.  Now I host it for him and will field any bug reports and feature requests.

Current Version: .2.1

Version .2.1 of the add keywords plugin is available from http://joomlacode.org/gf/project/addkeywords/frs/.  This version fixes two bugs:

  1. The plugin now takes keywords from the full article text if their is a readmore line.
  2. You no longer have to apply or save twice to make the plugin work.
It also adds several requested features:
  1. The ability to add the author alias or name as a keyword.
  2. The ability to exclude specific sections or categories.
  3. The ability to choose the number and length of keywords.
  4. The ability to specify your own blacklist.  This now makes the plugin useable for any language.
Thanks goes to John Bekker at www.sjlcreations.be for contributing the code for those last two features.

There is also a feature request and bug tracker system at http://joomlacode.org/gf/project/addkeywords/tracker/.

Usage:

Whenever you create or save an article, this plugin automatically fills in the keywords for you.  It does this by:

  1. Parsing all the words in the article and ordering them by number of times used
  2. Removes the most common words in the English language from the list by comparing it against a blacklist
  3. Adds the top twenty words into the keywords section

One thing to note: any words you add to the keyword section will be overwritten when you save.  At the moment you either do keywords yourself or use this plugin, not both.

Installation:

  1. Install the plugin
  2. Go to your Plugin Manager and enable the plugin
  3. That’s it, you’re done!

30 Comments to Add Keywords

Frank
24 August 2008

I am unable to access the joomlacode.org area to download your extension. I have an account but am denied access to this particular area.

Thanks Frank

Eric
24 August 2008

Download links not working… the login page apear

abed
24 August 2008

same issue happened to me

James
24 August 2008

Duly fixed, my apologies.

abed
24 August 2008

thx admin for your help
test start

Jeff
24 August 2008

Would be really nice if you made a component that could batch create all the keywords in the articles.

James
24 August 2008

@Jeff: A worthy request. Very useful indeed for those who already have numerous articles. I will add it to the feature requests in the tracker and get around to it some day; unfortunately I’m a bit swamped at the moment.

Eric
25 August 2008

Good idea..but now only for people who use english.
It’s a good idea do add open field to add/edit yours words (black list). Another …add only 3,4,5,6 or 7 Keywords. Thant will be great!

ian
25 August 2008

Very nice but it definitely needs the ability to edit the black list. If you have {tabs} or other similar inclusions, they automatically used.

ian
25 August 2008

One other feature I have found extremely useful is a parameter to specify which sections and or categories to exclude. This would support the batch processing of multiple files (in support of the component feature suggested on sourceforge). - Ian

James
25 August 2008

All good ideas and some (ability to edit blacklist) already on the feature request list. I can only implement things so fast, however, so I’ll get around to them eventually. If anyone else wants to take a stab at some of them, let me know.

Eric
25 August 2008

Nice plugin! One thing that would ice the cake is to fill in the robots and author. :-)

crashtackle
28 August 2008

seriously cool plug. Thanks.

rusty
13 September 2008

joomla 1.0 :) ?

great idea , should be part of the core , why would not want too add keywords,

DmitryGrinberg-Lyandres
16 September 2008

I’ve installed and enabled plugin.
Unfortunatelly it don’t do anything.

I use PHP 5/A[ache 2.x

Alek
2 October 2008

Nice plugin but its just grabbing keywords from before the read more line.

tservers
17 October 2008

I just installed the extension and it works. But the problem I’m having is that the articles have to be saved twice in order for the keywords area to be populated. I’ve double-checked numerous times and it doesn’t populate on the 1st save. Any ideas?

tservers

tservers
17 October 2008

To DmitryGrinberg-Lyandres,

Try saving the article again and see if it populates. That’s the issue I’m having but it does populate after the 2nd save.

tservers

tservers
17 October 2008

I found the trick that works….. when creating your article FIRST hit the “Apply” button, THEN hit the save button, or you can just hit “Apply” button 2 times and the keywords will populate before you save the article when you look at the meta keywords section.

tservers

James
19 October 2008

@Alek: I noted that the other day. Will hopefully post a fix soon.

James
19 October 2008

@tservers: That’s funny, it shouldn’t have to be done twice. The plugin modifies the data before it gets posted to the database, so I’m not sure what’s up. I have to fix some other bugs in it, so I’ll try to look into that.

David
24 October 2008

Hi great plug but problem. After keywords are inserted and I try to edit some of them out or add a few of my own it does not allow me to save the keyword changes. Also the word “This” gets included into keywords though it’s on the blacklist. Any ideas on why I can’t edit keywords after they get inserted? Permission prob?

Again awesome plugin, I was just thinking of this the other day and here you have it!

James
24 October 2008

@David: See up above under usage. You either use this plugin to generate keywords or you do it yourself. Every time the article is saved the keywords are re-generated so your custom ones will always be removed. You can, with version .2, exclude a specific section or category.

Samantha
24 October 2008

Thanks for this plugin … but this Ä, Ö, Ü letter is a big problem. Can you help?

James
24 October 2008

@Samantha: I don’t think this is something the plugin can fix. It just works on the text that is passed to it. My version seems to work fine with these characters, and even with other alphabets entirely. Perhaps it is your version of PHP or the web browser?

David
24 October 2008

Hi James thanks for your response and duh on me for missing your usage info.

Options on editing to add and or subtract keywords when working with individual articles would be great. For instance plugin leaves out some important words and or includes unnecessary words and it would be nice to edit. This plugin is great though!

Ben
28 October 2008

It would be great if you also had an administration module in the same vein as the ‘Missing Metadata’ module so that I could tick the articles to apply the generate keywords alorithm on once (I.e. Not every time I save the article). It’s just that for my site, the plugin, while a great little tool for some sites, will just be a little too much of a blunt instrument for others that need more fine-tuning and selective application of keywords, irrespective of section and category.

Duke
4 November 2008

James - Great little tool - just love it!

Suggested simple enhancement to solve these listed issues - when the process is triggered on the Save event, the current keywords field is tested for content and if length is zero, then tags are generated. If someone edits the article and wants to regenerate tags, they just delete all content from the field. Otherwise once tags are generated, the user can modify/edit as they wish and not lose their work.

Marquito
6 November 2008

Thank you so much for this worthy plugin. Now I finally get some useful results…

One other thing. Could it be possible, when someone handfills the keyword text area. That 50 most used keywords used in other articles show up (via ajax or pull-down or whatever)

Thanx again!
Marquito

James
8 November 2008

@Duke: I think if it allows for custom keywords it will have to be in some other means. Part of the usefulness of the plugin is that it will automatically update if the page is updated. Requiring the clearing of the box in order to update defeats that simplicity.

@Marquito: Not easily possible. The plugin grabs the onsave event and modifies the post data. It would be much more difficult to edit the actual keywords entry form. I’ll leave that for someone else to write.

Leave a comment