<?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>Interactive Llama :: Interactive media tutorials and tips &#187; plugin</title>
	<atom:link href="http://www.interactivellama.com/blog/archives/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.interactivellama.com/blog</link>
	<description>Interactive media tutorials and tips</description>
	<lastBuildDate>Wed, 23 Nov 2011 15:25:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>CSSsprite: Photoshop script combines two images for CSS hover</title>
		<link>http://www.interactivellama.com/blog/archives/photoshop-script-combine-two-images-css-hover-css-sprite/</link>
		<comments>http://www.interactivellama.com/blog/archives/photoshop-script-combine-two-images-css-hover-css-sprite/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 20:48:41 +0000</pubDate>
		<dc:creator>Stephen James</dc:creator>
				<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Productivity & Workflow]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actions]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sprite]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">/blog/?p=132</guid>
		<description><![CDATA[The need Professional web developers have been aware of CSS sprites or CSS rollovers/hovers since 2004 (The rollover term is taken from JavaScript and the hover term is taken from CSS). They are the background graphics that change position based on mouse hover thus eliminating the need for JavaScript image swaps and image caching since [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-135" title="csssprites_before" src="/blog/wp-content/uploads/2008/11/csssprites_before-300x123.jpg" alt="" width="300" height="123" /></p>
<p><img class="alignnone size-medium wp-image-136" title="csssprites_after" src="/blog/wp-content/uploads/2008/11/csssprites_after-300x132.jpg" alt="" width="300" height="132" /></p>
<p><strong>The need<br />
</strong></p>
<p>Professional web developers have been aware of <a href="http://www.alistapart.com/articles/sprites/">CSS sprites</a> or CSS rollovers/hovers since 2004 (The rollover term is taken from JavaScript and the hover term is taken from CSS).  They are the background graphics that change position based on mouse hover thus eliminating the need for JavaScript image swaps and image caching since the &#8220;mouse on&#8221; and &#8220;mouse off&#8221; are one image. I have been using sprites for years. It is a more tedious process than clicking Swap image on a DreamWeaver drop down menu, but it produces more accessible and more clean code. The most tedious part of creating CSS sprites for menu navigation is aligning the static (in-active) and hover (active) images. This script solves this problem by taking two images and merging them into one. I hope this increases your productivity and creates a more standards-compliant web.</p>
<p><span id="more-132"></span></p>
<p>There are <a href="http://spritegen.website-performance.org/">online CSS sprite generators</a> out there. My Photoshop script is not as remarkable as these 20 image sprites, but it’s much simpler, and you can assign a keyboard shortcut to it. Also, all my sites are designed in Illustrator which is a slightly different work flow than most. I find that Photoshop is an awful layout program.</p>
<p><a href="/blog/wp-content/uploads/2008/11/CSSsprite.jsx">Download CSSsprite.jsx</a></p>
<p><strong>Installation<br />
</strong></p>
<p>A JSX script is similar to a Photoshop plugin or an action, but are commands in Photoshop&#8217;s JavaScript based script interface. Download and copy this script within the Presets&gt;&gt;Scripts folder of your Photoshop application folder:</p>
<ul>
<li>OS-X: Macintosh HD/Applications/Adobe Photoshop CS3/Presets/Scripts/</li>
<li>Windows: Program Files/Photoshop CS/Presets/Scripts</li>
</ul>
<p>The Script will appear under File&gt;&gt;Scripts&gt;&gt;CSSsprite on the menu. You can assign a keyboard shortcut to this script. I prefer Control+Command+S. This shortcut fits well with the Save for Web shortcut, Command+Alt+Shift+S.</p>
<p><strong>Usage<br />
</strong></p>
<p>Open two files (and <em>only</em> two files) with the same height and width (if they are different sizes, the offset of your hover button state will not be half of the height). Select the non-hover background image, making it active&#8211;thus making the hover background image de-active. Run the script from the Scripts menu mentioned above. This will place the hover background image on the bottom of the sprite. This script does not support adding a third state to the sprite, but you could add a third <em>and</em> fourth state. To do this, first combine the third and fourth state, and then combine that image with the normal/hover sprite.</p>
<p><strong>For your information: States for this script</strong></p>
<p>The following is a list of Photoshop commands that are executed in this script:</p>
<ul>
<li>Convert Image Mode to RGB</li>
<li>Make horizontal guide at 100% of canvas height</li>
<li>Switch to inactive document (-1 in document array)</li>
<li>&#8220;Duplicate Layer. . .&#8221; Layer Menu via right click</li>
<li>Switch back to inactive document (+1 in document array)</li>
<li>Double canvas size vertically</li>
<li>Transform/Move top layer down (50% of canvas size)</li>
<li>Zoom In (twice)</li>
</ul>
<p><strong>Result<br />
</strong>This gives you a two-layered Photoshop file with second layer the CSS hover layer. Save the file as GIF, PNG, or JPEG using File&gt;&gt;Save for Web.</p>
<p><strong>Notes<br />
</strong>Adobe Photoshop JavaScript is the only cross-platform scripting language for Photoshop. <em>This script was only tested Photoshop CS3 Extended (Mac)</em>. Our firm does not use Photoshop for web layout&#8211;only for image manipulation. We use Illustrator for layout.</p>
<p>I would like to thank the creators of <a href="http://blogs.adobe.com/crawlspace/2006/05/installing_and_1.html">ScriptingListenerJS</a> and <a href="http://ps-scripts.cvs.sourceforge.net/viewvc/ps-scripts/xtools/xapps/">ActionToJavaScript</a>.</p>
<p>You may be interested in this <a href="http://arnaumarch.com/en/sprites.html">PhotoShop script that creates a sprite from all the images in a folder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.interactivellama.com/blog/archives/photoshop-script-combine-two-images-css-hover-css-sprite/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Create reading list in WordPress from Amazon Wish List using Yahoo! Pipes</title>
		<link>http://www.interactivellama.com/blog/archives/reading-list-wordpress-amazon-wish-list-with-yahoo-pipes-rss/</link>
		<comments>http://www.interactivellama.com/blog/archives/reading-list-wordpress-amazon-wish-list-with-yahoo-pipes-rss/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 19:18:04 +0000</pubDate>
		<dc:creator>Stephen James</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Productivity & Workflow]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[amazon book]]></category>
		<category><![CDATA[amazon wish list]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[plug ins]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[reading list]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yahoo pipes]]></category>

		<guid isPermaLink="false">/blog/?p=127</guid>
		<description><![CDATA[I read many books from the library. I don&#8217;t finished reading many books though. First of all, they are free, since they are from the library, and second my attention span doesn&#8217;t last that long. I believe browsing the web daily from age 14 (circa 1996) will do that to someone (read the latest cover [...]]]></description>
			<content:encoded><![CDATA[<p>I read many books from the library. I don&#8217;t finished reading many books though. First of all, they are free, since they are from the library, and second my attention span doesn&#8217;t last that long. I believe browsing the web daily from age 14 (circa 1996) will do that to someone (read the latest cover story in The Atlantic Monthly, is <a href="http://www.theatlantic.com/doc/200807/google">Google Making Us Stoopid</a>). Most of the books I read come from the magazines I read (<a href="http://www.theatlantic.com/">The Atlantic</a>, <a href="http://www.christianitytoday.com/books/">Books &amp; Culture: A Christian Review</a>) or from the podcasts I listen to (<a href="http://www.wamu.org/programs/dr/">Diane Rehm</a>, <a href="http://www.twit.tv/">This Week in Tech</a>).</p>
<p>Either way, I want to share my latest reading endeavors across my blogs. But how?<span id="more-127"></span></p>
<p>Originally I used Roblog&#8217;s WordPress Plugin, <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading">Now Reading</a>, It&#8217;s truly a great plug-in. You can search Amazon for your book and grab the information. It has <em>Now Reading</em>, <em>Have Read</em> and <em>Planned Reading</em> sections. You can rate your books and write reviews. I discovered early on that I was not interested in writing reviews of the books. The other drawback was that it was locked into one blog. I placed it my Cultured Media blog where I list the podcasts and media that I listen to. I wanted to place my current reading in the sidebar or the footer of all my blogs&#8211;and why stop there? Why not Facebook, too? The other problem is that I didn&#8217;t want to search for the name of the book on Amazon, then log into my blog and paste the name into Now Reading to add it.</p>
<p>Portable list of information that can be subscribed to from multiple locations? Sounds like RSS feeds to me. I found an Amazon Wish List import for <a href="http://www.pipes.yahoo.com/">Yahoo! Pipes</a>. It did an XML look-up on any public wish list and then published the information you wanted. I cloned it to my Pipes page, and soon found out it was an old version of Amazon Web Services. After a few hours spent parsing, the new version 4 web services offering from Amazon, I was good to go.</p>
<p>The limitation of my <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=9d73ba552398cb835e2cf1de47599ad7">Amazon-Yahoo! Pipes RSS lookup</a> is that you can only grab one page of items at a time. This isn&#8217;t a problem for my use. I didn&#8217;t want more than 10 items anyway.</p>
<p>Once, you have your pipes set up, then use <a href="http://rawlinson.us/blog/articles/feedlist-plugin/">FeedList</a> to display your RSS feed from Yahoo! Pipes. An example of this is at the bottom of my blog. When I want to update my reading list, I add an item to my <a href="http://www.amazon.com/gp/registry/wishlist/3O81AFRHPVBBX/">Amazon Wish List</a>. And there&#8217;s nothing to limit this process to books. Whatever you add your Amazon Wish List will show up in the feed&#8211;not only books.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.interactivellama.com/blog/archives/reading-list-wordpress-amazon-wish-list-with-yahoo-pipes-rss/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SideBlog changes: remove titles, link post content</title>
		<link>http://www.interactivellama.com/blog/archives/sideblog-changes-remove-titles-link-post-content/</link>
		<comments>http://www.interactivellama.com/blog/archives/sideblog-changes-remove-titles-link-post-content/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 15:12:54 +0000</pubDate>
		<dc:creator>Stephen James</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sideblog]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">/blog/?p=126</guid>
		<description><![CDATA[As you already know, I post all my non-reply tweets from Twitter on my personal blog with Twitter Tools. I do not display the posts with the Twitter Tools widget, but with SideBlog. With SideBlog you can place all posts from a particular category in the sidebar. I have chosen to show only my &#8220;Tweets [...]]]></description>
			<content:encoded><![CDATA[<p>As you already know, I <a href="/blog/archives/ignore-direct-tweets-and-seo-urls-with-twitter-tools-wordpress-plug-in/">post all my non-reply tweets from Twitter</a> on my personal blog with Twitter Tools. I do not display the posts with the Twitter Tools widget, but with <a href="http://wordpress.org/extend/plugins/sideblog/">SideBlog</a>. With SideBlog you can place all posts from a particular category in the sidebar. I have chosen to show only my &#8220;Tweets from Twitter&#8221; category. The original output of SideBlog places a title, post content and a permalinked &#8220;#&#8221; at the end of the post. This wasn&#8217;t minimalistic enough, and on top of that with Twitter Tools the first 40 characters of your content is your title, so you are repeating yourself. I don&#8217;t care for the pound sign, &#8220;#&#8221;, either. So I made the following changes to the plug-in.<span id="more-126"></span></p>
<p><strong>Edit One</strong><br />
This edit comments out all the SideBlog plug-in&#8217;s output except for the permalink and the content. You will find this code within SideBlog 5.1 at about line 170 within the function, sideblog($asidecategory=&#8221;).</p>
<pre><code class="js">// smjdesign BEGIN edit
$replacements[] = $sideblog_content-&gt;post_title;
// $replacements[] = wpautop($sideblog_content-&gt;post_content);
// $replacements[] = "&lt;a href=\"" . $permalink . "\"&gt;#&lt;/a&gt;";
$replacements[] = "&lt;a href=\"" . $permalink . "\"&gt;"
.format_if_content_contains_link($sideblog_content-&gt;post_content);
// $replacements[] = "&lt;a href=\"" . $permalink . "\" title=\""
.$sideblog_content-&gt;post_title . "\"&gt;"
.$sideblog_content-&gt;post_title . "&lt;/a&gt;";
// $replacements[] = $sideblog_content-&gt;post_date;
// $replacements[] = "&lt;a href=\"" . $permalink . "\"&gt;"
.$sideblog_content-&gt;post_date . "&lt;/a&gt;";
// $replacements[] = $excerpt;
// $replacements[] = $excerpt2;
// smjdesign END edit</code></pre>
<p><strong>Edit Two:<br />
</strong>Place the function, format_if_content_contains_link(), within sideblog.php. I have placed around line 200 after function, sideblog(). This function tests to see if the post content contains a link. There are better (non Regular Expression) ways to do this with PHP5. This function is needed to make content that contain links valid HTML (or XHTML). If not used, links tags will encapsulate other links tags.</p>
<pre><code>// smjdesign BEGIN edit
function format_if_content_contains_link($content) {
	if( substr($content, strlen($content)-4 , 4) == "&lt;/a&gt;" ) {
		$content_arr = split("&lt;a href",$content);
		$content = preg_replace( "/&lt;a href/", "&lt;/a&gt;&lt;a href", $content, 1);
	}
	else {
		$content .= "&lt;/a&gt;";
	}
	return ($content);
}
// smjdesign END edit</code></pre>
<p>You can view the output of these changes in the sidebar at my personal site, <a href="http://www.smjdesign.com/rachelandstephen/">Rachel and Stephen</a>.</p>
<p><strong>How to keep SideBlog posts within your post query</strong></p>
<p>I noticed that quite a few people are discovering this page by wanting to NOT exclude &#8220;SideBlog categories&#8221; from the general post query (i.e.- from index.php). To do that, you will want to remove/comment out the filter:</p>
<pre><code>add_filter('pre_get_posts','sideblog_post_filter');<code></pre>
<p>from the sideblog.php plugin file. I like to include my "SideBlog category" within the general listing, since these are asides or mini-posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.interactivellama.com/blog/archives/sideblog-changes-remove-titles-link-post-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change media and images to full size in WordPress media gallery</title>
		<link>http://www.interactivellama.com/blog/archives/change-media-and-images-to-full-size-in-wordpress-media-gallery/</link>
		<comments>http://www.interactivellama.com/blog/archives/change-media-and-images-to-full-size-in-wordpress-media-gallery/#comments</comments>
		<pubDate>Thu, 22 May 2008 00:15:09 +0000</pubDate>
		<dc:creator>Stephen James</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[HTML and CSS]]></category>
		<category><![CDATA[Productivity & Workflow]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image width]]></category>
		<category><![CDATA[maximum image size]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plug_in]]></category>
		<category><![CDATA[Rachel Steely]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">/blog/?p=122</guid>
		<description><![CDATA[I&#8217;ve been familiarizing myself with WordPress 2.5&#8242;s new media gallery. If you&#8217;ve visited my blog before, you know I don&#8217;t upload many images, but I&#8217;m hoping to upload many images to my wife, Rachel Steely&#8217;s website. I was annoyed to find out that the default image posting size is medium (which is about 300px). On [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been familiarizing myself with WordPress 2.5&#8242;s new media gallery. If you&#8217;ve visited my blog before, you know I don&#8217;t upload many images, but I&#8217;m hoping to upload many images to my wife, <a href="http://www.rachelsteely.com">Rachel Steely&#8217;s website</a>. I was annoyed to find out that the default image posting size is medium (which is about 300px). On top of that, if you select full size, it doesn&#8217;t mean full size. It means your WordPress theme&#8217;s column width. So unless you are using Kubrick your media size will not be your column width.<span id="more-122"></span></p>
<p><strong>Change Full Size image width to match theme</strong></p>
<p>The column width in WordPress&#8217;s default theme Kubrick is 500px. Therefore, the default (maximum) image size is 500px. The column width of the blog I am posting to is 614px. You can set a global variable to change this setting. Create if not already existing functions.php in your theme directory. Define your maximum media width (that is &#8220;Full Size&#8221; in the Gallery interface):<br />
<code><br />
&lt;?php<br />
$content_width = 614;<br />
?&gt;</code></p>
<p>I&#8217;ve set mine to 614 pixels since that is the width of my div with the class  &#8220;.entry&#8221; minus padding. If this does not work, some have solved this problem with $GLOBALS['content_width'] = 614; also. You can view this setting at a post at <a href="http://www.rachelsteely.com/blog/photos-from-wheeler-spring-open-house/">RachelSteely.com</a>.</p>
<p><strong>Default media to Full Size</strong></p>
<p>I prefer to justify my media (align left and right) to the column width. To do this, set default selected size to &#8220;Full Size&#8221; by changing the code in /wp-admin/includes/media.php. Move the &#8216;checked&#8217; radio attribute from Medium to Full Size.</p>
<p>Line 458:<br />
<code><br />
" : '' ) . "&lt;input type='radio' name='attachments[$post-&gt;ID][image-size]' id='image-size-medium-$post-&gt;ID' value='medium' checked='checked' /&gt;<br />
&lt;label for='image-size-medium-$post-&gt;ID'&gt;" . __('Medium') . "&lt;/label&gt;<br />
&lt;input type='radio' name='attachments[$post-&gt;ID][image-size]' id='image-size-full-$post-&gt;ID' value='full' /&gt;<br />
</code></p>
<p>change to<br />
<code><br />
" : '' ) . "&lt;input type='radio' name='attachments[$post-&gt;ID][image-size]' id='image-size-medium-$post-&gt;ID' value='medium' /&gt;<br />
&lt;label for='image-size-medium-$post-&gt;ID'&gt;" . __('Medium') . "&lt;/label&gt;<br />
&lt;input type='radio' name='attachments[$post-&gt;ID][image-size]' id='image-size-full-$post-&gt;ID' value='full' checked='checked' /&gt;</code></p>
<p>And that&#8217;s it! Happy uploading with the new and improved (and customized) WordPress media gallery.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.interactivellama.com/blog/archives/change-media-and-images-to-full-size-in-wordpress-media-gallery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ignore reply tweets and SEO URLs with Twitter Tools WordPress Plug-in</title>
		<link>http://www.interactivellama.com/blog/archives/ignore-direct-tweets-and-seo-urls-with-twitter-tools-wordpress-plug-in/</link>
		<comments>http://www.interactivellama.com/blog/archives/ignore-direct-tweets-and-seo-urls-with-twitter-tools-wordpress-plug-in/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 04:20:09 +0000</pubDate>
		<dc:creator>Stephen James</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Current Events]]></category>
		<category><![CDATA[Productivity & Workflow]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plug_in]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">/blog/archives/ignore-direct-tweets-and-seo-urls-with-twitter-tools-wordpress-plug-in/</guid>
		<description><![CDATA[It&#8217;s been a hot debate over what to include in your blog&#8217;s RSS recently. I say you should include more than blog posts in your RSS feed IF (and this is a big if) you can editorialize what goes in. The following, explains how to change which tweets from Twitter get posted to your blog [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a hot debate over what to include in your blog&#8217;s RSS recently. I say you should include more than blog posts in your RSS feed IF (and this is a big if) you can editorialize what goes in. The following, explains how to change which tweets from Twitter get posted to your blog and into your RSS feed.</p>
<p>If you use Alex King&#8217;s <a href="http://alexking.org/projects/wordpress">Twitter Tools</a> (version: 1.1b1), you will want to make the following two changes to his code. The first one will make your tweet-post URLs and title more beautiful and SEO friendly by not splitting words at the end. The second one will remove reply tweets (&#8216;@username&#8217;) from becoming posts in your blog, so that half-conversations do not get recorded.<span id="more-120"></span></p>
<p>In Alex King&#8217;s purpose, Twitter Tools is an archiving tool that saves tweets into his blog. If you use version: 1.2b1, then Twitter Tools can <em>hide</em> reply tweets (those beginning with &#8216;@&#8217;) from displaying in the Twitter Tools sidebar widget, but <em>it will still save every tweet as a blog post</em>. In my purpose of Twitter Tools, I do not want to save (and thus post) tweets that begin with &#8216;@.&#8217; Therefore you will still need to add the additions to the do_tweet_post function below. If you do not, all tweets will end up in your RSS feed as blog posts.</p>
<p><strong>Let&#8217;s not mince words here</strong></p>
<p>If you link your tweets and publish them in your RSS feed, you may have noticed that Twitter Tools trims tweets at 30 characters and usually cuts off a title mid-word. It would be better to index to the previous space and trim the post-slug there. Replacing the code of the function, <strong>trim_add_elipsis</strong> (at about line 1030 in twitter-tools.php, before function ak_gmmktime()) with the code that follows will do this:</p>
<pre><code>if (!function_exists('trim_add_elipsis')) {
// smjdesign edit begin - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function trim_add_elipsis($string, $limit = 100) {
// shorten string
$string = substr($string, 0, $limit);
//find last space character
$max_char_pos = strrpos($string, ' ');
// shorten to last space and add ellipsis
if ($max_char_pos &gt; 0)    { $string = substr($string, 0, $max_char_pos)."..."; }
return $string;
}
// smjdesign edit end - - - - - - - - - - - - - - - - - - - - - - - - - - - -</code></pre>
<p><em>As a bonus, </em>I&#8217;ll tell you were you can change the length of the title, too. It&#8217;s around line 205 within the do_tweet_post function. Look for a &#8217;30&#8242; at the end of a line containing &#8220;trim_add_elipsis&#8221; Change the &#8217;30&#8242; to something larger, for instance 40 or 50.</p>
<p><strong>When indirect communication is preferred </strong></p>
<p><em>UPDATE: Alex has made ignoring reply tweets (beginning with &#8216;@&#8217;) a standard option within Twitter Tools. However, I still recommend changing the trim size as I mention above.</em></p>
<p>I can&#8217;t imagine using Twitter Tools without the following change. If not made, one will be listing half conversations in their blog. In order to ignore direct tweets (or more specifically tweets that start with &#8216;@&#8217;), edit the following code at the end of the <strong>do_tweet_post</strong> function (at about line 215 in twitter-tools.php):</p>
<pre><code>function do_tweet_post($tweet) {
global $wpdb;
remove_action('publish_post', 'aktt_notify_twitter');
$data = array(
'post_content' =&gt; $wpdb-&gt;escape(aktt_make_clickable($tweet-&gt;tw_text))
// smjdesign edit begin - - - - - - - - - - - - - - - - - - - - - - - - - - - -
, 'post_title' =&gt; $wpdb-&gt;escape(trim_add_elipsis($tweet-&gt;tw_text, 40))
// smjdesign edit end - - - - - - - - - - - - - - - - - - - - - - - - - - - -
, 'post_date' =&gt; get_date_from_gmt(date('Y-m-d H:i:s', $tweet-&gt;tw_created_at))
, 'post_category' =&gt; array($this-&gt;blog_post_category)
, 'post_status' =&gt; 'publish'
, 'post_author' =&gt; $wpdb-&gt;escape($this-&gt;blog_post_author)
);
// smjdesign edit begin - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if(substr($data["post_content"], 0, 1) != '@') {
$post_id = wp_insert_post($data);
add_post_meta($post_id, 'aktt_twitter_id', $tweet-&gt;tw_id, true);
wp_set_post_tags($post_id, $this-&gt;blog_post_tags);
}
// smjdesign edit end - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add_action('publish_post', 'aktt_notify_twitter');
}</code></pre>
<p>As always, you can email me from <a href="http://www.smjdesign.com/rachelandstephen/contact-rachel-steely-and-stephen-james/">the contact page</a> and ask me for the entire PHP file if you do not feel comfortable editing the file yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.interactivellama.com/blog/archives/ignore-direct-tweets-and-seo-urls-with-twitter-tools-wordpress-plug-in/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

