<?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>WordPress &#34;Must-Use&#34; Tutorials&#187; Hacks</title>
	<atom:link href="http://wpmututorials.com/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpmututorials.com</link>
	<description>WordPress multisite how to - making sense of the network feature from what was wordpress mu</description>
	<lastBuildDate>Fri, 06 Jan 2012 13:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Network CSS hack</title>
		<link>http://wpmututorials.com/hacks/network-css-hack/</link>
		<comments>http://wpmututorials.com/hacks/network-css-hack/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 17:10:49 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[network admin]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=569</guid>
		<description><![CDATA[In mid-March we had a couple users sign up at our GenesisConnect demo site in short succession. A few hours after the second registration both users posted numerous spam links to the activity stream. A quick check of the access log showed that both users had logged in from the same IP address. Naturally I [...]]]></description>
			<content:encoded><![CDATA[<p>In mid-March we had a couple users sign up at our <a href="http://rennickmedia.com/go/connect/">GenesisConnect demo site</a> in short succession. A few hours after the second registration both users posted numerous spam links to the activity stream. A quick check of the access log showed that both users had logged in from the same IP address. </p>
<p>Naturally I spammed both accounts. After I spammed the second account in network admin, it appeared as though the user was not spammed. To double check, I visited the user&#8217;s BP profile which showed that it had been spammed. Using <a href="http://getfirebug.com/">Firebug</a> I found that the alternating table CSS was overriding the site/user status CSS.</p>
<p>I edited /wp-admin/css/ms.css to tweak the status CSS so it wouldn&#8217;t be overridden. Once I had a fix, I checked <a href="http://core.trac.wordpress.org/">WordPress trac</a> and found an <a href="https://core.trac.wordpress.org/ticket/16827">existing ticket for the same issue</a>. The ticket now has patches to fix the issue. However, those patches did not make it into WP 3.1.1.</p>
<p>With a bit of further research I found that the change was a regression in an attempt to <a href="http://core.trac.wordpress.org/ticket/15558">make the CSS global</a> in <a href="http://core.trac.wordpress.org/changeset/16902/trunk/wp-admin/css/ms.dev.css">this patch</a> which has a second minor slip. The patch changed #faa to #faafaa. However #faa is a short form of #ffaaaa not #faafaa. Both the above issues are fixed in <a href="http://wpmututorials.com/wp-content/plugins/download-monitor/download.php?id=25" title="Downloaded 53 times" >Network Admin 3.1 CSS fix (53)</a>. Upload it to wp-admin/css/ms.css.</p>
<hr />
<p><small>© Ron for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2011. |
<a href="http://wpmututorials.com/hacks/network-css-hack/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/network-css-hack/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/network-css-hack/&title=Network CSS hack">del.icio.us</a>
<br/>
Post tags: <a href="http://wpmututorials.com/tag/css/" rel="tag">css</a>, <a href="http://wpmututorials.com/tag/hack/" rel="tag">hack</a>, <a href="http://wpmututorials.com/tag/network-admin/" rel="tag">network admin</a><br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/network-css-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing subfolder blogs</title>
		<link>http://wpmututorials.com/hacks/forcing-subfolder-blogs/</link>
		<comments>http://wpmututorials.com/hacks/forcing-subfolder-blogs/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 14:00:00 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=513</guid>
		<description><![CDATA[Yes, I put this under Hacks, even though technically you&#8217;re not changing core files. In certain circumstances &#8211; the main one being your blog has been active for more than 30 days &#8211; when you try and create a network, you&#8217;ll receive a message stating that your blog is too old, and you will not [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, I put this under Hacks, even though technically you&#8217;re not changing core files.</p>
<p>In certain circumstances &#8211; the main one being your blog has been active for more than 30 days &#8211; when you try and create a network, you&#8217;ll receive a message stating that your blog is too old, and you will not get a choice of format. You&#8217;ll be forced to use subdomains. this is because the subfolder format stuffs a /blog/ in the permalinks on the main site only, to prevent URL collisions with subfolder sites that may be named the same as some pages. </p>
<p>What if this doesn&#8217;t fit your plans? What if wildcard subdomains are unavailable at your webhost or you&#8217;re off in a folder?</p>
<p>You can actually change the format. You just need to do it after you create the network. Follow the usual steps as listed in the <a href="http://codex.wordpress.org/Create_A_Network">Create a Network codex page</a>. Once the setup is complete, open up wp-config.php one more time. Find this line:</p>
<p><code>define( 'SUBDOMAIN_INSTALL', true );</code></p>
<p>See where it says true? Change it to false. Now you have subfolders. The only other thing to do is go back to the network setup page and grab the new subfolder-specific rewrite rules.</p>
<p>You will still have /blog/ in your permalinks. I&#8217;ll go over how to remove it (and the hazards) in another post.</p>
<p>I also covered this in my <a href="http://wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress/">free ebook on how to set up multisite</a>.</p>
<p>Please note that if you have an exisiting network with working, usable subdomain sites, you cannot use this method to convert them to subfolders.</p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2011. |
<a href="http://wpmututorials.com/hacks/forcing-subfolder-blogs/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/forcing-subfolder-blogs/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/forcing-subfolder-blogs/&title=Forcing subfolder blogs">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/forcing-subfolder-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Community Service</title>
		<link>http://wpmututorials.com/hacks/community-service/</link>
		<comments>http://wpmututorials.com/hacks/community-service/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 17:52:21 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress mu]]></category>
		<category><![CDATA[wp-wmpu merge]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=289</guid>
		<description><![CDATA[In this comment, Jane Wells mentioned the idea of volunteering for 2 hrs per month toward the WordPress community. Even though Andrea &#038; I do significantly more hours than that on any month, I think it&#8217;s a great idea. So, last night I revisited the exploratory development work I did a few months back. The [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://apeatling.wordpress.com/2009/09/25/give-a-little/#comment-7277">this comment</a>, <a href="http://jane.wordpress.com/">Jane Wells</a> mentioned the idea of volunteering for 2 hrs per month toward the WordPress  community. Even though Andrea &#038; I do significantly more hours than that on any month, I think it&#8217;s a great idea. So, last night I revisited the <a href="http://wpmututorials.com/hacks/muing-wp/">exploratory development</a> work I did a few months back. </p>
<p>The reason I chose to revisit that particular project was that the discussion of the code base merge between WordPress and WordPress MU resurfaced again.  The merge was announced about 4 months ago. About once a month a conversation sparks about the uncertain outcome of the merge. What&#8217;s unfortunate about those conversations is that most of the code merge has already been done. </p>
<p>The 3 significant things remaining to be done to merge the two code bases are:</p>
<ol>
<li>Implement a common installation process</li>
<li>Implement a common registration process</li>
<li>Develop the ability to turn on multi-blogs via option settings</li>
</ol>
<p>The link below is to an archive containing a slightly modified version of WordPress MU. I added 2 check boxes to the install screen:</p>
<p><a href="http://wpmututorials.com/files/2009/09/install-extra.png"><img src="http://wpmututorials.com/files/2009/09/install-extra.png" alt="install-extra" title="install-extra" width="744" height="150" class="alignleft size-full wp-image-290" /></a></p>
<p>If you <strong>do not</strong> check the &#8220;Use the existing WordPress blog as the main blog&#8221;, the installer will create a standard WordPress MU 2.8.5-dev install. The install should function the same as WordPress MU 2.8.5-dev from trac. </p>
<p>If you <strong>do</strong> check the &#8220;Use the existing WordPress blog as the main blog&#8221;, provide the database details for a standard WordPress 2.8.4 blog. The resulting install should function the same as a standard WordPress MU 2.8.5-dev from trac install. Note that the main blog&#8217;s upload directory will remain /wp-content/uploads. </p>
<p>The Terms of Use checkbox is there to remind the person installing that this is a development version. <strong>Please practice safe hex by using this on a test site.</strong> <a href="http://wpmututorials.com/wp-content/plugins/download-monitor/download.php?id=14" title="Version 2.8.5-dev downloaded 285 times" >WordPress Multi Blog (285)</a></p>
<hr />
<p><small>© Ron for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2009. |
<a href="http://wpmututorials.com/hacks/community-service/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/community-service/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/community-service/&title=Community Service">del.icio.us</a>
<br/>
Post tags: <a href="http://wpmututorials.com/tag/wordpress/" rel="tag">wordpress</a>, <a href="http://wpmututorials.com/tag/wordpress-mu/" rel="tag">wordpress mu</a>, <a href="http://wpmututorials.com/tag/wp-wmpu-merge/" rel="tag">wp-wmpu merge</a>, <a href="http://wpmututorials.com/tag/wpmu/" rel="tag">wpmu</a><br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/community-service/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Timthumb workaround</title>
		<link>http://wpmututorials.com/hacks/timthumb-workaround/</link>
		<comments>http://wpmututorials.com/hacks/timthumb-workaround/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 20:30:33 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[brute force]]></category>
		<category><![CDATA[stumped]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=284</guid>
		<description><![CDATA[Sometimes you have to use a theme that has timthumb deeply integrated. And sometimes when you use a theme like this and you&#8217;re using WordPressMU and you&#8217;re also using the Sitewide Tags plugin to push the posts to the front page. Normally I&#8217;d suggest ripping out timthumb and using Get the Image instead. It works [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you have to use a theme that has timthumb deeply integrated. And sometimes when you use a theme like this and you&#8217;re using WordPressMU and you&#8217;re also using the <a href="http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/">Sitewide Tags</a> plugin to push the posts to the front page. Normally I&#8217;d suggest ripping out timthumb and using <a href="http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin">Get the Image</a> instead. It works well and it&#8217;s simpler, using WP&#8217;s internal thumbnails, or even a linked image in a post if you want.</p>
<p>But, like I said above, sometimes you&#8217;re stuck.<br />
<code><br />
// in functions.php</code></p>
<p><code>function get_image_bid($url) {<br />
$bid = 1;<br />
if($url) {<br />
$start = strpos($url, '//');<br />
if($start &gt; 0) {<br />
$start += 2;<br />
$end = strpos($url, '/', $start) - $start;<br />
if($end &gt; 0) {<br />
$bid = get_blog_id_from_url(substr($url, $start, $end));<br />
}<br />
}<br />
}<br />
return $bid;<br />
}<br />
</code><br />
// in the image url</p>
<p>&lt;img src=&#8221;&lt;?php echo bloginfo(&#8216;template_url&#8217;);  ?&gt;/scripts/timthumb2.php?src=&lt;?php echo $image_src; ?&gt;&amp;amp;w=&lt;?php echo  $width; ?&gt;&amp;amp;h=&lt;?php echo $height; ?&gt;&amp;amp;zc=1&amp;amp;q=100&amp;amp;bid=&lt;?php  echo get_image_bid($image_src); ?&gt;&#8221;</p>
<p>If it helps someone finish up that project or stops them from banging their head, awesome. It was a one-time thing for me. </p>
<p>Using this a lot? The ever awesome <a href="http://twitter.com/binarymoon">@binarymoon</a> is now working on keeping timthumb updated. He&#8217;s <a href="http://www.binarymoon.co.uk/2009/07/timthumb-beta-test/">released a new beta version</a> you can try.</p>
<p>If you&#8217;re theme developer, please consider strongly updating your timthumb usage. It&#8217;ll have to work with MU properly at some point.</p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2009. |
<a href="http://wpmututorials.com/hacks/timthumb-workaround/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/timthumb-workaround/#comments">18 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/timthumb-workaround/&title=Timthumb workaround">del.icio.us</a>
<br/>
Post tags: <a href="http://wpmututorials.com/tag/brute-force/" rel="tag">brute force</a>, <a href="http://wpmututorials.com/tag/stumped/" rel="tag">stumped</a>, <a href="http://wpmututorials.com/tag/timthumb/" rel="tag">timthumb</a>, <a href="http://wpmututorials.com/tag/workaround/" rel="tag">workaround</a><br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/timthumb-workaround/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>MU&#8217;ing WP</title>
		<link>http://wpmututorials.com/hacks/muing-wp/</link>
		<comments>http://wpmututorials.com/hacks/muing-wp/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 21:18:51 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpressmu]]></category>
		<category><![CDATA[wp-wmpu merge]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=229</guid>
		<description><![CDATA[If you did not catch this on twitter (our twitter links are in the sidebar), I was experimenting with possibilities of how one could go about merging the WP &#038; WPMU codebases. Andrea wrote an initial post and yesterday Matt Mullenweg confirmed it in this comment. Most of the programming that I&#8217;ve done in the [...]]]></description>
			<content:encoded><![CDATA[<p>If you did not catch this on twitter (our twitter links are in the sidebar), I was experimenting with possibilities of how one could go about merging the WP &#038; WPMU codebases. Andrea wrote an <a href="http://wpmututorials.com/news/breaking-news-from-wordcamp-sf/">initial post</a> and yesterday Matt Mullenweg confirmed it in <a href="http://www.blogherald.com/2009/06/02/wordpress-and-wordpressmu-merged-whoa/#comment-1033204">this comment</a>.</p>
<p>Most of the programming that I&#8217;ve done in the last 20 years has been modifying other people&#8217;s code. Recently, I have worked mostly with WPMU but a few years ago I was writing plugins and theme functions for WP. After some thought on the task of merging the WP &#038; WPMU codebases I felt that the easiest route would be to modify WPMU so that it would run on the WP database structure without altering the WP data.</p>
<p>The process that I followed was</p>
<ul>
<li>Fresh install of WP 2.7.1</li>
<li>Wrote the second post in the blog</li>
<li>Move the WP folder and replaced it with a WPMU 2.7.1 install</li>
<li>Edited the wp-config to use the WP database</li>
<li>Worked my magic without modifying any of the WP tables or WPMU core files</li>
<li><a href="http://twitpic.com/6hqjb">a line in wp-config + 2 plugins = wpmu running on wp install</a></li>
<li><a href="http://twitpic.com/6hx7t">buddypress member on wpmu over wp</a></li>
<li><a href="http://twitpic.com/6hq5a">Buddypress home on wpmu over wp</a></li>
<li><a href="http://twitpic.com/6jbbo">edit apache vhost document root + restart = back to WP from WPMU</a> (to verify that the WP DB remained intact)</li>
</ul>
<p>I&#8217;m fairly sure that quite a few people are interested in knowing specifically what I did. I&#8217;m familiar with that feeling. However, having had a day or so to give it some thought, developing a common code base which would run on either a WP or WPMU database would be a nice to add to my list of accomplishments. Those interested in the potential of the common code base could purchase a support subscription at <a href="http://musupport.net">musupport.net</a>. Enough subscriptions would allow Andrea &#038; I to reduce our client load such that I could dedicate more time to a common code base.</p>
<hr />
<p><small>© Ron for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2009. |
<a href="http://wpmututorials.com/hacks/muing-wp/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/muing-wp/#comments">3 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/muing-wp/&title=MU&#8217;ing WP">del.icio.us</a>
<br/>
Post tags: <a href="http://wpmututorials.com/tag/wordpress/" rel="tag">wordpress</a>, <a href="http://wpmututorials.com/tag/wordpressmu/" rel="tag">wordpressmu</a>, <a href="http://wpmututorials.com/tag/wp-wmpu-merge/" rel="tag">wp-wmpu merge</a>, <a href="http://wpmututorials.com/tag/wpmu/" rel="tag">wpmu</a><br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/muing-wp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Manually upgrading to version 2.6.3</title>
		<link>http://wpmututorials.com/hacks/manually-upgrading-to-version-263/</link>
		<comments>http://wpmututorials.com/hacks/manually-upgrading-to-version-263/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 14:23:37 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=122</guid>
		<description><![CDATA[Overnight, the single-user WordPress of version 2.6.3 was released. This is considered a low-risk security upgrade, but already there&#8217;s a long thread and a trac ticket filed. Only two files are affected &#8211; wp-includes/class-snoopy.php and version.php. To upgrade wmpu 2.6.2 to 2.6.3 manually: Make a backup of /wp-includes/class-snoopy.php Download: http://trac.wordpress.org/export/9310/tags/2.6.3/wp-includes/class-snoopy.php Upload it to your server [...]]]></description>
			<content:encoded><![CDATA[<p>Overnight, the single-user WordPress of version 2.6.3 was released. This is considered a low-risk security upgrade, but already there&#8217;s a long thread and a trac ticket filed.</p>
<p>Only two files are affected &#8211; wp-includes/class-snoopy.php and version.php.</p>
<blockquote><p>To upgrade wmpu 2.6.2 to 2.6.3 manually:</p>
<p>Make a backup of /wp-includes/class-snoopy.php</p>
<p>Download:</p>
<p>http://trac.wordpress.org/export/9310/tags/2.6.3/wp-includes/class-snoopy.php</p>
<p>Upload it to your server into /wp-includes/ folder.</p>
<p>Now you only have to change the version of your WPMU.<br />
Edit /wp-includes/version.php and change &#8220;2.6.2&#8243; to &#8220;2.6.3&#8243;.</p></blockquote>
<p>Thanks to user buzz_lightyear, who is my forum favorite of the day. I&#8217;d also like to point out that <a href="http://trac.wordpress.org/changeset?new=trunk%2Fwp-includes%2Fclass-snoopy.php%409308&amp;old=trunk%2Fwp-includes%2Fclass-snoopy.php%408082">the file itself has changed very minorly</a>, only 8 diffs. So.. you know&#8230; calm down. <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Edit: <a href="http://ocaoimh.ie/2008/10/25/wordpress-mu-263/">Donncha has released WPMU 2.6.3</a>, which includes this and some minor bug fixes, so you can do just the above if you&#8217;re only concerned about the security issue, or you can do a minor upgrade.</p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2008. |
<a href="http://wpmututorials.com/hacks/manually-upgrading-to-version-263/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/manually-upgrading-to-version-263/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/manually-upgrading-to-version-263/&title=Manually upgrading to version 2.6.3">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/manually-upgrading-to-version-263/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Forcing MU to use www</title>
		<link>http://wpmututorials.com/hacks/forcing-mu-to-use-www/</link>
		<comments>http://wpmututorials.com/hacks/forcing-mu-to-use-www/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 14:22:32 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[comment out code]]></category>
		<category><![CDATA[force]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect error]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[subfolder]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/?p=93</guid>
		<description><![CDATA[Please note: version 3.x and above WILL allow you to use the www. No hacks or workarounds are needed. By default, Mu strips out the www on domain names. I&#8217;m not going to get into the debate of for or against, because at some point you just may be forced to use it for reasons [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Please note: version 3.x and above WILL allow you to use the www. No hacks or workarounds are needed.</strong></p>
<p>By default, Mu strips out the www on domain names. I&#8217;m not going to get into the debate of for or against, because at some point you just may be forced to use it for reasons beyond your immediate control. Whether you like it or not. <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>In case you somehow missed catching the the change in the address bar, symptoms may include a redirect error when trying to view the main page, even if it installed fine, and a constant page refresh when trying to login. So watch the address bar and see if it&#8217;s adding the www.</p>
<p>After a few eye-bleeding hours searching the forums and the forum tags, I finally found it <a href="http://mu.wordpress.org/forums/topic.php?id=379#post-23085">here</a>. (Did you know there&#8217;s actually two ways to search? I should probably write a post on that&#8230;)</p>
<p>The thread is a year old and the line numbers are slightly off, but most of it still applies. The rewrite rule to strip www is <strong>no longer in the htaccess file</strong> so don&#8217;t bang your head looking for it. <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>In my case, I did not want to reinstall again because of the setup it was more work. Here&#8217;s what I did:</p>
<p>- go into phpmyadmin and search for all instances of your domain name. Edit them to add the www to the domain name.</p>
<p>- Find wpmu-setting.php in your root folder. Comment out lines 10 and 11 like this:</p>
<blockquote><p><code>// if( substr( $domain, 0, 4 ) == 'www.' )<br />
//    $domain = substr( $domain, 4 );</code></p></blockquote>
<p>Those double-slashes in front of the lines keep that code from being run.</p>
<p>Go test your install, it should be okay. I should also mention that<strong> I only tested this on a subfolder install</strong>. I have no idea what it does on subdomains.</p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2008. |
<a href="http://wpmututorials.com/hacks/forcing-mu-to-use-www/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/forcing-mu-to-use-www/#comments">27 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/forcing-mu-to-use-www/&title=Forcing MU to use www">del.icio.us</a>
<br/>
Post tags: <a href="http://wpmututorials.com/tag/comment-out-code/" rel="tag">comment out code</a>, <a href="http://wpmututorials.com/tag/force/" rel="tag">force</a>, <a href="http://wpmututorials.com/tag/hack/" rel="tag">hack</a>, <a href="http://wpmututorials.com/tag/htaccess/" rel="tag">htaccess</a>, <a href="http://wpmututorials.com/tag/redirect-error/" rel="tag">redirect error</a>, <a href="http://wpmututorials.com/tag/search/" rel="tag">search</a>, <a href="http://wpmututorials.com/tag/subfolder/" rel="tag">subfolder</a>, <a href="http://wpmututorials.com/tag/www/" rel="tag">www</a><br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/forcing-mu-to-use-www/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>If you Hack, you should Track</title>
		<link>http://wpmututorials.com/hacks/if-you-hack-you-should-track/</link>
		<comments>http://wpmututorials.com/hacks/if-you-hack-you-should-track/#comments</comments>
		<pubDate>Mon, 26 May 2008 03:10:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/hacks/if-you-hack-you-should-track/</guid>
		<description><![CDATA[If you read my previous post, you&#8217;re already aware that I&#8217;m fairly new to WPMU, and this post is directed to those users who are just starting to find their way into the multi-user WordPress environment. Following is a quick tip that will help you immensely in the long run, but first some background information. [...]]]></description>
			<content:encoded><![CDATA[<p>If you read my <a href="http://wpmututorials.com/news/me-and-you-and-wpmu/">previous post</a>, you&#8217;re already aware that I&#8217;m fairly new to <a href="http://mu.wordpress.org/">WPMU</a>, and this post is directed to those users who are just starting to find their way into the multi-user WordPress environment. Following is a quick tip that will help you immensely in the long run, but first some background information.</p>
<p>Through my first experience with WPMU, I have spent many hours searching the <a title="WPMU Forums" href="http://mu.wordpress.org/forums/">forums</a> while trying to determine the best plugins and code hacks to accomplish the goals of the site I am developing. I&#8217;ve downloaded dozens of these plugins and have made many several changes to WPMU core files. During this process, I was working with version 1.3.3 and then came a new version, 1.5 RC1, and then yet another, the official 1.5.1 version which integrated the changes that were made to the standard WordPress 2.5.1 backend. As you might imagine, with all these upgrades, and with me including code hacks in between, things  can quickly get out of hand and confusing.</p>
<p>The purpose of this post is to remind all new WPMU users, and even veterans, to TRACK YOUR CHANGES. This may seem like a no-brainer, but with as many code hacks as I&#8217;ve tried to get things working the way I want, if I wasn&#8217;t tracking what I was doing, I would quickly become lost when I needed to upgrade and preserve my changes, or to troubleshoot when something goes wrong.</p>
<p>Tracking my changes couldn&#8217;t be simpler. I just keep a simple text document on my local system that I enter the changes into. When it&#8217;s time to upgrade or refresh myself on what changes I&#8217;ve done, I just open it up and have a look.</p>
<p><img src="http://wpmututorials.com/files/2008/05/core_edits_screenshot.jpg" alt="WPMU Core File Edits" /></p>
<p>I hope this helps make your WPMU experience just a bit easier.</p>
<p>p.s. The WPMU site I&#8217;m working on is still in development, but will be open for beta testing soon. Please stay tuned here and also at <a title="WordPress Help" href="http://wordpressmodder.org/">here</a> for further announcements.</p>
<hr />
<p><small>© admin for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2008. |
<a href="http://wpmututorials.com/hacks/if-you-hack-you-should-track/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/if-you-hack-you-should-track/#comments">12 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/if-you-hack-you-should-track/&title=If you Hack, you should Track">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/if-you-hack-you-should-track/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Changing the default theme</title>
		<link>http://wpmututorials.com/hacks/changing-the-default-theme/</link>
		<comments>http://wpmututorials.com/hacks/changing-the-default-theme/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 15:16:04 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Themes]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/hacks/changing-the-default-theme/</guid>
		<description><![CDATA[Let&#8217;s face it, the default theme is ugly. Sure it was cool way back when, but now everyone has rounded corners and big blue headers. There may come a time when you would like to have the default theme on signup be something else. For this, I am going to assume you&#8217;ve already picked another [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s face it, the default theme is ugly. Sure it was cool way back when, but now everyone has rounded corners and big blue headers. There may come a time when you would like to have the default theme on signup be something else.</p>
<p>For this, I am going to assume you&#8217;ve already picked another theme you like and tested it to make sure it works and behaves liek expected. Surf on in to your server, however you like. Find the default theme folder in wp-content/themes/. Tip: it&#8217;s called &#8220;default&#8221;. <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Rename the folder to something like default-old.</p>
<p>Now, find your new theme folder with the theme you like. Rename that folder to &#8220;default&#8221; (no quotes).</p>
<p>Seriously, that&#8217;s it. Withoin the code itself, it is only the folder name that is used in the case of new blog setup and to have a theme to revert to should a previously selected theme be removed.</p>
<p>If you want, you can disable Kubrick (the original default theme) so users cannot select it, by going to Site Admin -&gt; Themes and click the &#8220;NO&#8221; radio button. Don&#8217;t forget to save your changes.</p>
<p>I&#8217;d also like to remind you to note that you made this change in your own personal changelog file. This helps by keeping track of any changes you made so you can repeat them in case of an upgrade, a re-install or some tragic unforseen event.</p>
<p>Hey, it can happen <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  and it&#8217;s a good habit to get into.</p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2007. |
<a href="http://wpmututorials.com/hacks/changing-the-default-theme/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/changing-the-default-theme/#comments">14 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/changing-the-default-theme/&title=Changing the default theme">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/changing-the-default-theme/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>How to moderate signups</title>
		<link>http://wpmututorials.com/hacks/how-to-moderate-signups/</link>
		<comments>http://wpmututorials.com/hacks/how-to-moderate-signups/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 17:23:57 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://wpmututorials.com/hacks/how-to-moderate-signups/</guid>
		<description><![CDATA[Since at some point spammers will find your site and create splogs, there&#8217;s many ways to stop them. Deleting them as they occur is like shovelling snow during a blizzard. You can add another field to signup, add a captcha, go invite-only, or in the case of my main niche blogging site &#8211; moderate the [...]]]></description>
			<content:encoded><![CDATA[<p>Since at some point spammers will find your site and create splogs, there&#8217;s many ways to stop them. Deleting them as they occur is like shovelling snow during a blizzard. You can add another field to signup, add a captcha, go invite-only, or in the case of my main niche blogging site &#8211; moderate the signups. This works well for smaller signups where you don&#8217;t get a huge number of new bloggers on a daily basis, and where spammers have proven to be a general nusiance, a potential embarrasement, as well as a time suck.</p>
<p>Basically, this is a light hack which re-words the signup page so users aren&#8217;t confused as to what is happening, and sends the activation email to you, the site admin, instead of the new user.</p>
<p>You&#8217;ll need to edit two files:<br />
- public_html/wp-signup.php<br />
- wp-includes/wpmu-functions.php</p>
<p>Open up wpmu-functions.php in your favorite text editor. Scroll down until you find  the function wpmu_signup_blog_notification. Copy everything from $admin_email to just before the last } and paste it directly underneath.</p>
<blockquote><p>Edited to add this bit:<br />
$admin_email = get_site_option( &#8220;admin_email&#8221; );<br />
   if( $admin_email == &#8221; )<br />
	        $admin_email = &#8216;support@&#8217; . $_SERVER['SERVER_NAME'];<br />
	    $from_name = get_site_option( &#8220;site_name&#8221; ) == &#8221; ? &#8216;WordPress&#8217; : wp_specialchars( get_site_option( &#8220;site_name&#8221; ) );<br />
	    $message_headers = &#8220;MIME-Version: 1.0\n&#8221; . &#8220;From: \&#8221;{$from_name}\&#8221; \n&#8221; . &#8220;Content-Type: text/plain; charset=\&#8221;" . get_option(&#8216;blog_charset&#8217;) . &#8220;\&#8221;\n&#8221;;<br />
	    $message = sprintf(__(&#8220;To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s&#8221;), $activate_url, &#8220;http://{$domain}{$path}&#8221;);<br />
    // TODO: Don&#8217;t hard code activation link.<br />
	    $subject = sprintf(__(&#8216;Activate %s&#8217;), $domain.$path);<br />
 	    wp_mail($user_email, $subject, $message, $message_headers);
</p></blockquote>
<p>(Note: in case of future code edits this may end up looking a little different. So to clarify, it&#8217;s the section of this function that sends an email. It helps to read the code you&#8217;re tweaking. <img src='http://wpmututorials.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>In the first section (the original bit we copied), change the message sent to the user to something like &#8220;We&#8217;ve recieved your signup request and you&#8217;ll get another email with your password.&#8221; Remove the $activate_url directly after that. This verifies that we are not sending them the activation link.</p>
<p>Now, in the bit you copied over, we&#8217;ll do a little more work. This is the message that will come to you, the site admin, and we have to add more details so we can determine if this is a legit signup. First, we&#8217;ll change the message that gets sent to us.</p>
<p>Mine looks like this:</p>
<blockquote><p>$message = sprintf(__(&#8220;Someone at the address %s has signed up for a blog: %s. To activate this for them, please click the following link:\n\n%s\n\nAfter  activation, the user will receive *another email* with their login.\n\nYou can visit their blog here:\n\n%s&#8221;), $user_email,  $title, $activate_url, &#8220;http://{$domain}{$path}&#8221;);</p></blockquote>
<p>The %s stands for string, and the value inserted is the first (or next) option listed directly after this message. By comparing this to the original, you can see I added the user&#8217;s email and the title of the requested blog. There are four %s in the message and four matching values at the end of it.</p>
<p>On the last line, change the line like this:<br />
wp_mail($user_email, $subject, $message, $message_headers);<br />
to this:<br />
wp_mail($admin_email, $subject, $message, $message_headers);</p>
<p>This will send the message to the admin, not the user.</p>
<p>Another thing to do in this file is moderate the user signups as well. Spammers can still create splogs (and they will) if they can easily signup for just a username.</p>
<p>For ease of use, the function wpmu_signup_user_notification is just underneath the one we&#8217;ve been working on. Make the same changes as above.</p>
<p>Save your work.</p>
<p>Now that we have moderated the signups, we need to inform the users we did so. Otherwise, you&#8217;ll get dozens of annoyed potential users asking &#8220;Where&#8217;s my activation key???&#8221;</p>
<p>Open up wp-signup and find the function confirm_user_signup (line 292). All we are going to change is the text of the messages. I changed mine to read something like, &#8220;But, before you can start using your new username, we must activate it. Check your inbox for the password we will send to you. If you do not get an activation notice within two days, please email support.&#8221;</p>
<p>Scroll down a little further to line 362 to the confirm_blog_signup function, and make similar changes to the message there. Save your work.</p>
<p>Make sure you save a copy of the original files somewhere, then you can replace them with your new edited version of the files. Whenever you upgrade, you can overwrite the files with the new version and make these changes again, OR you can use the revision log to make line-by-line upgrades to each file.<br />
<a href="http://trac.mu.wordpress.org/log/trunk/wp-signup.php">wp-signup revision log</a><br />
<a href="http://trac.mu.wordpress.org/log/trunk/wp-includes/wpmu-functions.php">wpmu-functions revision log</a></p>
<hr />
<p><small>© andrea for <a href="http://wpmututorials.com">WordPress &quot;Must-Use&quot; Tutorials</a>, 2007. |
<a href="http://wpmututorials.com/hacks/how-to-moderate-signups/">Permalink</a> |
<a href="http://wpmututorials.com/hacks/how-to-moderate-signups/#comments">19 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://wpmututorials.com/hacks/how-to-moderate-signups/&title=How to moderate signups">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><strong>Check out <a href="http://wpebooks.com">WPeBooks.com</a> for multisite plugins & ebooks.</strong></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmututorials.com/hacks/how-to-moderate-signups/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

