コード例 #1
0
function bbps_hide_forum_meta($retval, $forum_id = 0)
{
    if (bbps_is_premium_forum(bbp_get_forum_id()) == false || current_user_can('administrator') || current_user_can('bbp_moderator')) {
        return $retval;
    } else {
        return $retval = '-';
    }
}
コード例 #2
0
function bbps_extend_forum_attributes_mb($forum_id)
{
    //get out the forum meta
    $premium_forum = bbps_is_premium_forum($forum_id);
    if ($premium_forum) {
        $checked = "checked";
    } else {
        $checked = "";
    }
    $support_forum = bbps_is_support_forum($forum_id);
    if ($support_forum) {
        $checked1 = "checked";
    } else {
        $checked1 = "";
    }
    ?>
	
	<hr />

<!--
This is not tested enough for people to start using so for now we will only have support forums
<p>
		<strong> Premium Forum:</strong>
		<input type="checkbox" name="bbps-premium-forum" value="1"  echo $checked; />
		<br />
		<small>Click here for more information about creating a premium forum.</small>
	</p>
-->
	
	<p>
		<strong><?php 
    _e('Support Forum:', 'bbps');
    ?>
</strong>
		<input type="checkbox" name="bbps-support-forum" value="1" <?php 
    echo $checked1;
    ?>
/>
		<br />
		<!-- <small>Click here To learn more about the support forum setting.</small> -->
	</p>

<?php 
}