<?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>edsysad.org &#187; Arras</title>
	<atom:link href="http://edsysad.org/tag/arras/feed/" rel="self" type="application/rss+xml" />
	<link>http://edsysad.org</link>
	<description>another ed blogger....</description>
	<lastBuildDate>Wed, 04 Apr 2012 03:46:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
<div id="wdsb-share-box" style="border:2px solid;">
	<ul>
			<li>
						<div class="wdsb-item" id="wdsb-service-google">
				<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="tall"></g:plusone>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-facebook">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fedsysad.org%2F2009%2F09%2F07%2Farras-theme-with-wpmu%2F&amp;send=false&amp;layout=box_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=60" scrolling="no" frameborder="0" style="border:none; width:58px; height:62px;" allowTransparency="true"></iframe>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-twitter">
				<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-stumble_upon">
				<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-reddit">
				<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-linkedin">
				<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="top"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-pinterest">
							</div>
		</li>
		</ul>
</div>	<item>
		<title>Arras Theme with WPMU</title>
		<link>http://edsysad.org/2009/09/07/arras-theme-with-wpmu/</link>
		<comments>http://edsysad.org/2009/09/07/arras-theme-with-wpmu/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 04:09:54 +0000</pubDate>
		<dc:creator>Andrew Chlup</dc:creator>
				<category><![CDATA[WordpressMU]]></category>
		<category><![CDATA[Arras]]></category>

		<guid isPermaLink="false">http://edsysad.org/?p=132</guid>
		<description><![CDATA[****No longer works in WP 3.0**** So I had a teacher who really wanted to use the Arras theme with their class. Unfortunately, it didn&#8217;t play nicely with WPMU. I tinkered for a couple of hours and I think that I have a semi-workable solution. Basically, I did two things: I added the necessary WP [...]]]></description>
			<content:encoded><![CDATA[<p>****No longer works in WP 3.0****</p>
<p>So I had a teacher who really wanted to use the <a href="http://www.arrastheme.com/">Arras theme</a> with their class. Unfortunately, it didn&#8217;t play nicely with WPMU.</p>
<p>I tinkered for a couple of hours and I think that I have a semi-workable solution.</p>
<p>Basically, I did two things:</p>
<ol>
<li>I added the necessary WP includes so that you can use all of the regular WPMU functions.</li>
<li>I added some logic that made it work with a multiple blog setup.</li>
</ol>
<p>***I am not a programmer by trade, so there may be major mistakes in my logic. Hopefully this will help you get started. ***</p>
<p>First, I added the WPMU includes to the top of the /library/timthumb.php</p>
<p>[code]<br />
include('../../../../wp-blog-header.php');<br />
include('../../../../wp-includes/general-template.php');<br />
[/code]</p>
<p>This made it possible to use regular WPMU function calls.</p>
<p>Next, I went down to line 520 and added some code to the function using WPMU functions.</p>
<p>[code]<br />
/**<br />
* tidy up the image source url<br />
*/<br />
function cleanSource($src) {<br />
//<span style="color: #ff0000;">Added Globals for functions</span><br />
global $current_blog, $current_site;</p>
<p>// remove slash from start of string<br />
if(strpos($src, "/") == 0) {<br />
$src = substr($src, -(strlen($src) - 1));<br />
}</p>
<p>// remove http/ https/ ftp<br />
$src = preg_replace("/^((ht|f)tp(s|):\/\/)/i", "", $src);<br />
// remove domain name from the source url<br />
//<span style="color: #ff0000;">Changed path logic</span><br />
$path = $current_blog-&gt;path;<br />
$path = str_replace("/", "", $path);<br />
$host = $_SERVER["HTTP_HOST"]. '/'. $path ;</p>
<p>$src = str_replace($host, "", $src);</p>
<p>//<span style="color: #ff0000;">Added blogs.dir logic</span><br />
$src = str_replace("/files/", "blogs.dir/". $current_blog-&gt;blog_id . "/files/", $src);<br />
$host = str_replace("www.", "", $host);<br />
$src = str_replace($host, "", $src);</p>
<p>// don't allow users the ability to use '../'<br />
// in order to gain access to files below document root</p>
<p>// src should be specified relative to document root like:<br />
// src=images/img.jpg or src=/images/img.jpg<br />
// not like:<br />
// src=../images/img.jpg<br />
$src = preg_replace("/\.\.+\//", "", $src);</p>
<p>//print_r($_SERVER);</p>
<p><del datetime="2009-10-05T03:33:39+00:00">// get path to image on file system. <span style="color: #ff0000;">Changed from original.</span><br />
$src = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/'. $src;</del></p>
<p><del datetime="2009-10-05T03:33:39+00:00">return $src;</del></p>
<p>// get path to image on file system. <span style="color: #ff0000;">Appended 10/4</span><br />
if ($current_blog-&gt;blog_id == 1) {<br />
$src = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/blogs.dir/1/'. $src;</p>
<p>return $src;</p>
<p>}else{</p>
<p>$src = $_SERVER['DOCUMENT_ROOT'] . '/wp-content/'. $src;</p>
<p>return $src;<br />
}</p>
<p>}</p>
<p>[/code]</p>
<p>It worked for me and hopefully it will work for you. Here is the php timthumb that I used.</p>
<p><span style="text-decoration: line-through;"><a href="http://edsysad.org/wp-content/uploads/2009/09/timthumb.php.zip">timthumb.php</a></span></p>
<p>Updated 10/4 &#8211; <a href="http://edsysad.org/wp-content/uploads/2009/09/timthumb.php.zip">timthumb.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://edsysad.org/2009/09/07/arras-theme-with-wpmu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

