Search Results for 'code'
-
Search Results
-
I worked through the screencast to integrate bbPress with wordpress and all seems to be working well.
The thing is I can not figure out how to get bbPress to work within my theme, I want the wordpress theme to be a kind of ‘wrapper’ for the forum, putting just a link in the header to the forum, then for bbPress to come up on the page.
Is there a simple code tag I can put on a page to make this happen or else how do I do it?
Hi guys,
This is my first post here, but I’ve been building an wp/bb integrated site for a few weeks now, and I’ve come to the point where I think it’s time to write my first plugin. I want this plugin to redirect users to my WordPress login page if they are not logged in. It is important that the forums remain private and also that there is only one point of entry to the site for users, so as to avoid any confusion.
I have _ck_’s Hidden Forums plugin set up to control access to forums, and that’s working fine, but I need some advice on how to handle an issue or two in the code I’ve written so far. Now, I don’t do a ton of programming, and this is my first attempt at anything like this, so bear with me if I’ve committed any cardinal sins.
<?
add_action('bb_init','login_redirect_init',300);
function login_redirect_init()
{
global $bb_current_user;
$id = (!empty($bb_current_user)) ? intval($bb_current_user->ID) : 0;
if( $id < 1 )
{
$redirection = 'http://'.$_SERVER['SERVER_NAME'].'/caa/wp-login.php?redirect_to='.$_SERVER['REQUEST_URI'];
if (function_exists('status_header'))
status_header( 302 );
header("HTTP/1.1 302 Temporary Redirect");
header("Location:".$redirection);
exit();
}
}
?>As it is now, accessing bbPress redirects to wp-login with the proper redirection URL (I’m using the WP Members Only plugin), but then logging in from there kicks me back to the wp-login page again. I’m thinking that perhaps
bb_init
is not the hook for me, as it appears that the login process is not getting a chance to do its thing, and thus I’m getting booted out. As a test, I tried bb_head, but of course the headers have been sent by then, and the redirect does not work.So, if this is in fact the issue, what hook should be using? Or am I going about this all wrong? I’d really appreciate any and all input into this. Thanks, guys.
Topic: How to use user metadata?
Hi,
Does anyone know a good tutorial / documentation on how to use user’s meta data in bbpress? I assume, they are meant for storing user custom data.
If there are no good tutorials on subject, can somebody point me to a good and simple plugin, which uses meta data for storing custom data? I could read the code and learn it by myself.
Thanks!
Just wondering if someone can build a plugin to support wow itemlinks on bbPress.
See wowhead for what’s needed.
http://www.wowhead.com/?powered
Part of it would require the addition of a bbCode [item] [/item] for this purpose as well.