Slashdigglicious


My first WordPress plugin: all it does is add all the little logos at the end of each post to enable easy submission to various online bookmarking services. It is actually nothing new; googling for “wordpress bookmarks plugin” turns up lots of stuff of varying quality, supporting different sets of bookmarking sites. They either have way too many little icons of sites I haven’t heard of, they don’t include a site or two that I like, they don’t look as minimalistic as I would like, or they are just stale and haven’t been updated to work with WordPress-2.2. The Share This plugin from alexking.org is nice, but it requires two clicks to bookmark something (one to dropdown the icon, and another to click the bookmark). So I wrote my own.

Installation is the usual simple steps for installing a plugin:

  • Download the zip file.
  • Unzip it into wp-content/plugins (or upload the slashdigglicious.php file into the wp-content/plugins directory on your web server).
  • Look for “Slashdigglicious” in the WordPress “Plugins” control panel and activate it.

There are no code- or template-editing requirements to use this plugin; the links and logos will automatically appear at the end of each post, wrapped up in <span class="slashdigglicious"> for easy CSS styling.

I’ve written this for WordPress-2.2; I don’t know if it will work with older versions. If you like it (or if you don’t), please leave a comment with a link to your website.

  1. #1 by Donovan on Thu Aug 9, 2007 - 11:52 am

    This is an awesome plugin. In fact, I am using this plugin and the Wordbook ahd Chiclet plugins as well. You are a fanastic programmer. Well done!

  2. #2 by Donovan on Thu Aug 9, 2007 - 2:36 pm

    Question: Is there a way to make this not appear on Pages? i.e. I have a contact page on my site. I don’t need the icons on the bottom of my form. Great plugin!

  3. #3 by Rob on Sun Aug 19, 2007 - 3:35 pm

    Question: Is there a way to make this not appear on Pages? i.e. I have a contact page on my site. I don’t need the icons on the bottom of my form.

    Yes. See http://wordpress.org/extend/plugins/slashdigglicious/faq/

  4. #4 by pyko on Thu Aug 23, 2007 - 4:15 pm

    hihi!
    awesome plugin – pretty much exactly what i wanted :) something nice and simple yet all there.

    i just made one tiny tiny change, and that was adding a “br” since i’m using tags (otherwise the icons would appear in the same line)

    other than that perfect!
    pyko

  5. #5 by snowcrash on Sun Aug 26, 2007 - 7:05 am

    Hello

    A super cool plugin – uncluttered and the best

    Though I’ve customized my theme and would like to place the code for generating the logos manually in my single.php post page.

    My php is too limited to figure how to hack your plugin

    any help would be appreciated – thanks

  6. #6 by Andy Bailey on Sun Aug 26, 2007 - 10:02 am

    looks fantastic! I started a new blog today and i tried 3 different bookmarky plugins but they still weren’t minimalist enough. serendipity sent me here for the wordbook plugin.

    thanks!

  7. #7 by unklerupert on Thu Aug 30, 2007 - 2:49 pm

    Great plugin Rob, exactly what i was looking for, grabbed the wordbook plugin as well, again, exactly what i was looking, and both in the same place! using both on the site now, well done {:o)

  8. #8 by knide on Thu Sep 13, 2007 - 5:16 am

    You have an error on your delicious link. Kindly check. I’ve already edited your plugin on my site to correctly display the delicious link. Kind regards.

  9. #9 by Rob on Thu Sep 13, 2007 - 9:06 am

    You have an error on your delicious link. Kindly check.

    This is an error that affects browsers with Javascript disabled. I’ve released Version 1.0.4 to address this issue. Thanks!

  10. #10 by Carbuncle on Thu Sep 13, 2007 - 3:07 pm

    Just downloaded plugin and about to use it – looks just what I’m looking for – thanks for work.

  11. #11 by nv1962 on Fri Sep 14, 2007 - 5:34 am

    Yay! Just what the Dr ordered. And yes, adding others is fairly straightforward – I’ve added Menéame myself (popular within the Spanish speaking blogosphere) and it’s very easy to do – just add bits in two places.

    For others interested in adding Menéame, this following snippet goes before the similar one for Slashdot (assuming you want Menéame’s button to appear first!)


    $meneame = '<a>'
    . ''
    . '</a>';

    Second, add the Menéame string to the return array, toward the bottom, and again: before the Slashdot entry, so that it looks like this:


    return "\n"
    . implode("\n", array(
    $meneame,
    $slashdot,

    Couldn’t have been simpler!

    Thanks for your work Rob – that’s a GREAT plugin.

  12. #12 by Sky on Fri Sep 14, 2007 - 1:50 pm

    Hey, I’m currently running a site where I’m considering using your plug-in as, of right now, all the other social plug-ins are just a pain in the butt to use.

    I just have two questions:

    1) Does your plug-in automatically check to see if it is up to date? Or will I have to do that manually?

    2) Can I make the images plain links instead? If so, how?

    I appreciate it it.

    Thanks,
    Sky

  13. #13 by Robert on Fri Sep 28, 2007 - 3:31 am

    Nice Job! I’ve just installed it on my blog. I’ve seen my brother use it on his. and it works REALLY well for him. Now i’m gonna try it and im sure its gonna get used.

    again Well done on the plugin.

    Robert.

    http://Robert.jooste.org

  14. #14 by Kyle on Tue Oct 9, 2007 - 8:36 pm

    How can I turn off the white border that appears around the images? I have a blog with a black background. In what file is the slashdigglicious css element?

  15. #15 by Rob on Tue Oct 9, 2007 - 10:10 pm

    How can I turn off the white border that appears around the images? I have a blog with a black background. In what file is the slashdigglicious css element?

    Read the post:

    the links and logos will automatically appear at the end of each post, wrapped up in <span class=”slashdigglicious”> for easy CSS styling.

    Just put some stuff in your theme’s CSS to turn off image borders for “slashdigglicious” elements.

  16. #16 by Kyle on Wed Oct 10, 2007 - 4:39 pm

    I put this is the theme stylesheet to turn off image borders, still didn’t work, what am I missing?

    .slashdigglicious img {
    border: 0px;
    }

    also tried:

    .slashdigglicious img {
    border: none;
    }

  17. #17 by radiohode on Sat Oct 13, 2007 - 3:06 am

    This plugin is great, but I want the icons to appear only in single posts (I’m using the “more” option on each post). How to?

    As it is now all icons are visible on all pages, and that is somewhat disturbing. Especially on my root page.

  18. #18 by SteveJ on Sat Oct 13, 2007 - 9:46 am

    Great plugin for a newbie. But how do you list the icons horizontally instead of vertically cos they take up too much room.

    Many thanks for any help

  19. #19 by SteveJ on Sat Oct 13, 2007 - 10:18 am

    And where do I get the subscribe menu plugin you have on your Blog

    thanks again

  20. #20 by allen L. on Sun Oct 21, 2007 - 1:10 am

    Thanks! This is a great looking plugin that I use for my site. I did edit it a bit though so it does not appear in posts with the “Read more” text in it. This makes the root page look more clean and when the user clicks on “Read more” to the single.php page, the links will then appear.

    Though I’ve customized my theme and would like to place the code for generating the logos manually in my single.php post page.

    My php is too limited to figure how to hack your plugin

    Here is the edit in the slashdigglicious.php file:

    Before:

    if (strpos($content, '') !== false)
    return false;
    if (strpos($content '') !== false)
    return true;

    After:

    if (strpos($content, '') !== false)
    return false;
    if (strpos($content, 'Read more') !== false)
    return false;
    if (strpos($content, '') !== false)
    return true;

  21. #21 by Rob on Mon Oct 22, 2007 - 10:06 pm

    I’ve released Version 1.0.5; this version suppressed link icons when posts containing ‘<!–more–>’ are displayed in non-single-page mode (e.g., icons are only displayed in single-page mode for that post).

  22. #22 by Shane on Thu Oct 25, 2007 - 8:04 pm

    FYI, in the new version it does not display on front page if you use the more tag…

  23. #23 by Shane on Thu Oct 25, 2007 - 8:05 pm

    Woops. Didn’t see the last comment until I pressed sumbit…duh.

    But I wouldn’t really consider that a feature, how about an option for it?

  24. #24 by zbigniew on Sat Oct 27, 2007 - 5:44 am

    Hello,

    Thank you for a very nice plugin! I only wonder how to move the icons a bit below. If you look at my site (http://slowo.pl/tuba/), the icons are displayed just after the blog entry. I would like to move below “Wpisy na podobny temat”. How is this possible? I cannot trace slashdogdelicious in templates. Thank you very much!

  25. #25 by Nick Harper on Thu Nov 1, 2007 - 5:52 pm

    Is there a way to turn this off on certain pages?

    Thanks

  26. #26 by Rob on Fri Nov 2, 2007 - 11:00 am

    Is there a way to turn this off on certain pages?

    Yes. Please read the FAQ.

  27. #27 by Ki on Mon Nov 12, 2007 - 7:34 am

    Your FAQ says to disable

    If the post contains ?

  28. #28 by diana on Fri Nov 30, 2007 - 9:28 am

    Thanks for this plug-in, I like it!

    How are you creating the nice white squares with shadows, is that a background image style for a:link in that div? Or, are you supplying your own chiclet images and adding that square?

    Do you have an image for that background? I assumed your plugin would include that… if it’s included, it’s not showing up in my blog.

  29. #29 by diana on Fri Nov 30, 2007 - 9:59 am

    Ah never mind, I found the weblogs tool collection which nicely explains how the shadows are done, and I copied your styling too… I love the FireFox CSS editor.

  30. #30 by diana on Fri Nov 30, 2007 - 10:02 am

    Not to worry, I found it!

  31. #31 by DVmaker on Sat Dec 8, 2007 - 7:50 pm

    Works great!
    Does anyone know how to add fark.com refferals to this release?

  32. #32 by zfeezy on Tue Dec 18, 2007 - 10:47 pm

    Awesome, light, beautiful plugin. Will highly recommend and use. Many thanks. Wanted to share a piece of code if anyone wants to add newsvine support ..

    $newsvine = ''
    . ''
    . '
    ';

    Thanks again!

  33. #33 by zfeezy on Sat Jan 5, 2008 - 4:06 pm

    I’m using the next_post_link in my single.php template and the slashdiggalicious links are displaying inline with the next_post_link.

    I’ve been trying for a while to separate the slashdigg links from the post itself with little luck; CSS, divs, etc aren’t doing what I need it to.

    Has anyone else run into this? Rob, do you know of any way to get around this? Is there any way to call the plugin into my template phps rather than have it be automatically added to each of the posts?

  34. #34 by Roger on Mon Jan 21, 2008 - 1:33 am

    Hi there and thanks for this plugin which I have been using for a few months now.

    Upgrade suggestion – allow the addition of a line of text before the icons to encourage people to click and share a post. That could be made optional and user customisable. I would have something like ‘If you’ve enjoyed this post, please consider sharing it with others by clicking one of the icons below. Thanks.’

    What do you think ?

    Roger

  35. #35 by Rob on Mon Jan 21, 2008 - 8:58 am

    Upgrade suggestion – allow the addition of a line of text before the icons to encourage people to click and share a post. That could be made optional and user customisable. I would have something like ‘If you’ve enjoyed this post, please consider sharing it with others by clicking one of the icons below. Thanks.’

    This feature is more appropriately handled by a second plugin such as “Shortcut Macros” or “Macro Expander”, both of which can be found at wordpress.org: http://wordpress.org/extend/plugins/search.php?q=macro

  36. #36 by witchypoo on Tue Jan 22, 2008 - 5:35 am

    Love this plugin! Didn’t know what it was called until I asked Andy Bailey, who got it in August when he started his blog. I have recommended it to others, but I see where I need to write a post about it.
    Thank you!

  37. #37 by Kelvin on Mon Jan 28, 2008 - 11:01 pm

    Awesome! I love this plugin…I’m new to this and I just love what you did. Just added to my wordpress blog site. New to digging to…will try it out here.

  38. #38 by staticbrain.com on Tue Jan 29, 2008 - 6:13 pm

    Awesome plugin. I hated the way most others had way too many services, and most of them little known and unheard of. This is exactly what I was looking. You have saved me many hours of hand coding the bottom of each post. I can’t thank you enough. :mrgreen:

  39. #39 by Mercè on Fri Feb 8, 2008 - 1:39 pm

    Rob, this is an awesome plugin, thank you very much for your work. It was exactly what I was looking for.
    Please, as I don’t know CSS programming, may I ask which sentence I should put in my theme CSS file to eliminate borders on icon images?
    Again, thanks a lot.

  40. #40 by holli on Sat Feb 9, 2008 - 11:33 am

    Hi – this looks perfect.. I have one question, the last plugin I tried showed up as code in my feedburner RSS feed. Has anyone had any issues with the code showing up in their feeds?

    Thanks for your hard work!!

  41. #41 by Nick on Sun Mar 30, 2008 - 4:21 pm

    How can I get it to show these icons on the main page if I have the more tag being used?

    I have tried the various things in the FAQ but they just show up as text for some reason?

    Thanks

  42. #42 by ganes on Tue Jun 10, 2008 - 7:04 pm

    hi

    can you add the feedburner email? just like the one used in bookmarkify. So my visitor can email any article to their friends.

    Also, is it possible to make the link open in new window?

    cool plugin!

  43. #43 by Marco on Wed Jun 11, 2008 - 9:02 am

    Dude!!! the favicon of delicious IS NOT WORKING ANYMORE

    please update :D or tell me how to change it to host it localy

  44. #44 by Diana on Mon Jun 16, 2008 - 8:41 am

    It looks like Del.icio.us has broken their own favicon? When I go to their site, their favicon is not visible for their own pages. I was looking at how Smashing Magazine” does their Del.icio.us icon, and even though I’m peering at the properties with FireBug and Web Developer toolbar, I don’t understand how the image is delivered.

  45. #45 by Rob on Mon Jun 16, 2008 - 9:56 am

    del.icio.us image link updated with 1.0.6 – http://wordpress.org/extend/plugins/slashdigglicious/

  46. #46 by RD on Thu Oct 2, 2008 - 3:24 am

    Is there a way to make the default that the icons are NOT added, unless I specifically put the code into my post?

    Thanks. Great plugin.

    RD

  47. #47 by RD on Thu Oct 2, 2008 - 3:59 pm

    Never mind. Sorry about that. I got it.

    In:

    function slashdiggliciousEnabled($unused)

    change last line from

    return true;

    to

    return false;

    If anybody can recommend css img styling for a dark background, please do. You can see the buttons at
    http://raptureforthegeeks.com

  48. #48 by Dave on Sat Nov 15, 2008 - 11:15 am

    Hi,
    I’d like to talk to you about writing a similar plugin for me, but I can’t find your contact information. Can you please send me an email?

    Regards,
    Dave

  49. #49 by spoot on Sat Feb 14, 2009 - 9:08 am

    Is there any way to suppress this in categories? Thanks if you have an answer.

  50. #50 by Trey on Thu Sep 17, 2009 - 9:11 am

    Love the plugin. Just one problem, if for any reason the ico files are not accessible (say, because of a firewall blocking one of the share sites) it defaults to text. This can make for an ugly mish-mash of text on websites. Could you include some sort of default icons for each of the sites used for it to default to if the site is unavailable? Or just hide the link completely?

(will not be published)