Arne Brachhold

Del.icio.us – Bookmark this! WordPress Plugin

Filed under: Plugins — arne on June 21, 2005
Latest release:
1.1
2005-11-27

Hi there,

here is another WordPress Plugin for you! I’m sure you know del.icio.us, an online service where you can manage and share your bookmarks with other people. With this plugin you can add a "Bookmark this page on del.icio.us" link to your posts or sidebar. This will allow your visitors to add your page directly into their del.icio.us profile and makes your blog more popular!

Installation:
Just download the zip file and extract the content into your wp-content/plugins directory.
Then activate it at your Plugin menu in the administration panel.
The last step is to add some code in you template where the link should appear.
<?php dbt_getLinkTag("Bookmark on del.icio.us"); ?>
This will add a link to bookmark the current page. If you want to create a bookmark link for the current post use the following code inside "the loop".
<?php dbt_the_LinkTag("Bookmark on del.icio.us"); ?>
Please have a look at the included readme.txt which also contains a sample with an image. You can see the result at the left sidebar of my blog or below the post title.

Download:
http://www.arnebrachhold.de/get/delicious-bookmark-this/delicious-bookmark-this.zip

License:
This plugin is licensed under the GPL. Because the plugin is licensed free of charge, I do not accept any responsibility for any damages, direct or indirect, that may arise from using the plugin. This software is provided "AS IS" without warranty of any kind. Please refer to the full version of the GPL for more details.

Update 1 (2005-11-27):

  • Added "dbt_the_LinkTag" function which works inside the loop to bookmark the current post. Parameters are the same, use it inside the loop.

What is "The Loop"?

The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags.

Have a look at your index.php template and search for the loop. It begins with
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
and ends with something like
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

Inside of the loop you can use the functions beginning with “the_” which depend on the current post of the loop. Place <?php dbt_the_LinkTag("Bookmark on del.icio.us"); ?> anywhere between the two code pieces above to create a del.icio.us link for the current post.

More info about "The Loop" is available at The codex