Forum Replies Created
-
In reply to: Upgrading users to admins
bbPress and WordPress are not cross aware of role changes.
So, if you change a WordPress role, the bbPress role is not changed;
If you change the bbPress role, the WordPress role is not changed.
I believe that this is is probably the way that most people would want it to be, although it would make sense eventually (once these can be more tightly integrated) to have the option of syncing them up.
In reply to: Change Post Author?It isn’t about it being a regular basis, it’s about it being possible.
In my testing and installing of bbPress, I usually bounce back and forth between a KeyMaster, an Admin, and a Member test account, and sometimes I am logged in and make a post under the wrong one.
It’s more for convenience and possibility sake than it is for daily use or practicality.
Forums with many users would just have a million entries in the drop down. Heck I dunno man I just thought of this idea!
In reply to: Change Post Author?Nothing with roles, actually something much simpler.
As an administrator, I would like to have a drop-down list on the post-form.php that has a list of all forum members, so that I can assign or change the author of a post.
Within the
<?php if ( is_bb_tag() || is_front() ) : ?>
there would be another drop down list, but rather than forum, would be the list of authors to say started that topic.In reply to: Cookies work for admins but not regular userHmm this is an interesting scenario, one that I never made it around to checking since I always do my work as an Admin or KeyMaster.
I did just check my install of 2.7rc1 and bbPress Alpha-2 and I do not experience this type of issue.
I am assuming that you’ve checked the obvious stuff from all of the other integration topics here? Making sure your SECRET_KEY’s match and cookie domains are copied over, etc?
In reply to: Integrate wp2.7 and bbp1.0a2@elwagar: Conversely, once they are registered you can assign them a role by going to the bbPress admin, WordPress Integration, and remapping. I feel like a plug-in could help this registration laziness along, but I also think this should just work correctly right away.
I actually had a similar issue years ago integrating phpBB 2.x and osCommerce together, trying to get one to work inside the other with cookies and what-not was a really big problem, one that I never really did get working 100% correctly.
I have no experience with bbPress Live, but it might be worth looking into. CK posted a really nice SQL example on how to grab information without a plug-in, so if you can’t get that to work, you could always put in a little manual labor.
In reply to: Cookies work for admins but not regular userWhich versions of bbPress and WordPress are you using?
Are you doing all of this logging in and out on the same computer?
Have you tried manually deleting cookies and logging in again?
What folders are WordPress and bbPress located in, relative to each other?
I am experiencing the same issue, and I think we all really can’t wait for this to work correctly.
@mvds: The idea is that logging into or out of either/or will do that action on both sides for a unified website function. If you log into or out of either, and it affects the other immediately, and you have admin access to both sides regardless of where you login, that’s a good thing.
In reply to: Integrate wp2.7 and bbp1.0a2Have you tried logging in and out of both your WordPress and bbPress installations and accessing both admin panels? I mean each combination each way.
- Log into WordPress; Check admin panel access and cookies; Log out of WordPress
- Log into bbPress; Check admin panel access and cookies; Log out of bbPress
- Log into WordPress; Check admin panel access and cookies; Log out of bbPress
- Log into bbPress; Check admin panel access and cookies; Log out of WordPress
That is where the problem lies, and I have been running the most updated trunks of both bbPress and WordPress the entire time.
In reply to: Integrate wp2.7 and bbp1.0a2Short term, I was able to make this work by modifying 1 core WordPress file. This only allows for integration of the theme, but still does not allow access to the bbPress admin panel without changing the
bb-config.php
file back to original.It’s essentially a quick fix to get the theme working with all capabilities playing nicely.
Basically I’m hard-coding the capability check from bbPress into WordPress. There should be a filter for this, but I’m not sure how to hook into it correctly without a mod or plug-in on the WordPress side.
~My fix is in no way a permanent solution. Auto-updating your WordPress installation will overwrite this fix.~
In FILE
wp-includes/capabilities.php
:In the
meta_map_cap
function:Around Line 906:
AFTER
break;
BEFORE
default
INSERT:
/*
*/
case 'write_post':
$caps[] = 'write_posts';
break;
case 'edit_post':
// edit_posts, edit_others_posts, edit_deleted, edit_closed, ignore_edit_lock
if ( !$bb_post = bb_get_post( $args[0] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( $user_id == $bb_post->poster_id )
$caps[] = 'edit_posts';
else
$caps[] = 'edit_others_posts';
if ( $bb_post->post_status == '1' )
$caps[] = 'edit_deleted';
if ( !topic_is_open( $bb_post->topic_id ) )
$caps[] = 'edit_closed';
$post_time = bb_gmtstrtotime( $bb_post->post_time );
$curr_time = time() + 1;
$edit_lock = bb_get_option( 'edit_lock' );
if ( $edit_lock >= 0 && $curr_time - $post_time > $edit_lock * 60 )
$caps[] = 'ignore_edit_lock';
break;
case 'delete_post' :
// edit_deleted, delete_posts
if ( !$bb_post = bb_get_post( $args[0] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( 0 != $bb_post->post_status )
$caps[] = 'edit_deleted';
// NO BREAK
case 'manage_posts' : // back compat
$caps[] = 'delete_posts';
break;
case 'write_topic':
$caps[] = 'write_topics';
break;
case 'edit_topic':
// edit_closed, edit_deleted, edit_topics, edit_others_topics
if ( !$topic = get_topic( $args[0] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( !topic_is_open( $args[0]) )
$caps[] = 'edit_closed';
if ( '1' == $topic->topic_status )
$caps[] = 'edit_deleted';
if ( $user_id == $topic->topic_poster )
$caps[] = 'edit_topics';
else
$caps[] = 'edit_others_topics';
break;
case 'move_topic' :
$caps[] = 'move_topics';
break;
case 'stick_topic' :
$caps[] = 'stick_topics';
break;
case 'close_topic' :
$caps[] = 'close_topics';
break;
case 'delete_topic' :
$caps[] = 'delete_topics';
add_filter( 'get_topic_where', 'no_where', 9999 );
if ( !$topic = get_topic( $args[0] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( 0 != $topic->topic_status )
$caps[] = 'edit_deleted';
remove_filter( 'get_topic_where', 'no_where', 9999 );
break;
case 'manage_topics' :
// back compat
$caps[] = 'move_topics';
$caps[] = 'stick_topics';
$caps[] = 'close_topics';
$caps[] = 'delete_topics';
break;
case 'add_tag_to':
// edit_closed, edit_deleted, edit_tags;
if ( !$topic = get_topic( $args[0] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( !topic_is_open( $topic->topic_id ) )
$caps[] = 'edit_closed';
if ( '1' == $topic->topic_status )
$caps[] = 'edit_deleted';
$caps[] = 'edit_tags';
break;
case 'edit_tag_by_on':
// edit_closed, edit_deleted, edit_tags, edit_others_tags
if ( !$topic = get_topic( $args[1] ) ) {
$caps[] = 'magically_provide_data_given_bad_input';
return $caps;
}
if ( !topic_is_open( $topic->topic_id ) )
$caps[] = 'edit_closed';
if ( '1' == $topic->topic_status )
$caps[] = 'edit_deleted';
if ( $user_id == $args[0] )
$caps[] = 'edit_tags';
else
$caps[] = 'edit_others_tags';
break;
case 'edit_user':
// edit_profile, edit_users;
if ( $user_id == $args[0] )
$caps[] = 'edit_profile';
else
$caps[] = 'edit_users';
break;
case 'edit_favorites_of':
// edit_favorites, edit_others_favorites;
if ( $user_id == $args[0] )
$caps[] = 'edit_favorites';
else
$caps[] = 'edit_others_favorites';
break;
case 'delete_forum':
$caps[] = 'delete_forums';
break;
case 'change_user_password':
// change_password, edit_users
$caps[] = 'change_password';
if ( $user_id != $args[0] )
$caps[] = 'edit_users';
break;
/*
*/In reply to: Messed up WP and BB integrationFirstly, have you checked to make sure that your site paths are correct in both bbPress and WordPress? Since you shifted directories, the paths to those new directories need to be adjusted in the database.
Secondly, are there normal user tables to go along with those weird empty ones? Part of the integration process is telling bbPress which tables to find your users in. Is it possible that you added an extra “_” on accident, and bbPress created those tables while it was looking for the real ones?
We’re all experiencing the same issue.
Integration appears to be a little broken still.
If you need to use the WP functions in your bbPress, that will break it further by not allowing you to access your bbPress admin panel at all.
The problem looks like the bb_map_meta_cap filter is ignored when the WordPress functions are loaded in place of the bbPress ones.
Some users have been able to resolve this by using a .htaccess file to redirect to the bbPress login and register page whenever an attempt to register or login is made through WordPress. That is the best fix at the moment if you do not require access to the WP functions.
If you do require that access, then you will need to wait until a fix comes out for the issue I mentioned above. That’s where I am.
In reply to: Integrate wp2.7 and bbp1.0a2It seems like there are several issues here, and I’m not sure which is really the issue or which is a bug…
Firstly, when integrated, bbPress wants to use the WordPress classes and functions where possible. Namely, the problem with capabilities lies currently with the difference in the
WP_User->has_cap
function.On the WordPress side of it, it is missing the
global $wp_roles;
and the corresponding check of those roles against the current capability to check.$caps = call_user_func_array( array(&$wp_roles, 'map_meta_cap'), $args );
So I’m not sure if this is just a case of bbPress not keeping up with the WordPress user/role classes, or if this is WordPress not properly carrying over bbPress capabilities.
Ugh…
In reply to: Replies not showing here immediately upon refreshI noticed this happening here and over at the WordPress.org forums, so there may have been some kind of a delay.
Looks good enough to me, although I haven’t checked the source to see exactly how you did it.
As of right now there isn’t a turn key solution. Im doing my best to see where the inclusion is going wrong but haven’t had much time the past few days.
What breaks it is the inclusion of the wordpress functions in the bb-config.php file. If you delete that code and visit the admin, it will work just fine.
In reply to: WP 2.6.3 & bbPress 1.0A2 slight fixCurious if you’ve tried the steps in my wp2.7 topic? It should essentially be the same as with 2.6.3 and everything works pretty well other than the wp header integration.
In reply to: Replies order in AlphaI never understand how responses like that work.
You make it sound like somehow you’ve been inconvenienced by us or by bbPress…
In reply to: uninstalling 0.9?Looks to me like you failed to upload all of the files correctly.
In reply to: http 404 after successful installationor just because I upload bbpress to directory /bbpress/?
That is exactly why.
In reply to: Integrate wp2.7 and bbp1.0a2@lorenzo: I’m not exactly sure if there is a modification to do that or not. It seems like it would be an easy enough process with a plug-in of some kind, but that isn’t the point of integration so unfortunately I have little experience with it.
In reply to: Integrate wp2.7 and bbp1.0a2@lorenzo: Let me ask a question to clarify. If I understand correctly, it sounds like you want to import your blog posts from WordPress and make them topic posts in bbPress?
@everyone: I am dedicating this evening to trying to work out where the process is failing. Right now, if you do NOT need to use ANY of the WordPress functions in your bbPress theme, the integration works perfectly. Logging in and out of either/or works perfectly with wp2.7 and bbp1.0a2. If you skip step 5 in my above process, there are no operational issues, only theme integration issues by not being able to use the WordPress functions.
In reply to: Unable to LoginThat is why…
2.6x and .9 series won’t integrate or play nice together…
You could either go back to the 2.5 series of WordPress, or move up to the 1.0 beta version of bbPress…
In reply to: Unable to LoginWhich versions of bbPress and WordPress are you using?