Thanks, chrishajer, this…
<?php tag_heat_map( 8, 16, ‘pt’, 100); ?>
…worked, putting the parameters in the template tag, although I don’t know why, ’cause the default values seemed to be changed in the function in template-functions.php. But, I don’t care why, either, since it works!
With integration, it’s easiest to use the same database, then just change the table prefix (or leave it at the default for bbpress – there’s no conflict.) If you use the same database, then just use the database connection details from wp-config.php.
It seems you can’t even SHOW TABLES, not even talking about creating anything yet. The permissions required to SHOW TABLES are much less than those needed to create a table.
Something weird is going on and we’re going to smack our heads when we realize how simple it really was.
Hey Chris,
I had created a second bbpress database called bbpress2 to see if that was the problem, which it wasn’t. The error message is an older one. The one I’m getting now is in reference to bbpress, not bbpress2 like above. But everything else is the same:
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
SHOW TABLES;
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
CREATE TABLE bb_forums ( forum_id int(10) NOT NULL auto_increment, forum_name varchar(150) NOT NULL default '', forum_slug varchar(255) NOT NULL default '', forum_desc text NOT NULL, forum_parent int(10) NOT NULL default '0', forum_order int(10) NOT NULL default '0', topics bigint(20) NOT NULL default '0', posts bigint(20) NOT NULL default '0', PRIMARY KEY (forum_id) ) DEFAULT CHARACTER SET utf8
bbPress database error: [Access denied for user 'disco'@'localhost' to database 'approachanxiety_com_bbpress']
CREATE TABLE bb_posts
Question: can I use the same database as my WordPress database?
I may call my hosting provider to see if there is something wrong with the way mysql databases are set up. Perhaps I can connect but can’t create tables?
Thanks for all your work on this!
Eric
Also, using a test script, I entered the same database information that’s in my bbpress config.php file and I can successfully connect to my database. The user, Disco, is the default user and is database administrator so there’s no reason why I should get access denied.
I am installing bbPress to integrate with an existing WordPress. After the second step of install I get this error:
Second Step
Now we’re going to create the database tables and fill them with some
default data.
bbPress database error: [Access denied for user 'disco'@'localhost' to
database 'approachanxiety_com_bbpress2']
SHOW TABLES;
bbPress database error: [Access denied for user 'disco'@'localhost' to
database 'approachanxiety_com_bbpress2']
CREATE TABLE bb_forums....
It seems to be similar to this post,
http://bbpress.org/forums/topic/step-two-database-error?replies=4
And this one,
http://bbpress.org/forums/topic/db-access-problem-in-the-first-installation-step?replies=19
I tried to resolve it by replacing db-mysqli.php with db.php in the bb-includes folder and that didn’t work.
The username and password are correct. They are the same as for my original wordpress blog. And the database is correct as well. When I change it to something else I can’t even get to the second step.
Any help would be greatly appreciated!!!
New Version, 0.2. Download the zipped file.
- Two Gravatar Email Source
- Use registered email
- Use additional Gravatar Email field
- Email Verification – Users need to verify Gravatar Emails which they input
- Options page (screenshot)
- Default Image – Supports displaying Default Image
- Also supports displaying different Default Image based on user’s role
- Display Name – Shows Display Name instead of Login name if available
- Customize Size, Rating of avatar
- Complete Deactivation – Removes options and data in usermeta
Plugin’s page
Is there a simple way (i.e. not involving a plug-in) to change the title of a view? For example, if I wanted the view “Topics with no replies” to say “Threads with no replies”, how can I do this?
I do see that the views are set up in default-filters.php, so I guess I’m asking whether there is an easy way to override these view definitions using code in the theme.
Thanks.
thanks, yeah, i am not using bbpress + wordpress on the installation i’m trying to disable posts and registration on.. that’s the old one that’s getting moved to the new site that has wordpress.
0.8 doesn’t have plugin activation, i guess everything’s just enabled by default (someone correct me if i’m wrong). i’ll have to check out capabilities.php tomorrow (i’m off to a halloween party!). thanks for the help.
Have you tried to search one in Extend?
If you find no plugin and you can do code, I think you can check line 18 in /bb-post.php, line 479 in /bb-includes/capabilities.php.
You need to check current user’s is allowed to start a new topic in specific forum or not in your filter hook.
Just thoughts, but should work.
PS. I think it’s better not to do too much that bbPress can’t by default, or you could suffer more after upgrading unless you completely know what you do.
Currently, bb-admin/admin-header.php
uses active template’s logged-in.php
. I changed this php in my theme, and it looks a little bit strange in admin page.
I think admin page shouldn’t use any files from templates, even the default template. Could this be an issue?
And it seems no need to use login_form()
, it should just include a logged-in.php
in bb-admin
or simply put codes within admin-header.php
.
I wrote a simple plugin for Gravatar. I am planning to put files on Extend, but I am still waiting. You can download it from Google Code for now, please visit this plugin’s homepage. You can find a download link and know how to modify your theme in the page.
It is relatively simple:
- Gravatar Email field – This plugin doesn’t use user’s registered email.
- Email Verification – Users need to own the Gravatar Emails which they input.
- Support Default Image
- Size customized (1..80px)
I hope I can hear your thoughts about this plugin.
Well, I don’t know, but since there’s a deregister view following the register view function maybe it’s not necessary.
function bb_register_view( $view, $title, $query_args = '' ) {
global $bb_views;
$view = bb_slug_sanitize( $view );
$title = wp_specialchars( $title );
if ( !$view || !$title )
return false;
$query_args = wp_parse_args( $query_args );
if ( !$sticky_set = isset($query_args['sticky']) )
$query_args['sticky'] = 'no';
$bb_views[$view]['title'] = $title;
$bb_views[$view]['query'] = $query_args;
$bb_views[$view]['sticky'] = !$sticky_set; // No sticky set => split into stickies and not
return $bb_views[$view];
}
function bb_deregister_view( $view ) {
global $bb_views;
$view = bb_slug_sanitize( $view );
if ( !isset($bb_views[$view]) )
return false;
unset($GLOBALS['bb_views'][$view]);
return true;
}
I’m in trouble if I ever need to create my own views or if the views that are being created in the default-filters.php page are ever used. But until I get a response from someone that knows what’s going on, I’m running bbPress without it register views.
I made another approach to fit this need and used it on my forum.
function ChangeRoleDisplayName() {
global $bb_roles;
$bb_roles->role_names['keymaster'] = "Toilet Cleaner";
[...]
}
add_action('bb_got_roles', 'ChangeRoleDisplayName', 10, 0);
?>
The complete code is in role-display-name.php.
I’ve done a little more troubleshoot, although it’s gotten me nowhere, but I’ll post it here in the event that someone may be able to help me:
Line 81 in the bb-includes/default-filters.php file is:
bb_register_view('no-replies', __('Topics with no replies'), array('post_count'=>1));
I did a search in the files and “bb_register_view” pops up in 3 files:
default-filters.php
functions.php
template-functions.php
I think there is indeed a gravatar for bbpress plugin but I like the more developed avatar plugin by Louise Dade.
A locally cached copy of a gravatar is always better than relying on the remote copy, even with the enhanced WP speed. Perhaps Louise’s can show the remote gravatar and give the member the option to use it as the default local. I’ve got a very large blog using gravatars and polling for a couple thousand members is a serious load issue with gravatars.
Then there is the issue of universal avatar support across bbPress<->WP which I don’t quite have working yet, I have to look at what other people have done.
In any case this is a good move for gravatars. But I simply cannot believe they built something with Ruby on Rails and were hoping to scale it for millions of users though. That’s going to have to be changed radically.
I’m doing a fresh install of bbpress. I’m not linking it to wp.
I’m getting this error:
Fatal error: Call to undefined function: __() in /home/2816/domains/ridetoremedy.com/html/community/bb-includes/default-filters.php on line 81
My config file is correct. It’s linking to the same db as wp (simply because there’s no reason to use a different db if I can just prefix the tables differents, i.e. bb)
Any help would be appreciated. I don’t want to have to go to a different forum system, but I really thought this would be easier than it’s turning out to be.
Thanks
Okay, wow. It looks like I may have figured it out. All I did was set Permalinks to default within WordPress 2.3 and the installation came up. Sweet!
This has been scarcely tested, but I think I have a fix for my bug… weird…
in the bb-includes/capabilities.php file there is a function at the bottom that looks like this:
function bb_give_user_default_role( $user ) {
if ( !( is_object($user) && is_a($user, 'BB_User') ) )
return;
$user->set_role('member');
}
I changed it to look like this:
function bb_give_user_default_role( $user ) {
if ( !( is_object($user) && is_a($user, 'wp_User') ) )
return;
$user->set_role('member');
}
Instead of checking to see if the bb_user existed, we wanted to check to see if the wordpress user existed, assuming we merged our user table. For some reason, this seems like a bug in the bbPress code. Shouldn’t that be a variable prefix to begin with?
A quick solution is changing where is “kakumei” to “mytheme” on all files.
But hope a better solution, i tried that too and didnt work 
https://bbpress.org/forums/topic/theme-not-found-default-theme-applied?replies=8#post-4407
I installed on localhost. When i first try to change the theme it works, and them i have this message “Theme not found. Default theme applied.”, and can’t change anymore.
I looked to the link themes and they are wrong, pointing to
<br>
?theme=c:arquivosdeprogramaseasyphp1-8wwwwordpressbbpress/bb-templates/kakumeia/&_wpnonce=117154f828
how can i fix it and remove that ‘c:arquivosdeprogramaseasyphp1-8wwwwordpressbbpress’ part?????
Did you copy all of the rules?
You should have copied all of these rules:
/* Default table structure
=================================== */
/* 100% is a good starting width for most tables - this is a forum! */
table { width: 100% }
/* Login form (header.php)
=================================== */
.login {
}
.login p {
}
.login label {
}
.login #submit {
}
p.login {
}
form.login input {
}
/* Breadcrumbs (most templates)
=================================== */
.bbcrumb {
}
/* Notice (profile.php)
=================================== */
.notice {
}
.notice p {
}
/* Front Page
=================================== */
#front-page #hottags {
}
#front-page #discussions {
}
/* hot tags! */
.frontpageheatmap {
}
#front-page #main h2, #forum-page #main h2, h2.post-form, #userlogin, #currentfavorites, #register {
}
#front-page #discussions ul {
}
.sticky {
background-color: #ffffd0;
}
/* Topic Page (topic.php)
=================================== */
/* wrapper for topic */
.infobox {
border-top: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
}
ul.topicmeta {
display: block;
margin-left 1.0; padding-left: 0em;
}
.topicmeta li {
display: list-item;
list-style: square inside;
}
#topic-info h2 {
border: 0px;
margin: 0px;
}
#topic-info {
float: left;
}
#topic-tags {
top: 1.0em;
margin-top: 2.0em;
float: right;
}
/* .nav used by topic.php & tag-single.php */
.nav {
}
.nav span {
}
.nav span, .nav a {
}
#thread {
}
#thread li {
margin-bottom: 1.0em;
}
#thread li ol, #thread li ul {
}
#thread li ol li, #thread li ul li {
}
/* following are used by post.php */
.threadauthor {
margin-left: -0px;
overflow: hidden;
width: 115px;
position: absolute;
}
.threadpost {
margin-left: 130px;
width: 370px;
background-color: #f5f5f5;
padding: 10px;
}
.poststuff {
font-size: 0.8em;
border-top: 1px solid #e5e5e5;
}
.num, #forumlist small {
}
.postform {
background: #f0f0f0;
padding: 1em;
margin-bottom: 1em;
}
.postform textarea {
height: 12em;
margin: 5px 0;
padding: 5px;
width: 96%;
display: block;
}
.postform label { display: block; }
.rssfeed { line-height: 20px; padding-left: 23px; background: url( "images/feed-icon-16x16.png" ) center left no-repeat; }
#manage-tags {
}
#manage-tags li {
}
.submit {
}
.topiclink {
}
.topictitle {
}
#topic-move {
margin-bottom: 1.0em;
}
/* Content - specific to the main content div
=================================== */
#content .frontpageheatmap a {
}
#content .infobox li {
}
#content .nav a {
}
#content .nav a:hover {
}
#content a:visited {
}
/* Profile Page
=================================== */
#profile-menu {
padding-top: 0.5em;
list-style: none;
border-bottom: 2px solid #ccc;
}
#profile-menu ul {
}
#profile-menu li {
font-size: 1.1em;
background-color: #eee;
padding: 4px 7px;
margin: 0px;
display: inline;
position: relative;
top: -3px;
}
#profile-menu li.current {
background-color: #ccc;
}
#userinfo {
}
#userinfo dt {
}
#userinfo dd {
}
#useractivity {
}
.user-recent {
}
.user-recent .alt {
background-color: transparent;
}
.user-recent ol {
}
.user-recent ol li {
}
/* Profile Edit
=================================== */
fieldset {
}
legend {
}
fieldset table {
}
fieldset table td {
}
fieldset p {
}
/* Other
=================================== */
#front-search {
}
#latest td, #forumlist td, #favorites td {
border: 1px solid #f5f5f5;
}
#forumlist tr td div.nest {
}
#latest tr:hover, #forumlist tr:hover, #favorites tr:hover {
}
#latest th, #forumlist th, #favorites th {
background-color: #e9ede8;
border: 1px solid #f5f5f5;
}
#latest, #forumlist, #favorites {
}
.alt {
background-color: #f9f9f9;
}
.bozo {
}
.alt.bozo {
}
.deleted {
}
.alt.deleted {
}
It seems to be a user thing. I’d been posting from a user that’d been established in WordPress. I updated it to Key Master in bbPress, so it should have all powers. But I found that, apart from tags, I couldn’t delete a post either, same no permission message (same as noted by Jolaedana above). So I logged out and logged in as Superadmin, the default account from bbPress installation, and voila, I can do everything, add tags, delete posts.
That doesn’t solve the problem. I haven’t tested to see what happens with other users, both already registered from WP and registered through bbPress. But it’s a workaround for me, and a…clue.
Try editing topic.php in the default template and replace:
<?php post_form(); ?>
with:
<?php post_form('Reply to this topic:'); ?>
This is a simple way to make the change you want.
Note that rather than editing the default template, you can make use of the powerful templating behaviour of bbPress if you create your own theme. With custom themes, bbPress will always pick up missing template files from the default kakumei theme! That means custom themes can be quite simple!
- Create a directory called my-templates.
- Create a directory in that directory called myfirsttheme.
- Copy style.css, screenshot.png and topic.php from bb-templates/kakumei to your my-templates/myfirsttheme directory.
- Edit my-templates/myfirsttheme/style.css and change:
Theme Name: Kakumei
to
Theme Name: myfirsttheme
- Change my-templates/myfirsttheme/topic.php with the change described above to topic.php.
- At this point you should see your own custom template in the admin backend.
That allows you to setup your own theme. Then when new versions of bbPress come along you may not have to reedit the default templates – just copy your custom theme into the new/upgraded bbPress installation.
I hope that makes sense.
Note:
Sometimes new functionality in bbPress will mean that it is best to copy the default template files and re-apply your changes in your custom theme.
I’m currently editing the default theme template for the latest version. Everything is going well, except I can’t find the code reference for the “Reply” label (it shows up as <h2 class='post-form'>Reply</h2>
in the HTML output. The rest of this section is editable in post-form.php. Where do I need to look to find the section (basically I just want to either remove this label and add a new one separately, or else be able to wrap some more code around it). The only other thing which may shed some light on this is the preceeding code: do_action( 'post_form_pre_post' );
but I have no idea what this function does.