del.ico.us Smart Tagging Version 1.1
by Jonathan Deutsch
As you may be able to see from looking at my blog, I’ve finally gotten around to making some improvements to the del.icio.us Smart Tagging Plugin for WordPress. Version 1.1 of the plugin has the following changes:
- Link image is less saturated, unless you are mousing over the link (Daniel J. Wilson’s suggestion)
- It only links to the first occurrence of a particular tag per post (Jason’s suggestion)
- It does not link inside <a> tags.
- The cache file for tags is simply called “deliciousTagCache.txt” now.
- Other parsing fixes.
I think it works a lot better and is much less visually distracting. This version is a little slower than the previous version, however. Also a word of warning: if del.icio.us happens to go down, then your blog may become inaccessible once the tag cache expires. It may also take a while to build the tag cache if you have lots lof links/tags. You can always disable the plugin from the wp-admin interface if this happens for an extended period of time.
Installation Instructions
- Download deliciousTagging.zip.
- Edit lines 12 and 13 of deliciousTagging.php so it has your del.icio.us username and password.
- Place the contents (not the folder itself) of the deliciousTagging folder in your wp-content/plugins. This is 5 files.
- Make sure the deliciousTagCache.txt file has write permissions. If you have command-line access, you can type:
chmod 766 deliciousTagCache.txt
- Activate the plugin in WordPress through the Plugins tab of the wp-admin interface!
As always, feedback is welcome!
Very cool! You might also want to point out that it takes a while to first build the tag cache, particularly if you many tags.
+have 🙂
Noted! Thanks.
Great script, thanks. I added it to my site. Coupla thoughts:
1.) I’m not a fan of the inline images (I find them somewhat distracting from the content itself), so I modified my version so that it simple gives each tag a hyperlink with a separate CSS style definition.
2.) It adds hyperlinks to tags appearing in a “code” chunk. I tried to copy the part of your script that excludes auto-hyperlinking for existing links, but it didn’t work for “code”. I could be doing something wrong.
Also, I noticed a significant increase in the amount of time it takes to load the page. I’m not clear on whether that’s a result of unoptimized code or if that involves the server communication with del.cio.us (I’m relatively new with PHP). Would love to hear your thoughts on that.
Again, nice work.
Just thought of something….
If you wanted to give users of this script the option of inline images or just custom, stylized hyperlinks, you should write the code to simply create a link out of a known delicious tag and give it a span class name.
Users could use the .delicioustag:after pseudo-element in CSS to display images, rather than have inline images popping up all over the place. Or they could use the no-repeat background image + right-padding trick to have images show inline. This approach might have benefits, say, on text-only browsers, newsreaders, etc. Also, it’s nice to give people a choice, rather than hard-code it.
I guess what I’m saying is it’s be nice if this script focused less on presentation piece and more on simply IDing delicious tags.
CSS Pseudo element reference:
http://www.w3schools.com/css/css_pseudo_elements.asp
Don’t know what I am doing wrong, but the plugin does not create links?! The rollover images turn up like they should do, but no links.. Does anybody know what the problem could be?
It appears that del.icio.us tagging died this morning.
– Jim
I would like to have the del.icio.us tags also show up for categories (a little link next to each one that matches a tag in del.icio.us).
Just a suggestion. Great plugin. Worked right from the start.
– Jim
I followed the directions as stated and am getting a permissions error on the deliciousTagCache.txt file, even though I tried 766, 666, and other permissions. I even changed ownership to nobody.
Here is the exact error message I get:
Warning: fopen(wp-content/plugins/deliciousTagCache.txt): failed to open stream: No such file or directory in /home/www/peterfilias/wordpress/wp-content/plugins/deliciousTagging.php on line 92
Are you sure that the file is actually located in the wp-content/plugins/ directory? It sounds like it may just be in the wrong place.
Also, I haven’t tested with WordPress 1.5, so that could be a problem (potentially).
Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 29 in /home/tsar1964/public_html/chillbill/wp-content/plugins/deliciousTagging.php on line 36
How do I fix that?
I’m not sure what the problem is, but my guess might be that you have a parenthesis in one of your del.icio.us tags?
If you change line 153 of deliciousTagging.php to “echo “
Line 153 should be extended by a type-parameter
Kewl: But I have switched over to WordPress 2.0 RONAN. Will it work on that too…
Larisa
as Don Lapre is da Man
larisa@larisajoyreilly.com
http://www.larisajoyreilly.com
Hi i am not seeing the tags anywhere can anyone pls help me what to do after acrivating the plugin thank you