Plugin Idea: Weighted Tags by Category [en]

Another plugin added to my wishlist: one which would display a weighted list of “related” tags on each category page.

[fr] Encore une idée pour un plugin WordPress, qui permettrait d'afficher sur chaque page de "catégorie" une liste des tags courants utilisés pour étiqueter les billets de cette catégorie. Il y a des volontaires?

I’ve been doing some cleaning up around here — mainly the sidebar, which now tries to provide links which make sense depending on which page we are looking at. I’ve also added navigation between monthly archive pages, and I’m working on my archive index a little.

I thought Weighted Categories looked like a nice plugin, particularly as I have (too) many categories. You can now see it in action for Climb to the Stars.

These last weeks, I’ve been getting into quite a few conversations about tags and categories (and keywords). “Will tags replace categories?” seems to be the big question. I don’t think they will. They do not serve the same purpose. I’m less sure about keywords: since I’ve been tagging all my posts, I’ve stopped choosing keywords for them too. But I’m clearly aware that I do not choose my tags in the same way as I chose my keywords — so it would probably make sense to keep them both (if keywords are actually useful, and I keep getting contradictory information about that).

So, to my plugin idea: for each category page, I’d love to be able to display a list of “tags used for posts in this category”. This list could be weighted, or not. It would be pretty simple to retrieve from the database. Off the top of my head and probably with syntax errors, something like: select * from post_meta where key=’tags’ and post_id in (select post_id from table_categories where cat_id = ‘our current category’). Whee, that must be the ugliest wannabe-SQL ever written — but you get the idea, don’t you? Then, the list of tags would be parsed and weighted as are categories in this plugin.

Anybody want to take up the challenge? Actually, this might be best as an extra feature for Bunny’s Technorati Tags, as it wouldn’t be much use without tags. Let me know if you’d like to do it (credit, of course, will be given) — otherwise I’ll probably end up doing it myself at some point.

Thanks for listening to me think out loud, and my apologies to my non-techie readers — I know my weblog hasn’t been very interesting for you to read lately!

Similar Posts:

Simple Technorati Tags Plugin for WordPress [en]

A simple plugin for WordPress which lets you display tags (or keywords) in your posts. Tags are stored in a Custom Field (no database modification required).

[fr] Un plugin simple pour WordPress qui vous permet de garnir vos billets de 'tags' (étiquettes) qui seront compris et interprétés par Technorati. Ce plugin ne modifie pas la base de données, et permet l'affichage de tags stockés dans un Custom Field nommé "tags", sous forme de liste de mots séparés par des espaces. Il est aussi possible d'afficher ainsi des mots-clés se trouvant dans un Custom Field nommé "keywords".

