<?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; sideblog</title>
	<atom:link href="http://www.interactivellama.com/blog/archives/tag/sideblog/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>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>
	</channel>
</rss>

