arc_social_share

Easily add links for sharing content with numerous social networks.

Installation

To install go to ‘Plugins’ under ‘Admin’ and paste the plugin code into the ‘Install plugin’ box, ‘upload’ and then ‘install’. You will then need to activate the plugin.

The Tags

All tags have the following attributes:-

  • class: class name to be applied to the link tag
  • url: URL to share, use this to override the article’s permlink

All tags apart from arc_social_share_gplus have a ‘title’ attribute for overridding the article’s title to be included in the share link.

Delicious

<txp:arc_social_share_delicious />

Facebook

<txp:arc_social_share_facebook />

Google+

<txp:arc_social_share_gplus />

LinkedIn

<txp:arc_social_share_linkedin />

Additional Attributes

  • source: by default this is your site’s name
  • summary: pass some summary text to LinkedIn (LinkedIn will truncate summaries greater than 256 characters long)

Pinterest

<txp:arc_social_share_pinterest />

Additional Attributes

  • image: URL to an image, by default this is the article’s image

Pocket

<txp:arc_social_share_pocket />

Reddit

<txp:arc_social_share_reddit />

StumbleUpon

<txp:arc_social_share_stumbleupon />

Tumblr

<txp:arc_social_share_tumblr />

Twitter

<txp:arc_social_share_twitter />

Additional Attributes

  • mention: adds a Twitter username to the end of a tweet (e.g. /@drmonkeyninja)

Usage

The majority of the tags work the same, with a few exceptions where there are additional parameters available.

They can all be used as either a single tag or a wrapper tag. For example:-

<txp:arc_social_share_twitter />

or,

<txp:arc_social_share_twitter>Tweet This</txp:arc_social_share_twitter>

They’re intended to work within an individual article context, so used in an article form. The URL used for sharing will be the default permlink created by Textpattern. However, you can override the URL:-

<txp:arc_social_share_twitter url='http://www.example.com' />

All links created by the tags are URL encoded.

The plugin won’t do anything fancy with the way the links work when clicked. So if you want to open the links in a new window you will need to put in place some JavaScript to do this yourself. You can easily add a class to the links to help target them with your JavaScript:-

<txp:arc_social_share_twitter class='bookmarklet' />

The Details