<?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: else</title>
<link>http://bbpress.org/forums/</link>
<description>bbPress Support Forums Tag: else</description>
<language>en</language>
<pubDate>Fri, 09 Jan 2009 04:59:25 +0000</pubDate>

<item>
<title>_ck_ on "PHP if... else Help Required"</title>
<link>http://bbpress.org/forums/topic/php-if-else-help-required#post-15268</link>
<pubDate>Fri, 11 Apr 2008 16:11:56 +0000</pubDate>
<dc:creator>_ck_</dc:creator>
<guid isPermaLink="false">15268@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;bbPress has a function to check for administrators.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;if (!in_array(intval($GLOBALS[&#38;#39;forum&#38;#39;]-&#38;gt;forum_id), array(2,5,9)) &#124;&#124; bb_current_user_can(&#38;#39;administrate&#38;#39;)) {  do something here }&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;where 2,5,9 is the list of forum numbers you want to restrict &#60;/p&#62;
&#60;p&#62;what you are trying to do is possible but very tricky&#60;br /&#62;
For example the &#34;add new&#34; on the front page offers all the forums for posting and you'd have to write a replacement for the list (bb_new_topic_forum_dropdown)&#60;/p&#62;
&#60;p&#62;All the &#34;magic&#34; happens in post-form.php, so you could take that if statement above and wrap the entire template with that (in theory).
&#60;/p&#62;</description>
</item>
<item>
<title>traceyshaw on "PHP if... else Help Required"</title>
<link>http://bbpress.org/forums/topic/php-if-else-help-required#post-15221</link>
<pubDate>Thu, 10 Apr 2008 02:44:08 +0000</pubDate>
<dc:creator>traceyshaw</dc:creator>
<guid isPermaLink="false">15221@http://bbpress.org/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;In my template I want to specify that one of my forums can be posted to by admins only, and other users can only reply.&#60;/p&#62;
&#60;p&#62;I figured the best way (and I know it's not foolproof, but at least I can make it more difficult for people to do!) would be to use an if... else statement, but I'm not sure how to correctly write it.&#60;/p&#62;
&#60;p&#62;In non-PHP structure: &#34;if the forum ID is 2 and the user is an admin, show the 'add topic' link; and if the forum is not equal to 2 then show the link to all registered members (in other words, let them see the 'add topic' link in every other forum except 2) &#34;.&#60;/p&#62;
&#60;p&#62;If you could please assist a php-noob by showing me the correct structure for this statement, it'd be much appreciated.&#60;/p&#62;
&#60;p&#62;Also, if you know of a better way to make one forum admin-post only and member-reply only (while the others forums remain as they are now), I'm all ears! Well, all eyes since I'll be reading rather than listening.&#60;/p&#62;
&#60;p&#62;Thank you so much in advance!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
