{"id":46941,"date":"2009-03-03T16:27:58","date_gmt":"2009-03-03T16:27:58","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/simple-twitter-link\/"},"modified":"2009-12-14T13:38:03","modified_gmt":"2009-12-14T13:38:03","slug":"simple-twitter-link","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/simple-twitter-link\/","author":307954,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.6","stable_tag":"1.6","tested":"3.0.5","requires":"2.0.0","requires_php":"","requires_plugins":"","header_name":"Simple Twitter Link","header_author":"David Artiss","header_description":"","assets_banners_color":"","last_updated":"2009-12-14 13:38:03","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/artiss.co.uk\/donate","header_plugin_uri":"http:\/\/www.artiss.co.uk\/simple-twitter-link","header_author_uri":"http:\/\/www.artiss.co.uk","rating":0,"author_block_rating":0,"active_installs":30,"downloads":6742,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog","other_notes"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","1.5","1.6"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[537,409,159],"plugin_category":[],"plugin_contributors":[78579],"plugin_business_model":[],"class_list":["post-46941","plugin","type-plugin","status-closed","hentry","plugin_tags-link","plugin_tags-status","plugin_tags-twitter","plugin_contributors-dartiss","plugin_committers-dartiss"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/simple-twitter-link.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>From version 1.5 you must now install the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/simple-url-shortener\/\" title=\"Simple URL Shortener\">Simple URL Shortener<\/a> plugin for the URL shortening to work in this plugin<\/strong><\/p>\n\n<p>The code for Simple Twitter Link should be added to the bottom of appropriate post\/page templates within your theme (and in the case of posts, within the loop).<\/p>\n\n<p>Simple Twitter Link simply returns a URL - this URL is a link to Twitter with your post\/page URL within it. Here's an example...<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php simple_twitter_link(''); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n<\/code><\/pre>\n\n<p>This will display the text \"Send to Twitter\" on your page\/post. However, when clicked on it will take you to your Twitter account and pre-fill in the status with \"I'm currently reading xxx\", where xxx will be the URL of the page\/post that you just came from.<\/p>\n\n<p>In the case of this example, no parameters were passed and, hence, a default sentence was passed to Twitter. If, however, you'd like to define your own Twitter text, then you simply pass this as a parameter. <code>%url%<\/code> must be specified within the sentence, as this tells Simple Twitter Link where you want the URL to go.<\/p>\n\n<p>So, another example...<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php simple_twitter_link('%url% is an excellent read'); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n<\/code><\/pre>\n\n<p>In this case the line \"xxx is an excellent read\" (again, where xxx is the URL of your page\/post) will be passed to Twitter.<\/p>\n\n<p>If you don't pass a parameter or miss out the %url% tag the default text will be used.<\/p>\n\n<p>The following is an example of how it could be used, with a <code>function_exists<\/code> check so that it doesn't cause problems if the plugin is not active...<\/p>\n\n<pre><code>&lt;?php if (function_exists('simple_twitter_link')) : ?&gt;\n&lt;a href=\"&lt;?php simple_twitter_link(''); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n&lt;?php endif; ?&gt;\n<\/code><\/pre>\n\n<p>You can also use an addition tag, <code>%title%<\/code>, which will show the post\/page title in the Twitter text.<\/p>\n\n<p>If you have the Simple URL Shortener plugin installed, you can also use a number of additional tags which will allow the URL to be shortened. Simple specify the name of the shortening service withing percentage signs within the Twitter text (this text will then be removed from the resultant output to Twitter). So, here is a further example...<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php simple_twitter_link('%tr.im%Currently reading a blog post called \"%title%\" - %url%'); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n<\/code><\/pre>\n\n<p>This uses both the new %title% tag and also uses the tr.im shortening service to shorten the URL.<\/p>\n\n<p>By default, the URL of the current post\/page is used. If, however, you specify a URL as a second parameter then this will be used instead (useful if you wish to add a generic Twitter link to your sidebar, for instance). An example would be...<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php simple_twitter_link('%tr.im%Currently reading a blog post called \"%title%\" - %url%','http:\/\/www.artiss.co.uk'); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n<\/code><\/pre>\n\n<p>From version 1.6 onwards you can also specify a number of further options via an optional third parameter. Each option is seperated by an ampersand and the following are valid...<\/p>\n\n<p><strong>cache=<\/strong> : Use this to turn off caching by specifying <code>cache=no<\/code><\/p>\n\n<p><strong>apikey=<\/strong>, <strong>login=<\/strong>, <strong>password=<\/strong> : These allow optional URL shortening options to be specified (see the documentation for Simple URL Shortener for further details)<\/p>\n\n<p>For example,<\/p>\n\n<pre><code>&lt;a href=\"&lt;?php simple_twitter_link('%bit.ly+key%Currently reading a blog post called \"%title%\" - %url%','','login=test&amp;apikey=insertapikeyhere&amp;cache=no'); ?&gt;\"&gt;Send to Twitter&lt;\/a&gt;\n<\/code><\/pre>\n\n<p>In this case you'd need to specify your own login and apikey for this to work.<\/p>\n\n<p>There is an excellent article on how to use this plugin at <a href=\"http:\/\/bloggingwithsuccess.net\/how-to-add-attractive-social-bookmarking-icons-to-wordpress-theme\" title=\"How to Add Attractive Social Bookmarking Icons to WordPress Theme\">Blogging With Success<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the entire <code>simple-twitter-link<\/code> folder to your <code>wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>There is no options screen - configuration is done in your code.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>I get the error \u201ccannot yet handle MBCS in html_entity_decode\u201d<\/dt>\n<dd><p>This is <a href=\"http:\/\/www.artiss.co.uk\/2009\/12\/plugin-error-cannot-yet-handle-mbcs-in-html_entity_decode\" title=\"Plugin error: cannot yet handle MBCS in html_entity_decode\">a known bug in PHP 4<\/a>.<\/p>\n\n<p>If other solutions do not work don\u2019t request the \u201ctitle\u201d option in this plugin, as it is this that will trigger it.<\/p><\/dd>\n<dt>How can I get help or request possible changes<\/dt>\n<dd><p>Feel free to report any problems, or suggestions for enhancements, to me either via <a href=\"http:\/\/www.artiss.co.uk\/contact\" title=\"Contact Me\">my contact form<\/a> or by <a href=\"http:\/\/www.artiss.co.uk\/simple-twitter-link\" title=\"Simple Twitter Link\">the plugins homepage<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>There is an additional template tag, <code>%title%<\/code>, which will show the post\/page title in the Twitter text<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Additional tags added to override the URL shortening service (defaults to TinyURL) - <code>%is.gd%<\/code>, <code>%snipr%<\/code>, <code>%tr.im%<\/code><\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Added bit.ly to list of URL shortening services<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Fixed issue with ampersands (and probably other characters) in the blog title causing linking issues<\/li>\n<li>Added su.pr as another URL shortening service<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Now using <a href=\"http:\/\/wordpress.org\/extend\/plugins\/simple-url-shortener\/\" title=\"Simple URL Shortener\">Simple URL Shortener<\/a> plugin to provide URL shortening<\/li>\n<li>Added new parameter that allows overriding of passed URL<\/li>\n<li>Blog title corrected, using code from Simple Social Bookmarks plugin<\/li>\n<li>Code tidied<\/li>\n<\/ul>\n\n<h4>1.6<\/h4>\n\n<ul>\n<li>Minor change to reduce chance of <a href=\"http:\/\/www.artiss.co.uk\/2009\/12\/plugin-error-cannot-yet-handle-mbcs-in-html_entity_decode\" title=\"Plugin error: cannot yet handle MBCS in html_entity_decode\">known PHP 4 error<\/a> occuring.<\/li>\n<li>Optional parameters can be passed for URL shortening purposes<\/li>\n<\/ul>\n\n<!--section=other_notes-->\n<h3>User Comments &amp; Reviews<\/h3>\n\n<p>\"Just contacting to say Thanks for Simple Twitter Link. It is best one around for people who use custom social bookmarks.\"<\/p>\n\n<p>\"\u2026a minimalist, excellent WordPress plugin called Simple Twitter Link\" (<a href=\"http:\/\/www.bloggingzest.com\/social-media\/why-how-bloggers-should-make-the-most-of-twitter\/\" title=\"How Bloggers Can Make the Most of Twitter\">Blogging Zest<\/a>).<\/p>","raw_excerpt":"Simple Twitter Link displays a link allowing Twitter users to update their status with a link back to your post or page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/46941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=46941"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dartiss"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=46941"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=46941"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=46941"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=46941"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=46941"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=46941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}