<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bbPress Support Forums Tag: new role</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress Support Forums Tag: new role</description>
<language>en</language>
<pubDate>Fri, 09 Jan 2009 03:46:31 +0000</pubDate>

<item>
<title>Detective on "Extending the Private Forums Plugin"</title>
<link>http://bbpress.org/forums/topic/extending-the-private-forums-plugin#post-15385</link>
<pubDate>Tue, 15 Apr 2008 04:23:00 +0000</pubDate>
<dc:creator>Detective</dc:creator>
<guid isPermaLink="false">15385@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I finally made a custom &#34;private forum&#34; (note the single noun) plugin:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;define(&#38;#39;FORO_STAFF&#38;#39;, 22);

add_filter(&#38;#39;get_posts_where&#38;#39;, &#38;#39;ryuuko_staff_where_posts&#38;#39;);
function ryuuko_staff_where_posts($where) {
        if (!bb_is_user_logged_in() &#124;&#124; !bb_current_user_can(&#38;#39;moderate&#38;#39;)) {
                //var_dump($where);
                $where .= &#38;quot; AND p.forum_id &#38;lt;&#38;gt; &#38;#39;&#38;quot; . FORO_STAFF . &#38;quot;&#38;#39; &#38;quot;;

        }
        return $where;
}

add_filter(&#38;#39;get_topics_where&#38;#39;, &#38;#39;ryuuko_staff_where_topics&#38;#39;);
function ryuuko_staff_where_topics($where) {
        if (!bb_is_user_logged_in() &#124;&#124; !bb_current_user_can(&#38;#39;moderate&#38;#39;)) {
                $where .= &#38;quot; AND t.forum_id &#38;lt;&#38;gt; &#38;#39;&#38;quot; . FORO_STAFF . &#38;quot;&#38;#39; &#38;quot;;
        }
        return $where;
}

add_filter(&#38;#39;get_forums&#38;#39;, &#38;#39;ryuuko_staff_forums&#38;#39;);
function ryuuko_staff_forums($forums) {
        if (!bb_is_user_logged_in() &#124;&#124; !bb_current_user_can(&#38;#39;moderate&#38;#39;)) {
                        $where .= &#38;quot; AND t.forum_id &#38;lt;&#38;gt; &#38;#39;&#38;quot; . FORO_STAFF . &#38;quot;&#38;#39; &#38;quot;;
                        $forum_key = -1;
                        foreach ($forums as $key =&#38;gt; $forum)
                                if (intval($forum-&#38;gt;forum_id) == FORO_STAFF) {
                                        $forum_key = $key;
                                        break;
                                }
                        unset($forums[$key]);
        }
        return $forums;
}

add_action(&#38;#39;bb_forum.php_pre_db&#38;#39;, &#38;#39;ryuuko_forum_redirect&#38;#39;);
function ryuuko_forum_redirect($forum_id) {
        if (!bb_is_user_logged_in() &#124;&#124; !bb_current_user_can(&#38;#39;moderate&#38;#39;)) {
                if ($forum_id == FORO_STAFF) bb_die(&#38;quot;No puedes ver esto!&#38;quot;);
        }
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Maybe it's useful for someone. The constant FORO STAFF is the id for the private forum.  In this case, only users with the 'moderate' capability can see the forum.
&#60;/p&#62;</description>
</item>
<item>
<title>citizenkeith on "Extending the Private Forums Plugin"</title>
<link>http://bbpress.org/forums/topic/extending-the-private-forums-plugin#post-15358</link>
<pubDate>Mon, 14 Apr 2008 02:47:55 +0000</pubDate>
<dc:creator>citizenkeith</dc:creator>
<guid isPermaLink="false">15358@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;I'm in the same boat as you, mciarlo. Every time I make a small change at the admin panel, I have to remember to go back to the Private Forums menu and change all the forums back to private. I've let it slip a few times...
&#60;/p&#62;</description>
</item>
<item>
<title>mciarlo on "Extending the Private Forums Plugin"</title>
<link>http://bbpress.org/forums/topic/extending-the-private-forums-plugin#post-14539</link>
<pubDate>Wed, 19 Mar 2008 00:21:41 +0000</pubDate>
<dc:creator>mciarlo</dc:creator>
<guid isPermaLink="false">14539@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Any update on why the Private Forum plugin will revert to 'Open For All.'&#60;br /&#62;
I consider this a large issue and can not believe bbpress does not have a proper configuration for this. Nevertheless, I am willing to wait and appreciate the effort going into bbpress. If I knew php I would try and fix this myself.
&#60;/p&#62;</description>
</item>
<item>
<title>akhater on "Extending the Private Forums Plugin"</title>
<link>http://bbpress.org/forums/topic/extending-the-private-forums-plugin#post-11726</link>
<pubDate>Tue, 30 Oct 2007 11:37:12 +0000</pubDate>
<dc:creator>akhater</dc:creator>
<guid isPermaLink="false">11726@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;This is not a plugin just a quick hack to Aditya Naik ’s popular private forums plugin.&#60;br /&#62;
 If, like me, you need to add some private forums in your BBPress setup but you don’t want to make those users moderators or administrators then here is how to add a custom role&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.onetouchinnovation.com/scripting/extending-bbpress-private-forums&#34; rel=&#34;nofollow&#34;&#62;http://www.onetouchinnovation.com/scripting/extending-bbpress-private-forums&#60;/a&#62;
&#60;/p&#62;</description>
</item>

</channel>
</rss>
