<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>bbPress Support Forums &#187; Topic: Plugin: bbPress Force Login for Buddypress</title>
		<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress</link>
		<description>bbPress Support Forums &#187; Topic: Plugin: bbPress Force Login for Buddypress</description>
		<language>en-US</language>
		<pubDate>Fri, 25 May 2012 12:01:14 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/forums/rss/topic/plugin-bbpress-force-login-for-buddypress" rel="self" type="application/rss+xml" />

		<item>
			<title>jfcarter on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-27217</link>
			<pubDate>Mon, 20 Apr 2009 19:29:11 +0000</pubDate>
			<dc:creator>jfcarter</dc:creator>
			<guid isPermaLink="false">27217@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Is this the most up to date code? I've tried to use it and I am getting no effect. No errors, nothing.</p>
<p>Is there a specific location where the plugin should reside (besides bb-plugins) or does it need a specific name?  </p>
<p>Also, should the path just be the domain or something else?
</p>]]></description>
					</item>
		<item>
			<title>Sam Bauers on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21643</link>
			<pubDate>Sun, 14 Dec 2008 13:10:20 +0000</pubDate>
			<dc:creator>Sam Bauers</dc:creator>
			<guid isPermaLink="false">21643@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p><code>$_SERVER[&#39;REQUEST_URI&#39;]</code> can be dodgy, _ck_'s code cleanup is probably a little safer.
</p>]]></description>
					</item>
		<item>
			<title>Trent Adams on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21628</link>
			<pubDate>Sun, 14 Dec 2008 09:58:18 +0000</pubDate>
			<dc:creator>Trent Adams</dc:creator>
			<guid isPermaLink="false">21628@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>I will be around more again now ;)    Been a busy year!    Thanks for the cleanup code _ck_ and I will test it tomorrow.    Hi back to everyone ;)</p>
<p>Trent
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21626</link>
			<pubDate>Sun, 14 Dec 2008 09:37:56 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">21626@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Untested code cleanup (just for fun - untested)</p>
<pre><code>function force_login_init() {
        if (!bb_is_user_logged_in() &#38;&#38; !preg_match(&#34;/(bb\-login&#124;bb\-reset\-password&#124;register&#124;xmlrpc)\.php/s&#34;,$_SERVER[&#39;REQUEST_URI&#39;])) {
	      nocache_headers();
                header(&#34;HTTP/1.1 302 Moved Temporarily&#34;);
                header(&#34;Status: 302 Moved Temporarily&#34;);
                bb_safe_redirect( bb_get_uri( &#39;bb-login.php&#39;, null, BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_USER_FORMS ) );
                exit;
        }
}</code></pre>
<p>Good to see you Trent, don't be a stranger!
</p>]]></description>
					</item>
		<item>
			<title>edwinfoo on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21581</link>
			<pubDate>Sat, 13 Dec 2008 11:26:17 +0000</pubDate>
			<dc:creator>edwinfoo</dc:creator>
			<guid isPermaLink="false">21581@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Hi Trent, it's been a long time. Good to see you around this neck of the woods.</p>
<p>Thanks for sharing the plugin.</p>
<p>Is Buddypress any good?
</p>]]></description>
					</item>
		<item>
			<title>chrishajer on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21566</link>
			<pubDate>Sat, 13 Dec 2008 02:31:27 +0000</pubDate>
			<dc:creator>chrishajer</dc:creator>
			<guid isPermaLink="false">21566@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Hiya Trent :-)
</p>]]></description>
					</item>
		<item>
			<title>Trent Adams on "Plugin: bbPress Force Login for Buddypress"</title>
			<link>http://bbpress.org/forums/topic/plugin-bbpress-force-login-for-buddypress#post-21561</link>
			<pubDate>Fri, 12 Dec 2008 23:56:34 +0000</pubDate>
			<dc:creator>Trent Adams</dc:creator>
			<guid isPermaLink="false">21561@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>I wanted a little plugin to allow Force Login on bbPress forum when you have integration with buddypress.   I altered mdawaffe's plugin and thought I would share it with the community if you want privacy on forum and still work with buddypress.</p>
<pre><code>&#60;?php
/*
Plugin Name: Force Login
Description: No one can see your forums unless they are logged in.
Plugin URI: <a href="http://bbpress.org/forums/topic/117" rel="nofollow">http://bbpress.org/forums/topic/117</a>
Author: Michael D Adams *voodoo code from Trent Adams and Sam Bauers*
Author URI: <a href="http://blogwaffe.com/" rel="nofollow">http://blogwaffe.com/</a>
Version: 0.8
*/

function force_login_init() {
        if ( !bb_is_user_logged_in()
                &#38;&#38; 0 !== strpos($_SERVER[&#39;REQUEST_URI&#39;], bb_get_option( &#39;path&#39; ) . &#39;bb-login.php&#39;)
                &#38;&#38; 0 !== strpos($_SERVER[&#39;REQUEST_URI&#39;], bb_get_option( &#39;path&#39; ) . &#39;bb-reset-password.php&#39;)
                &#38;&#38; 0 !== strpos($_SERVER[&#39;REQUEST_URI&#39;], bb_get_option( &#39;path&#39; ) . &#39;register.php&#39;)
                &#38;&#38; 0 !== strpos($_SERVER[&#39;REQUEST_URI&#39;], bb_get_option( &#39;path&#39; ) . &#39;xmlrpc.php&#39;)

        ) {

                nocache_headers();
                header(&#34;HTTP/1.1 302 Moved Temporarily&#34;);
                bb_safe_redirect( bb_get_uri( &#39;bb-login.php&#39;, null, BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_USER_FORMS ) );
        header(&#34;Status: 302 Moved Temporarily&#34;);
                exit();

        }
}

add_action( &#39;bb_init&#39;, &#39;force_login_init&#39; );

?&#62;</code></pre>
<p>Cheers,</p>
<p>Trent
</p>]]></description>
					</item>

	</channel>
</rss>