Update 31.01.07: The wp-plugins.org wiki isn’t allowing edits anymore. The plugin has been [updated to version 0.6](http://climbtothestars.org/archives/2007/02/01/basic-bilingual-and-bunnys-technorati-tags-plugins-updated-for-wordpress-21/), compatible with WordPress 2.1, by [Sudar](http://sudarmuthu.com/blog/2007/01/31/wordpress-21-and-custom-field-plugin-gotcha.html). Get [Bunny Tags](/code/bunny-tags.zip).

Update 21.01.05: Please see Bunny’s Technorati Tags on the wp-plugins.org wiki for information about this plugin!

As wp-plugins.org isn’t letting me in yet, here is a little post to announce my first real live plugin for WordPress (one can’t exactly say that Batch Categories is a proper plugin).

Bunny’s Technorati Tags (zip, phps) provides you with a template function that you can use to easily display Technorati tags for your posts. The tags are stored in a Custom Field, so this plugin does not require any modifications of the database structure. The plugin has not been thoroughly tested on different versions, though it works fine on my recent 1.5 nightly. As it is really very basic, I don’t believe you’ll run into any major compatibility issues on other versions (do keep me informed, though).

Once you’ve installed and activated the plugin (manually or with the Plugin Manager, enter a space-separated list of tags in a Custom Field named “tags”, and place the following code in your template where you want the list of tags to appear:

<php the_bunny_tags(); ?>

If you’re like me and you’ve been painfully entering comma-separated keywords for your posts using a Custom Field of same name, you can use the following line to use these existing keywords as tags:

<php the_bunny_keyword_tags(); ?>

Update 21.01.05: by setting $bunny_strict to false (see SETTINGS at the top of the plugin code) you will display keywords as tags for posts which do not have tags.

This might not be the greatest idea, as I believe tagging and choosing keywords is a different process, but it makes me happy for the moment, so I thought I’d share this possibility with you too.

Future development of the plugin includes adding a text input to the “Create New Post” form for easy tagging. (Coming as soon as I can figure out how to do it.)Done!

Plugin available on wp-plugins.net and wp-plugins.org.

Update 21:40 Who’dathunkit? Version 0.2 is out already, with a nice little “Tags” field in the post editing form. the_bunny_keyword_tags() has been revised to display keywords only when no tags are present. All the tagging pleasure is yours to take!

Update 21.01.05 Version 0.3 is out. Upgrade strongly recommended, or your tags won’t be indexed correctly by Technorati.

Similar Posts:

Call to WordPress Plugin Developers [en]

Call for help to WordPress plugin developers. I have a bunch of hacks and modifications I’d like to turn into plugins, but I am unfortunately as plugin-challenged as ever.

[fr] Un descriptif des plugins que j'écrirais pour WordPress si je ne faisais pas un vilain blocage sur le sujet. Ne vous gênez pas si vous voulez contribuer!

If I was fluent in WordPress plugin coding, here are the plugins I’d write. If you feel like coding one of them yourself, or helping me get it done, you’re most welcome. Carthik has already pointed me to Plunge into Plugins, which I will have a close look at once I’ve finished writing this post.

Of course, if you know of a plugin which does precisely what I’m describing here, leave a link to it in the comments!

Keywords plugin

This would be a pretty straightforward one:

  • add a “keywords” text input to post.php
  • save the value of that text input to a custom field called “keywords”
  • add those keywords as an HTML meta tag on the individual post pages.
Excerpt plugin

This one would also be pretty straightforward, as all it would do is add the “excerpt” field to the “simple” post.php layout.

Customize post.php plugin

This would be more complex, but allow for more flexibility than the previous plugin. I don’t yet have a clear idea of how to make it work, but the basic principle would be to allow the user to select which fields should appear on the post.php page. Instead of having “simple” and “advanced” controls, this would add the option to have “custom” controls and define them.

TopicExchange plugin

As far as functionality is concerned, this plugin would do what my TopicExchange hack did:

  • add a “trackback TopicExchange channels” text input to post.php
  • store the space-separated list of keywords in a meta value named (e.g.) ite_topic (one record for each value)
  • for each value, trackback the appropriate TopicExchange channel
  • display the trackbacked channels (with link) on each post.
Bilingual plugin

This would be a clean version of my language hacks:

  • add a small “language” text input to post.php (with a default value)
  • add an “other language excerpt” textarea, which posts to the corresponding custom value
  • display the “other language excerpt” at the top of each post
  • provide a function to return the post language, and the other-excerpt language (so it can be declared in a lang attribute, allowing the use of language-dependant CSS formatting, in addition to being semantically correct)
  • if this is not already possible with the date function in the WordPress core, provide an alternative date function which will format the date correctly corresponding on the language of the post
  • optional: figure out a way to adapt text like “comments”, “categories” etc. to the post language; make the plugin usable with more than two languages.
Smart Linkroll plugin

I love the way ViaBloga manages blogrolls and would love to see a plugin for WordPress that does the same thing. In ViaBloga, you simply enter the URL of the site you want to add to your links. ViaBloga then retrieves the title, description, RSS feed address, and even (yes!) a screenshot for the site. No need to fill in fields manually anymore…

Wiki-Keywords plugin

I haven’t through this through yet completely, but it seems to me that a plugin which would add wiki-like capability to WordPress, like ViaBloga does with keywords, could be an interesting idea to explore.

Technorati plugin

This is really a simple one: add a function which will allow easy display of the Technorati cosmos of each post, like I have done manually for this weblog.

On the subject of multilingual blogging, Kevin Marks has some interesting markup suggestions I need to look at more closely.

Similar Posts: