Plugin Updates

My host moved this site to a new server the other day, so hopefully everything made it over in one piece. It was amusing to get e-mails about new comments being posted despite the fact that I couldn’t access the new server myself (DNS issue with my ISP). So if I haven’t responded to your e-mail or your comment has disappeared, please let me know.

PreFormatted 1.0 Released

The newest PreFormatted release is now online and includes some minor fixes. Specifically, a few filters had to be tweaked due to changes in the official Strayhorn release. I also added a fix for a common WordPress problem: wpautop() likes to place your <!--more--> and <!--nextpage--> tags into their own paragraph blocks. This produces invalid XHTML when your post gets split into multiple pages. PreFormatted will remove the offending tags when possible.

I have many features planned for the next release, including keeping a copy of posts in their original format. I’ve been using Markdown lately (on another project) so expect PreFormatted to play nicer with other formatting plugins — my strategy should allow it to detect which filters need to re-arranged automatically.

Jerome’s Keywords — Roadmap

Thanks again to everyone who has sent me feedback about this plugin. As mentioned in a previous comment thread, there is an alpha of version 1.5 that can be used to create a tag cosmos. I plan to release 1.5-final in the next few days, which will add a “top X” (insert your number here) keyword list and will fix the way category meta keywords are handled.

I suspect that the new features of 1.5 won’t scale very well for heavily used sites, so the next major release (2.0) will move to a different storage scheme. Don’t worry, the conversion will be painless and completelybehind the scenes. The plan also calls for an options page for easier customization.

Feedback

  1. I’ve just uploaded Jerome’s Keywords 1.5beta for those wishing to test it and send me feedback. The new version includes:

    1. Enhanced the tags cosmos functions introduced in 1.5 alpha with parameters for scaling, minimum tag counts and category inclusion (oh, and you can do Technorati-style markup with using %em% and %/em% to create nested levels of <em>’s).
    2. Added function all_keywords(x) top_keywords(x) to return a list of the top x keywords (can be formatted similar to cosmos).
    3. Fixed category handling for get_the_keywords().
    4. Added keywords support for pages.
    5. Fixed a backslash bug in get_the_search_keytag().

    Enjoy!

    jerome — 27-Mar-2005 21:34
  2. I’m having a problem with the all-keywords(x) function. It seems to just print the number that I put in a bunch of times, and only spits out keywords when I put nothing in between the parenthesis, and it’s not formatted. Maybe I’m missing a step. Let me know.

    N. — 30-Mar-2005 13:28
  3. all_keywords() or top_keywords()? The former is for a tags cosmos, the latter gives you a top-x list. The parameters to top_keywords() are (in order):
    1. the number of keywords to display (default is “false” which shows all)
    2. formatting for each, similar to all_keywords() so you can use %keyword% , %count%, %keylink%, %em% and %/em%
    3. formatting if you want to include categories (default is ‘’ which excludes them)
    4. minimum count for a keyword to be included in the list (default is 0)

    jerome — 30-Mar-2005 15:12
  4. Whoops, the problem is with my first comment which refers to all_keywords(x) instead of top_keywords(x) — fixed!

    jerome — 30-Mar-2005 15:13
  5. Looks great! Thanks!

    N. — 30-Mar-2005 17:01
  6. Looks really good so far. Only bug I’ve found is that all_keywords uses the base url instead of blog url so all my links become error 404’s. This doesn’t happen inside the loop though. Example here.

    oso — 30-Mar-2005 17:26
  7. I noticed that the tags cosmos is case sensitive when it comes to ordering your tags. Tags starting with upper-case letters have precedence over tags with lower-case letters.

    For example, I have a tag for ‘del.icio.us’, but it appears at the end of the cosmos after the tag ‘Yahoo’. For usability, it would be better to have the tags ordered alphabetically regardless of case.

    Also, when creating a post, I insert my tag(s) into the keywords field and publish. The keyword(s) are inserted into the wp_postmeta table, but two rows are created. This duplicated data is also visible on the post, so this row must be deleted by hand everytime. Any thoughts why this happens?

    Other than that, great plugin Jerome.

    theanomaly — 31-Mar-2005 06:08
  8. oso:
    The default formatting parameter to all_keywords() is:
    <li class="cosmos keyword%count%"><a href="/tag/%keylink%">%keyword%</a></li>
    The %keylink% value is filled in with a link-friendly version of the keyword. I’ll probably add a smart keyword link in 1.5 final, but for now you should change your cosmos page to use:
    <li class="cosmos keyword%count%"><a href="/blog/tag/%keylink%">%keyword%</a></li>

    theanomaly:
    Yes, the cosmos uses the default sort order. Technorati uses the same type of sort order, while Flickr and del.icio.us force everything to lower case (43Things seems to be random). I might add in a lowercase option, but not right now…

    The double keywords is definitely a bug, albeit a new one to me (I haven’t changed that code since version 1.0). Can you tell me what plugin version you are using, your WordPress version and what other plugins you have active?

    jerome — 31-Mar-2005 10:58
  9. Jerome, I’m using keywords 1.5beta with WordPress 1.5.

    Active plugins are BAStats 1.0 build 3, and Random File 0.9.

    theanomaly — 31-Mar-2005 13:26
  10. jerome, works beautifully. My apologies - I should read before I complain. I’ll make sure to give this plugin some love in a post soon. Would it, hypothetically, be possible to allow readers to add their own tags to the posts like Flickr allow with photos?

    oso — 01-Apr-2005 12:00
  11. theanomaly:
    I’m at a loss as to why you are getting double keywords. Is it possible that you have two different versions of the plugin installed and active?
    Is anyone else experiencing this problem?

    oso:
    No worries, the alpha/beta instructions are scattered all over the place. I need to re-tool the plugin page, which will happen once I release.
    Hypothetically, almost anything is possible. :) Do you mean that each user would see their own tags, or would everyone just be allowed to add to the post’s original tag list? The latter wouldn’t be too difficult, but to implement the first would involve at least twice the effort of the original plugin, if not more. I’m afraid neither will be part of the next release.

    jerome — 02-Apr-2005 23:01
  12. The latter. That everyone (readers) would be able to add a tag - preferably in the comment section.

    oso — 03-Apr-2005 12:47
  13. Great!

    This plugin rocks! Even though I cannot get the tagcosmos thingie to work.. :(

    Could somebody please tell me which code I should put where?

    The keywords do work, no problem there. :)

    Erwin — 06-Apr-2005 07:31
  14. jerome, I made sure that only the latest version was installed and active. I’ll take a look at the code and run through it to try and work out what’s happening.

    theanomaly — 06-Apr-2005 17:19
  15. A reminder to anyone who upgrades to reset their permalinks.

    Jerome, I’ve got another pipe dream for you. Since del.icio.us and flickr both make their user cosmos APIable, would it be possible to make one big cosmos with the three folksonomies and combine like tags?

    I think that would be the ultimate visual representation of everything we do online.

    oso — 06-Apr-2005 17:57
  16. Hey, me again. :)

    I have been trying all day today to get a genuine tag-cosmos on my blog, but no luck whatsoever.

    The plugin is installed and active, I have keywords and I made a page which does not show any tags, but just spits out plain text ‘get_all_keywords()’ or whatever I put in there.

    It must me something really simple I am doing wrong, so who can make my day?

    Erwin — 07-Apr-2005 08:28
  17. Erwin, check out this previous thread and read post #12. Jerome provided two sample documents you can download and edit to your liking.

    theanomaly — 07-Apr-2005 16:59
  18. Apologies for the long absence, but I’ve been swamped by work this past week!

    oso:
    Thanks for all of the ideas and suggestions, I’ll have to add them to the plugin wish list. I wonder if you could combine existing Flickr & del.icio.us plugins to create a comprehensive cosmos? I don’t personally use either service so I’m not sure what’s involved here.

    theanomaly:
    Any luck with the duplicate keywords issue? I’d like to release 1.5-final but I’d like to get this problem resolved first, if possible.

    Erwin:
    Thanks! As theanomaly suggested, you can get Kubrick templates to see how the cosmos stuff works. Make sure that you are using version 1.5beta of the plugin. I’ll be expanding the plugin documentation pages when I release the final version.

    jerome — 09-Apr-2005 15:06
  19. I will nót go to sleep before I figure this out.

    ;-)

    Erwin — 09-Apr-2005 16:00
  20. Okay, my eyes are overruling Wordpress at the moment.

    Been fiddeling around with the file you guys suggested, but all I seem to get is ‘Fatal error: Unknown function: get_header()’. I Am supposed to put this file in the wp-content/themes/theme/ folder, right?

    Anyway, this is a wonderful plugin and with your help I’m sure I’ll get it to work. Hopefully. ;-)

    Thanks a lot and sleep well. 8-P

    Erwin — 09-Apr-2005 16:57
  21. jerome, still not luck I’m affraid! I can’t see what’s causing the duplicate entries in the wp_postmeta table. I’ll go over the code again in the morning just in case I missed anything.

    theanomaly — 14-Apr-2005 17:47
  22. theanomaly:
    If you edit a post multiple times, do you end up with more than two keyword entries? What happens if you edit the keywords and re-save — do both entries change values?

    jerome — 14-Apr-2005 18:09
  23. jerome, I ran the following test’s this morning again to see what the outcomes were:

    Test one:

    1. Create a new post (title, content, keywords) and publish.
    Database generates two instances in wp_postmeta, meta_id’s are 232 and 233.
    Post has duplicate keywords under post title.

    2. Edit ‘content’ of same post and save.
    Database deletes previous meta_id’s 232 and 233. New instance created with meta_id 235.
    Post has one instance of keyword under post title.

    —–

    Test two:

    1. Create a new post (title, content, keywords) and publish.
    Database generates two instances in wp_postmeta, meta_id’s are 236 and 237.
    Post has duplicate keywords under post title.

    2. Delete initial row created from wp_postmeta with meta_id 236.
    Post has one instance of keyword under post title.

    3. Edit ‘content’ of same post and save.
    Database deletes meta_id 237. New instance created with meta_id 239.
    Post has one instance of keyword under post title.

    4. Edit ‘keyword’ of same post and save.
    Database deletes meta_id 239. New instance created with meta_id 241.
    Post has one instance of keyword under post title.

    —–

    The only ammendments to the code (jeromes-keywords.php) were to the functions ‘all_keywords’ and ‘top_keywords’. Due to my hosting not having mod_rewrite enabled, the hrefs pointing to “/tag/%keylink%” were replaced with”/?tag=%keylink%”.

    theanomaly — 15-Apr-2005 08:25
  24. Thanks for running those tests — that should narrow down the search for the root cause. I still can’t reproduce the problem, but I’ll review the code again.

    jerome — 15-Apr-2005 10:54