<?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>nielo.info</title>
	<atom:link href="http://nielo.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://nielo.info</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 09 Mar 2012 20:12:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WPMu, BuddyPress, bbPress integration</title>
		<link>http://nielo.info/2009/07/08/wpmu-buddypress-bbpress-integration/</link>
		<comments>http://nielo.info/2009/07/08/wpmu-buddypress-bbpress-integration/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 17:44:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nielo.info/?p=40</guid>
		<description><![CDATA[<p>Ok, so I had to sort out why bbPress and WPMu weren&#8217;t integrating. My client was pulling out his hair, and I just didn&#8217;t think [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I had to sort out why bbPress and WPMu weren&#8217;t integrating. My client was pulling out his hair, and I just didn&#8217;t think the bald look would suit him.</p>
<p>First off, let&#8217;s not repeat what is being said repeatedly all over the internet on forums and blogs. <a href="http://umwblogs.org/wiki/index.php/Integrating_WPMu%2C_BuddyPress%2C_and_bbPress">Start here</a>, this is a good guide to getting integration done.</p>
<p>Once you&#8217;ve done that you may be lucky and things will just work &#8211; it seems to work for some and not for others.</p>
<p>However, if it doesn&#8217;t here&#8217;s a list of the things I did to make it work.</p>
<p>Add this line to the end of both your wp-config.php and bb-config.php files;</p>
<blockquote><p>define( &#8216;WP_AUTH_COOKIE_VERSION&#8217;, 1 );</p></blockquote>
<p>It looks like WPMU (2.7.1) may already be using version 2, so that&#8217;s why it seems to be necessary to explicitly tell both WPMu and bbPress which version to use.</p>
<p>Next, make SURE that your KEYS and SALT VALUES match up. KEYS are set in the wp-config.php and bb-config.php files, SALT VALUES are set in wp-config.php and http://[your blog site]/[bbpress location]/bb-admin/options-wordpress.php.</p>
<p>Next thing may be a bit odd &#8211; and most likely this isn&#8217;t the most secure way of doing it (the preferably way would be to figure out why WPMu isn&#8217;t attaching the HASH value to the cookie name), but, in wp-config.php set COOKIEHASH to an empty string like so;</p>
<blockquote><p>define( &#8216;COOKIEHASH&#8217;, &#8221; );</p></blockquote>
<p>And in bb-config, set BB_HASH to an empty string as well &#8211; like so;</p>
<blockquote><p>define(&#8216;BB_HASH&#8217;,&#8221;);</p></blockquote>
<p>Remember to test every step of the way &#8211; your integration could start working at any point!</p>
<p>However, if all the above has been done and it&#8217;s still not working, there&#8217;s an edit required in the bbPress code, and another line to be added to bb-config.php which sorted it out for me (and ensured my client of a beautiful head of hair). And here it is!</p>
<p>Add this line to bb-config.php:</p>
<blockquote><p>$bb-&gt;wp_cookie_path = &#8216;/&#8217;;</p></blockquote>
<p>And on line 928 of bb-settings.php (bbPress version 1.0.1) after this line;</p>
<blockquote><p>unset( $_plugin_cookie_paths, $_type, $_data, $_cookie_path );</p></blockquote>
<p>Add this;</p>
<blockquote>
<pre>if ( $bb-&gt;wp_cookie_path ) {
	$cookies['auth'][] = array(
		'domain' =&gt; $bb-&gt;cookiedomain,
		'path' =&gt; $bb-&gt;wp_cookie_path,
		'name' =&gt; $bb-&gt;authcookie
	);

	$cookies['secure_auth'][] = array(
		'domain' =&gt; $bb-&gt;cookiedomain,
		'path' =&gt; $bb-&gt;wp_cookie_path,
		'name' =&gt; $bb-&gt;secure_auth_cookie,
		'secure' =&gt; true
	);
}</pre>
</blockquote>
<p>Basically, after much digging, I noticed that when you log in via bbPress a cookie value is missing, so that just makes sure that it&#8217;s there.</p>
<p>If all goes well you should now have an integrated site using WPMu, BuddyPress, and bbPress.</p>
<p>If it&#8217;s still acting up, make sure you clear your cookies for the relevant domain (or just all cookies if you like) &#8211; actually &#8211; do that anyway to be on the safe side.</p>
<p>You&#8217;ll notice I don&#8217;t mention anything about BuddyPress, that&#8217;s cos it seems to work for me as soon as I&#8217;ve done what I explained in this post.</p>
<p>Lastly, I&#8217;m sure there are better (and right) ways of doing what I&#8217;ve done, and that this is possibly a hack rather than a proper fix. I&#8217;ll send a link of this post to the bbPress guys tho, so hopefully this will be of some help to them and they&#8217;ll know how to sort it out more elegantly.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://nielo.info/2009/07/08/wpmu-buddypress-bbpress-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP E-commerce coolness</title>
		<link>http://nielo.info/2009/05/30/wp-e-commerce-coolness/</link>
		<comments>http://nielo.info/2009/05/30/wp-e-commerce-coolness/#comments</comments>
		<pubDate>Sat, 30 May 2009 10:30:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nielo.local.info/?p=35</guid>
		<description><![CDATA[<p>I was pretty damn pleased with myself this week when I managed to track down a performance error that&#8217;s been causing everyone using Instinct&#8216;s e-commerce [...]]]></description>
			<content:encoded><![CDATA[<p>I was pretty damn pleased with myself this week when I managed to track down a performance error that&#8217;s been causing everyone using <a title="Instinct" href="http://www.instinct.nz">Instinct</a>&#8216;s e-commerce plugin gray hair for some time now. Lucky for me the first plugin I wrote (which I&#8217;ve yet to polish and publish), I based on this plugin (as I had no clue about how to go about writing a plugin), and ran into the same problem. Eventually, whilst working on the survey plugin (which I&#8217;ve yet to polish and publish ;P) I came across the solution, although I didn&#8217;t realize at the time that this would also help with the e-commerce plugin.</p>
<p>So this week Ashley was pulling out his hair due to the fact that the plugin was causing the latest fossil-line (that&#8217;s worse than a deadline) project to constantly crash and asked me to have a look. After buggering about for a while I suddenly remembered what I described above, implemented it, and suddenly it was all better! Pretty cool huh?</p>
<p>Well, everyone else thought so too (he says modestly).</p>
<p>So here&#8217;s the solution for all those who have been salivating for it whilst having to read through all my crap :</p>
<p>search for</p>
<blockquote><p>add_action(&#8216;init&#8217;, &#8216;nzshpcrt_install&#8217;);</p></blockquote>
<p>and</p>
<blockquote><p>add_action(&#8216;init&#8217;, &#8216;wpsc_auto_update&#8217;);</p></blockquote>
<p>and replace it with</p>
<blockquote><p>register_activation_hook(__FILE__, &#8216;nzshpcrt_install&#8217;);</p></blockquote>
<p>and</p>
<blockquote><p>register_activation_hook(__FILE__, &#8216;wpsc_auto_update&#8217;);</p></blockquote>
<p>respectively.</p>
<p>Alternatively, although I&#8217;ve not tested this, I think the if statement is just seriously flawed and should look like this:</p>
<blockquote><pre>
if(isset($_GET['activate']) &#038;&#038; ($_GET['activate'] == 'true')) {
	if(($current_version_number < WPSC_VERSION ) || (($current_version_number == WPSC_VERSION ) &#038;&#038; (get_option('wpsc_minor_version') <= WPSC_MINOR_VERSION))) {
		include_once("install_and_update.php");
		add_action('init', 'wpsc_auto_update');
	} else {
		include_once("install_and_update.php");
		add_action('init', 'nzshpcrt_install');
	}
}
</pre>
</blockquote>
<p>In the event of using this if statement either register_activation_hook or add_action('init',...) should work fine.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://nielo.info/2009/05/30/wp-e-commerce-coolness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

