Forum Replies Created
-
In reply to: how to detect plugins incompatible with bbPress 1.0
The way I deal with fixing topicmeta is like this, though there may be other ways:
old:
if ( $topics = (array) $bbdb->get_col("SELECT topic_id FROM $bbdb->topicmeta WHERE meta_key = 'rating'") ) :
new:
if (bb_get_option('bb_db_version')>1600) {$item="object_id as topic_id"; $table="$bbdb->meta WHERE object_type='bb_topic' AND";}
else {$item="topic_id"; $table="$bbdb->topicmeta WHERE";}
if ( $topics = (array) $bbdb->get_col("SELECT $item FROM $table meta_key = 'rating'") ) :In reply to: ETA for WP 2.6 support?if you insist on WP 2.6 support right now, try the 1.0 alpha
In reply to: how to detect plugins incompatible with bbPress 1.0bb-ratings has this problem:
https://plugins-svn.bbpress.org/bb-ratings/tags/0.8.5/bb-ratings.php
as you can see on/around line 205
It really is that simple – just make HowToGeek’s code into a plugin and install swiftmailer:
https://bbpress.org/forums/topic/trick-to-fix-some-email-problems-with-08x-plugins-on-09x#post-15776
That reminds me to fix some of my plugins so they use bb_mail() instead of mail() directly.
In reply to: Forum List on front page differs from logged in viewPrivate Forums has issues. I am uncertain if he is maintaining it anymore. Try my Hidden Forums instead.
In reply to: bbPress 1.0 alpha looks interestingThey kinda went overboard with the search. I pointed out there was no link to search so they put in this big honking search box at the top of the page, creating a bunch of useless whitespace around it.
I asked for meta tables on the forums and instead they convert and consolidated everything into one heaping bb_meta table, breaking some plugins and increasing queries.
I need to learn to stop making requests. LOL
In reply to: bbPress 1.0 alphabbPress should not tamper with your WordPress tables.
The user data is kept separate.
In reply to: WordPress + bbPress Integration 101Ah, I guess it’s important to point out that just like bbPress 0.9 is not compatible with WordPress 2.6, it’s also that bbPress 1.0 is not comptible with WordPress 2.5
Major cookie changes.
WordPress 2.5.x <-> bbPress 0.9
WordPress 2.6.x <-> bbPress 1.0
In reply to: bbPress 1.0 alpha looks interestingThere are radical internal changes in 1.0 with the switch to the BackPress core, not to mention the cookie changes and some major db function changes which consolidated all the meta tables into bb_meta. The code is untested against most plugins. It’s a much bigger change IMHO from 0.9 to 1.0 vs the older 0.8.3 to 0.9.0 change.
However I don’t think it will take much to get it the final stamp of approval, maybe even late this month or early next, depending how many more features Sam wants to put into it. There’s still a whole bunch of open tickets:
https://trac.bbpress.org/report/3
I just don’t want it to be rushed to an official release like 0.9 was, which was followed shortly by 0.9.0.1 and 0.9.0.2 and then 0.9.0.2 sp1 – that’s embarrassing and makes bbPress look amateur.
Let’s get it right this time – report those bugs at http://trac.bbpress.org
In reply to: No $user_id on profile page?The user_id of the user on the profile page might be in
$user->ID
try
global $user; $user_id=$user->ID;
($user is only available on the profile page)
In reply to: Why is integration so troublesome?This plugin is meant as a temporarily workaround until the bug can be fixed in WordPress – it will replace “anonymous” with the user login.
Install it on the WordPress side:
<?php
/*
Plugin Name: changes anonymous to member's login if display name missing (plugin for WordPress)
*/
function no_anonymous_members($author) { // this is a WORDPRESS plugin, not bbPress
global $comment;
if (empty($comment->comment_author) && !empty($comment->user_id)) {$user=get_userdata($comment->user_id); $author=$user->user_login;}
return $author;
} add_filter('get_comment_author', 'no_anonymous_members');
if ( !function_exists('get_userdata') ) :
function get_userdata( $user_id ) {
global $wpdb;
$user_id = absint($user_id);
if ( $user_id == 0 )
return false;
$user = wp_cache_get($user_id, 'users');
if ( $user ) {
if (empty($user->display_name)) {$user->display_name=$user->user_login;}
return $user;
}
if ( !$user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE ID = %d LIMIT 1", $user_id)) ) {
return false;
}
_fill_user($user);
if (empty($user->display_name)) {$user->display_name=$user->user_login;}
return $user;
}
endif;
?>(The real answer of course is to insert the user_login when the comment is posted, however I cannot find a suitable hook in WordPress’s
comment-template.php
so I am doing it by completely replacing the get_userdata function inpluggable.php
)In reply to: Why is integration so troublesome?I guess I can create some code to fix the display name issue in existing databases. Give me a few minutes.
update: actually it’s as simple as this in phpMyAdmin:
UPDATE wp_users SET display_name=user_login WHERE display_name=''
or via a mini-plugin:
<?php
/*
Plugin Name: Fix Anonymous Members
*/
function fix_anonymous() {global $bbdb;
$bbdb->query("UPDATE $bbdb->users SET display_name=user_login WHERE display_name='' ");
} add_action('bb_init','fix_anonymous');
?>save as
_fix-anonymous.php
(with leading underscore)you only need to upload and run bbpress once with it loaded (no activation required) and then delete the plugin or it will slow down bbPress.
I am now writing a WordPress plugin to fix this without having to duplicate all the names in the table which is a horrendous waste of space.
In reply to: Why is integration so troublesome?Well we know what causes “anonymous” to show up, it’s because bbPress is not creating the display name for the user when the user registers on the bbPress side and then goes to use WordPress.
The question is, why is this suddenly happening when bbPress is supposed to create it already. This might be a question for Sam – but I hope he can reproduce the problem.
Did you add the above code to insert the display name?
I hope I didn’t lead you wrong by implying you should try 2.6 because that will be incompatible with bbPress 0.9
2.6 has compatibility with bbPress 1.0 alpha but a few plugins won’t work with the alpha yet (like bb-topic-views)
Oh and the display name persists in 1.0 alpha and is on line 487 in pluggable. I’ve filed a trac report:
In reply to: I think I broke my blogAre you running WordPress 2.5 or 2.6 ?
I’m betting it’s 2.6 since the cookies are incompatible.
Delete your site’s cookies and you’ll be able to get into WP again.
In reply to: bbPress 1.0 alphaBecause of the radical change in how topicmeta and bb_options are now stored, a few of my plugins will not work properly under 1.0 alpha until I figure out a work-around:
My-Views (most/least views tracking, some statistics)
mini-track
all-settings <<– now updated to support 1.0
(there may be others, tba)
Also note there is a drop in meta db performance under 1.0 vs. 0.9 because of how forum meta is appended in multiple queries and that more than one index (as needed by design) cannot be used in mysql on the bb_meta table.
There is also an issue of the meta table being checked on every page load to see if it needs to be upgraded – that part will probably be fixed in a later release.
In reply to: bbPress 1.0 alpha looks interestingSam has just tagged bbpress 1.0 alpha 1 (r1636)
In reply to: WordPress + bbPress Integration 101Sam has just tagged bbpress 1.0 alpha 1 (r1636)
In reply to: Why is integration so troublesome?It only affects posts made afterwards, not existing posts but some easy php/mysql code could fix existing posts.
But I could have sworn this was fixed in bbPress 0.9 with the WordPress Integration section built in. It should give the users a WordPress role and display name. Actually, WordPress should create the display name itself if it sees a user name without a display name. I wonder if this is a WP 2.6 issue which should not be used with bbPress 0.9
In reply to: bblog tools collection and other stuffThe themes section on WordPress.org is brand new and replaced the defunct one on WordPress.net bbPress.org will eventually get the look and layout that WordPress.org has, it just might take awhile as there is no one to work on it while bbPress is being developed.
A few sites have tried to do the “collections” idea but they have come and gone. I pretty much try to do what you are asking for on http://bbShowcase.org and of course right on this forum are lots of tips and tricks
Well each forum matrix is maintained by someone from each project. I recently had MDA update the settings for bbPress but there are still some things that are incorrect due to the limitations on that website (for example “plugin” is not an option on some settings).
In other related news, Wikipedia decided to delete the page on bbPress last week which really upset me:
http://ckon.wordpress.com/2008/08/08/wikipedia-overlords-delete-bbpress-page/
Virtually every other forum software is on there, so I don’t know why they felt that was necessary:
http://en.wikipedia.org/wiki/Category:Internet_forum_software
In reply to: Help! I renamed my bbpress file directory name…I should point out that such changes in bb-config.php must be inserted ABOVE the line that says
/* Stop editing */
and not below it.Also, you should go immediately into your config and change the path after that.
In fact you should probably change the path in the admin section FIRST and then rename the folder after it’s saved. bbPress will be disabled until you rename the folder but should spring back to life afterwards.
The menu I mean is under:
settings -> general
or http://your-website-name.com/your-forum-path/bb-admin/options-general.php
bbPress address (URL):
In reply to: bb_is_ functions to callbbPress has similar functions to detect what page you are on, ie. is_front() is_forum() is_topic() is_view() etc.
do a search of the code for “function is_”
In reply to: Ability to “save draft”Drafts are for blogging systems.
I can’t imagine why a forum would need drafts.
However admin have the ability to edit deleted posts so you could create and delete a topic and then edit the post – then undelete it.
bbPress won’t show topics/posts that don’t have a status of zero so if you wrote a plugin for drafts you could just create topics/posts with a special status of like “7” until it was published.
In reply to: WordPress + bbPress Integration 101The problem is WordPress 2.6 re-used the existing cookie name but with a different format and calculation (and purpose). It was not the brightest design move on their part. Had they chosen a new cookie name, your idea would be valid.
At the rate Sam and MDA are working, I suspect there will be a stable enough bbPress 1.0 alpha by the end of this month (which will work with – actually require – WordPress 2.6).
A few other people have reported the profile bug. I will ask them to investigate.
In reply to: Cookie set up for backwards integrationUsing the same database is fine and actually the easiest way. You must be using the same user table.
Follow the Integration 101 steps to make your cookies match.
Make sure you are not using wordpress 2.6 which is incompatible with the cookies from bbPress 0.9