Skip to:
Content
Pages
Categories
Search
Top
Bottom

Preventing bbPress access via redirection to WordPress login

Published on May 28th, 2009 by

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.

Beginner

Published on May 28th, 2009 by

Ok, I’m just a coding, upload beginner. I have some experience with WordPress, but I use as much none uploading stuff as possible, simply because I’m not familiar with it.

In the install instructions it says upload to the server. I did what I thought was that, but no install page appeared.

I’m just starting my forum out, so it’s a blank canvas. Where do I put the download on my server? Do I need WordPress on the blog to begin with?

I know these are beginner questions, but I’ve been at the beginner stage of many things, and have learned, so if you can help, I’m completely open to learning a new skill.

Thank you.

Indicating Posts by Administrators

Published on May 28th, 2009 by

Hello all,

Is there a simple way to add class=”admin” to posts made by an administrator. Right now the thread li go back and forth from li and li.alt. An li.admin would really help us target admin responses, and offer in the possibility of adding in a fourth, li.bestAnswer for support forums.

Thanks!

looping installation

Published on May 28th, 2009 by

Hi, I successfully complete the whole installation process of the bbpress but even after a successful installation it always divert me to the installation everytime I visit my forums

http://www.mydomain.com/forums. wordpress mu is install on the root.

plz help me.

thanks

Major problem with Topic Posts

Published on May 27th, 2009 by

and BBPress Latest Discussions. It says someone posting and there name and then their name and post is not appearing inside the topic. In BBPress Latest Discussion will say last post by So and So and then that persons post does not appear and a different topic will then be displayed. Also the number of posts is incorrect. I am not sure if this means that Database is corrupted. Also reputation cannot be fixed unable to have it take away reputation points.

Anyone able to look into this offer solutions. I need this on a emergency basis. Thanks

Help Protocols

Published on May 27th, 2009 by timskii

I’m attempting to write a help page for my forum users.

My first aim is a page that will automatically build based on the features available to the user. For example, the “How to write HTML markup” section, would loop through all the valid tags, explaining each of them. If I block or add a tag via an addon, the help file would reflect that. Or, the section on “How to moderate” will only show up for users that are logged in with moderation capability.

It also occurred to me that plugins could be written with help built-in, both for the administrator and user. Just as a plugin can currently write itself into the admin menu.

Are there any protocols for creating help features for BBPress users? Standard structures, hooks, places to write the data, anything?

From mybb to bbpress

Published on May 27th, 2009 by Gloria

Hi.

In my web site, I have a mybb. I would like to trasform it in bbpress.

What are the steps to this transformation?

I imagine there isn’t a converter, but, can I convert mybb in phpbb and then in bbpress?

If it is yes, how?

Thanks.

How to use user metadata?

Published on May 27th, 2009 by sumatra

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!

bbpress + mailman integration

Published on May 27th, 2009 by

We are considering extending our wordpress site with forum capbilities. The question is whether is possible or not to integrate mailman and bbpress. Any experience?

Thanks in advance.

{plugin request} – wow itemlinks

Published on May 27th, 2009 by

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.

Skip to toolbar