Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Help with an if/then statement

@outchy

Member

YES!!! oh, you’ve made my week, thank you so much :)

the log in text is here in template-functions.php:

if ( ( is_topic() && bb_current_user_can( ‘write_post’, $topic->topic_id ) && $page == $last_page ) || ( !is_topic() && bb_current_user_can( ‘write_topic’, $forum->forum_id ) ) ) {

echo “<form class=’postform’ name=’postform’ id=’postform’ method=’post’ action='” . bb_get_option(‘uri’) . “bb-post.php’>n”;

bb_load_template( ‘post-form.php’, array(‘h2’ => $h2) );

bb_nonce_field( is_topic() ? ‘create-post_’ . $topic->topic_id : ‘create-topic’ );

if ( is_forum() )

echo “<input type=’hidden’ name=’forum_id’ value=’$forum->forum_id’ />n”;

else if ( is_topic() )

echo “<input type=’hidden’ name=’topic_id’ value=’$topic->topic_id’ />n”;

do_action(‘post_form’);

echo “n</form>”;

} elseif ( !bb_is_user_logged_in() ) {

echo ‘<p>’;

printf(__(‘You must log in to post.’), attribute_escape( bb_get_option(‘uri’) . ‘bb-login.php’ ));

echo ‘</p>’;

}

do_action(‘post_post_form’);

}

this is the last piece of the puzzle for me :D

Skip to toolbar