cab_social

24 August 07

Current version

Current version is 0.2 and should be considered still in testing.

Changelog:

  • From 0.1: added background attribute. 1 means it will use CSS background to display icons (like in the example below), 0 means it will use HTML img tag. Defaults to 1.

Download:

  1. Plugin
  2. Icons

Supported sites

Currently supported are: del.icio.us, digg.com, stumbleupon.com, facebook.com, reddit.com
More will come in the next version and per request (you can find my email at http://www.anegdote.com).

Installation

  1. Install plugin per usual.
  2. Activate plugin per usual.
  3. Upload icons (from icons.zip) to your website (e.g. http://url/images/social)

Usage

  1. Include txp:cab_social in the article form.
  2. Use any of the following attributes:
    1. sites (default: delicious,digg,reddit,facebook,stumbleupon).
      1. A list of social bookmarking sites you would like to use, separated by commas. NO SPACES.
    2. tag (default: p)
      1. tag that will enclose each social bookmarking link (e.g. p, li, div, span, etc.)
    3. class (default: social)
      1. class for the tag above
    4. imgdir (disabled by default)
      1. An URL to directory where you stored icons (e.g. http://url/images/social or /images/social)
    5. imgclass (defualt: socialimage)
      1. class for the icon image

Icons

You can download the icons from: http://www.anegdote.com/fajlovi/social.zip

Example

To get a bar like at the bottom of this article, I used the following in my form:

<ul class="sociallist">
     <txp:cab_social tag="li" imgdir="/slike/social" />
</ul>

And following in my stylesheet:

.sociallist
{
    padding: 0;
    margin: 0;
    list-style: none;
}

.sociallist li
{ 
    padding-right: 15px;
}

Bookmark

Comment

  1. Tim Jameson
    Oct 12, 07:23 AM #

    Hey Dejan – really pleased your site’s back up. Been wanting to try your cab_social plugin for a few days. Will try tonight! Facebook support will be very handy.

  2. Tim Jameson
    Oct 12, 04:47 PM #

    On second thoughts, I notice that the download path isn’t available?

  3. Dejan
    Oct 14, 09:58 AM #

    Tim,

    Sorry about that – follow the link up there and you should be able to download both the icons and the plugin itself.

    Let me know if you run into any problems.

  4. Tim Jameson
    Oct 16, 06:30 AM #

    Thanks Dejan. Installed and running fine.

    Could you advise a way to have the bookmark links open in a new tab/screen (like target=”_blank”), so that the user isn’t taken away from your site?

    Also, I notice the Facebook link seems to hang indefinitely (once you log into Facebook) meaning a browser restart – could be a Facebook issue…

  5. Dejan
    Oct 16, 06:58 AM #

    Tim,

    I will implement functionality as attribute in 0.3.

    Meanwhile, go to your Amin/Plugins tab, click on “Edit” for cab_social, and substitute the line:

    $ahp = ‘< a href=”’;

    with

    $ahp = ‘< a target=”_blank” href=”’;

    (There should be no space between < and a, I had to put it in this comment because Textpattern keeps parsing it, but it isn’t there in the plugin).

    I can’t recreate the Facebook problem, so it’s probably a temporary issue.

  6. Tim Jameson
    Oct 16, 07:36 AM #

    Thanks for the swift reply Dejan, certainly appreciated!

  7. jackie
    Oct 11, 12:15 AM #

    hi Dejan!

    So i’m really new to text pattern so I have some questions for you.

    - Do I set up a NEW form for just this plugin? If so, what should I call it and what should I put in the PAGE so that it is called upon?

    - If I add it to an existing form, where in the form do I put it?

    - I just want my whole site to be clickable (not individual articles), can i just add it to the footer form?

    I’m sorry these are probably such basic questions but when I tried to figure this out myself I got some big errors and the CSS stoped working for my whole site. Any help you have would be greatly appreciated!

    thanks!

    jackie

  8. Dejan
    Oct 16, 09:11 PM #

    Jackie,

    I recommend you best try to search for another plugin for textpattern. There are several of them with the same funcitonality now, and I don’t maintain this one actively. I can’t guarantee it works with recent versions of TXP!

  9. Kimberlie Bees-Guy
    May 10, 10:32 PM #

    Is there anyway to get some sites added or a way I could do it myself? technorati, designfloat, tweeter??? Thanks, Camxso


Textile Help

Ego Center

I suspect that some people will want to know more about the author of this blog. However, as my topic of writing is usually not of very personal nature, I find it inappropriate to write about personal things, say: hobbies, my pets or particularly bad ways in which girls refused me.

Read more...