<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TweetHacking.com - Twitter Hacks &#187; text decoration</title>
	<atom:link href="http://tweethacking.com/tag/text-decoration/feed/" rel="self" type="application/rss+xml" />
	<link>http://tweethacking.com</link>
	<description>Twitter Hacks</description>
	<lastBuildDate>Thu, 17 Jun 2010 14:15:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress Twitter Hack &#8211; How to Make &#8220;ReTweet This!&#8221; Button using your Favorite URL Shortener!</title>
		<link>http://tweethacking.com/twitter-hacks/wordpress-twitter-hack-how-to-make-retweet-this-button-using-your-favorite-url-shortener/</link>
		<comments>http://tweethacking.com/twitter-hacks/wordpress-twitter-hack-how-to-make-retweet-this-button-using-your-favorite-url-shortener/#comments</comments>
		<pubDate>Sat, 09 May 2009 03:23:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Twitter Hacks]]></category>
		<category><![CDATA[Twitter News]]></category>
		<category><![CDATA[Twitter Wordpress]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[couple hours]]></category>
		<category><![CDATA[css file]]></category>
		<category><![CDATA[div class]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[lt]]></category>
		<category><![CDATA[padding]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[scratch]]></category>
		<category><![CDATA[server request]]></category>
		<category><![CDATA[style css]]></category>
		<category><![CDATA[substr]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[text decoration]]></category>
		<category><![CDATA[turl]]></category>
		<category><![CDATA[url server]]></category>
		<category><![CDATA[url shortener]]></category>
		<category><![CDATA[url shortening]]></category>

		<guid isPermaLink="false">http://tweethacking.com/?p=144</guid>
		<description><![CDATA[For those of you who want to create your own &#8220;ReTweet This!&#8221; button using your favorite URL shortener, (mine is U2S.Me, which I made from scratch) you can easily implement a CURL into your single.php to make this happen on the fly.
Here&#8217;s how to do it, add the following code in your single.php (This example [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who want to create your own &#8220;ReTweet This!&#8221; button using your favorite URL shortener, (mine is <a href="http://U2S.Me">U2S.Me</a>, which I made from scratch) you can easily implement a CURL into your single.php to make this happen on the fly.</p>
<p>Here&#8217;s how to do it, add the following code in your<strong> single.php</strong> (This example uses U2S.Me to shorten URLs, you can easily change the 1st line of the PHP to fit TinyURL API or any other URL shortener you like but yes, do feel free to use mine, as it&#8217;s free!)</p>
<p>*Place the code where you want your ReTweet This! button to appear, I&#8217;ve placed before my content so Twitters can see it if they come to my site.</p>
<p>&lt;div class=&#8221;retweet snap_noshot&#8221;&gt;<br />
&lt;?php<br />
$newurl=exec(&#8217;curl &#8220;http://u2s.me/api.php?url=&#8217;.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].&#8217;&#8221;&#8216;);<br />
$ttitle = get_the_title();<br />
if(strlen($ttitle&gt;110)) {<br />
$ttitle = substr($ttitle, 0,110);<br />
$ttitle .=&#8217;&#8230;&#8217;;<br />
}<br />
$ttitle .=&#8217; &#8216;;<br />
$turl = &#8216;http://twitter.com/home?status=&#8217;.$ttitle.$newurl;<br />
echo &#8216;&lt;a target=&#8221;_blank&#8221; href=&#8221;&#8216;.$turl.&#8217;&#8221;&gt;ReTweet This!&lt;/a&gt;&#8217;;<br />
?&gt;<br />
&lt;/div&gt;</p>
<p>Now, this will basically execute CURL command to get the shortened URL back from <a href="http://U2S.Me">U2S.Me</a>, a URL shortening I made couple hours earlier in about couple hours.</p>
<p>You&#8217;ve probably noticed other codes that do something like <strong>http://myblog.com/p?=112</strong> and this isn&#8217;t really great for SEO, shortening your URL first through a URL shortening service lets you preserve your SEO-friendly URL such as <strong>http://myblog.com/mycategory/myblogpost</strong>.</p>
<p>Here&#8217;s a sample Tweet created from the code:</p>
<p>The nuclear doorbell <a href="http://u2s.me/vkb1">http://u2s.me/vkb1</a></p>
<p><img class="alignnone size-full wp-image-145" title="zedomax" src="http://tweethacking.com/wp-content/uploads/2009/05/zedomax.gif" alt="zedomax" width="242" height="94" /></p>
<p>Above is the button generated on <a href="http://zedomax.com">Zedomax.com</a>, now you can easily do this too by adding the CSS like this in your style.css file:<br />
.retweet {<br />
float:right;<br />
height:30px;<br />
width:110px;<br />
text-align:center;<br />
margin: 0 0 10px 10px;<br />
padding: 5px 0 0 0;<br />
border:1px solid #0018ff;<br />
background: #0018ff;<br />
-moz-border-radius: 5px;<br />
-khtml-border-radius: 5px;<br />
-webkit-border-radius: 5px;<br />
border-radius: 5px;<br />
}<br />
.retweet a {<br />
color:#fff;<br />
text-decoration:none;<br />
}</p>
<p>Please ignore &#8220;snap_noshot&#8221; tag in my code, that&#8217;s if you are using Snap.com to advertise but don&#8217;t want Snap to show up on your ReTweet This! button.</p>
<p>I&#8217;ve borrowed <a href="http://dev-tips.com/featured/use-the-twitter-and-tinyurl-apis-to-create-a-wordpress-plugin">some code from Drew at Dev-Tips.com, thanks</a>! (He also has an example for a Wordpress plugin using TinyURL, slightly different method than mine but works too.)</p>

	Tags: <a href="http://tweethacking.com/tag/api/" title="api" rel="tag">api</a>, <a href="http://tweethacking.com/tag/couple-hours/" title="couple hours" rel="tag">couple hours</a>, <a href="http://tweethacking.com/tag/css-file/" title="css file" rel="tag">css file</a>, <a href="http://tweethacking.com/tag/div-class/" title="div class" rel="tag">div class</a>, <a href="http://tweethacking.com/tag/exec/" title="exec" rel="tag">exec</a>, <a href="http://tweethacking.com/tag/lt/" title="lt" rel="tag">lt</a>, <a href="http://tweethacking.com/tag/padding/" title="padding" rel="tag">padding</a>, <a href="http://tweethacking.com/tag/radius/" title="radius" rel="tag">radius</a>, <a href="http://tweethacking.com/tag/scratch/" title="scratch" rel="tag">scratch</a>, <a href="http://tweethacking.com/tag/server-request/" title="server request" rel="tag">server request</a>, <a href="http://tweethacking.com/tag/style-css/" title="style css" rel="tag">style css</a>, <a href="http://tweethacking.com/tag/substr/" title="substr" rel="tag">substr</a>, <a href="http://tweethacking.com/tag/target/" title="target" rel="tag">target</a>, <a href="http://tweethacking.com/tag/text-decoration/" title="text decoration" rel="tag">text decoration</a>, <a href="http://tweethacking.com/tag/turl/" title="turl" rel="tag">turl</a>, <a href="http://tweethacking.com/tag/url-server/" title="url server" rel="tag">url server</a>, <a href="http://tweethacking.com/tag/url-shortener/" title="url shortener" rel="tag">url shortener</a>, <a href="http://tweethacking.com/tag/url-shortening/" title="url shortening" rel="tag">url shortening</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://tweethacking.com/twitter-news/do-not-open-stalkdaily-links-on-twitter-its-a-worm/" title="Do NOT OPEN StalkDaily Links on Twitter, It&#8217;s a worm! (April 11, 2009)">Do NOT OPEN StalkDaily Links on Twitter, It&#8217;s a worm!</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://tweethacking.com/twitter-hacks/wordpress-twitter-hack-how-to-make-retweet-this-button-using-your-favorite-url-shortener/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
