Search Results for 'code'
-
Search Results
-
Ok, it’s a slight fix since it’ll only solve one of the issues (I was having) with integration.
The problem was that I could not for the life of me force bbPress to set a ‘logged_in’ cookie with path ‘/’.
WordPress: domain.com
bbPress: domain.com/forum/
This meant once I’d logged in via bbPress, when I was browsing WordPress (although it set the ‘auth’ cookie fine and I could view wp-admin/) it ‘appeared’ that I was logged out (log in and register link, instead of log out and site admin).
I’d already tried this in bb-config.php, along with the other ‘integration speedups’ bbPress supplied;
$bb->sitecookiepath = '';I’d also tried setting it to ‘/’ as well, but every time the cookie would not get set.
And here was the culprit; line 673 in bb-settings.php;
$bb->sitecookiepath = rtrim($bb->sitecookiepath, '/');Then on line 735, it checks if $bb->;sitecookiepath is not set or empty. Otherwise, the ‘logged_in’ cookie for sitecookiepath will not get added to the $cookies array, and hence will not be set when wp_set_auth_cookie is called (specifically line 172, pluggable.php).
Changing the culprit to this fixed it for me;
$bb->sitecookiepath = '/' . trim($bb->sitecookiepath, '/');The complete fix (for me) was to force all logins, registrations and logouts through bbPress with this in a .htaccess at the WordPress root;
RewriteCond %{QUERY_STRING} action=register
RewriteRule ^wp-login.php forum/register.php [R=301,NC,L]
RewriteCond %{QUERY_STRING} action=logout
RewriteRule ^wp-login.php forum/bb-login.php?logout=1 [R=301,NC,L]
RewriteRule ^wp-login.php$ forum/bb-login.php [R=301,NC]
This actually worked out better for me, since bbPress by nature allows you to skin the login, and users get to enter a little more info for their profile during registration.
Hope this of some help to others!
Well, now I’ve gone and done it. I installed bbpress 0.9 first then installed WordPress mu 2.6.3. I then tried to turn on integration, and now my bbpress installation is completely broken. I cannot login as I get the error:
bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
SELECT ID FROM wp_users WHERE user_login = 'admin'
bbPress database error: [Table 'web_forums.wp_users' doesn't exist]
SELECT * FROM wp_users WHERE user_login = 'admin'My databases for WP and BBP are separated. Is there a way to reverse the integration? I cannot drop the database as there are existing users and posts.
I only realised this would be a problem after the fact, when I came here searching for a solution. If anyone is able to help me I’d greatly appreciate it. I’ve searched the forum posts extensively and looked through the bbpress configuration file to no avail. I hope someone can assist as I am at a loss on how to fix this.
Topic: Integrate wp2.7 and bbp1.0a2
Okay, I think I’ve experienced similar problems as most of you, and I just got mine working logging in and out from every angle with access to the admin panel on both. It still seems to hiccup a little when changing roles, so I am still trying to track that down, but I wanted to share where I am so far.
I am using the WordPress 2.7 beta 3 nightly build, and the bbPress 1.0 alpha 2. I am using various plug-ins and what-not and have akismet active on both.
My host is 1and1.com.
There are a few things that are of the utmost importance:
- I recommend BEING LOGGED INTO WORDPRESS AS ‘admin’ with user_id of ‘1’ when you install bbPress. Any other Administrator account didn’t want to redirect to the admin panel properly. I assume the cookies will immediately conflict as they are shifted around, causing weird issues from the start.
- BOTH -config.php files need to have the AUTH, SECURE, and LOGGED_IN KEYS defined correctly.
- I personally also defined the SECRET_KEY in WordPress, although I’m not sure this is necessary yet.
- bbPress needs to have the salts entered correctly during installation so that they match WordPress. Fortunately the link to the hidden admin panel is provided during the install so you can get them pretty conveniently. I personally did not have a secure_salt so I left it empty.
- MUST add
$bb->WP_BB = true;
if (file_exists('../wp-blog-header.php'))
require_once('../wp-blog-header.php');
else
if (file_exists('../../wp-blog-header.php'))
require_once('../../wp-blog-header.php');or your personal equivalent to bb-config.php
- I personally had to add
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');to my wp-config.php to make it go.
- Login to bbPress as ‘admin’ if you are already not, navigate to settings/wordpress integration, and adjust the role map accordingly.
- Visit bb-admin/rewrite-rules.php page and copy the code
- Put the following in a file named “.htaccess” file and place that file in the bbpress root directory:
Options -MultiViews
YOUR PREVIOUSLY COPIED CODEThis is to make sure your URL’s are rewriting correctly.
- Logout.
- Clear all website cookies and attempt logging in either/or/both WordPress and bbPress. Access admin panels of both. Basically check for functionality.
That’s how I got mine working. Like I said, I’m still having issues assigning user roles for some reason, so I’ll try and figure that out next.
At the risk of looking like a double whammy in regards to the non nesting iterations of our outputted code, just using TRs with different classes, i’ve hit across another wee issue – but this time i’m sure there’s a simple solution I just can’t see the relavent code.
I want to be able to know if a forum has children or not, or more specifically when we move up or down a level in the “xPath” iteration.
I’m using a method of using $GLOBALS->forum_parent but what this currently requires me doing is testing to see if the forum has a parent that is not a category, then checking to see if the parent is the same as the previous forums parent, and then output relavent code to nest the forum in an actual parent child format:
Category
– Forum
– Forum
– – Forum
– – Forum
– Forum
This obviously creates havok and rather messy code for the closing of the nestings.
I realise that for small websites this will look like a formatting issue, but once you reach more than 2 levels in a parent child relationship, the ability to control nested relationships makes a huge difference.
Thanks for the help folks
EDIT:
Ok, i think i’ve found half the solution to the issue, and maybe i can phrase the question better now in BBterms…
I want to know, via PHP, before any code has been sent to the browser for the forum, if it is a FIRST CHILD or a LAST CHILD.
Now obviously, BBpress knows this because it’s outputting bb-last-child bb-first-child css, but how can I access these settings on the front-page.php ?
Thanks alot for all the help
Hi BBpress team,
I wanted to raise a concern I’ve had for sometime, but every time I think it’s the right thing to do, there’s a new release and I thought that maybe it’d be fixed. With 1.0 in alpha stage, I figure now’s a good time.
I think we’ve got a lot of this wrong.
Not the code, not the plugins, not the community, but more the mindset behind the important features. We’ve not built forum software, we’ve built blogging software.
We make posts, and people comment on them. The focus of BBpress is on individual posts with things like tags, as opposed to the forum/section/category to which it was posted. I also appreciate the desire to streamline the code base, which is wonderful, but users and the internet-public at large expect forums to have certain features – to rely on user updated plugins for these features is not an ideal solution.
I don’t say any of this to criticise, because you folks have done amazing work given the small team and smaller community working on BBpress, and I’m massively impressed; but I think given the scale of the project you’re working on you’d want real feedback.
Let me give an example if I may, which might illustrate the issue I and other users face.
In the 1.0alpha, we finally get Categories as standard, a feature that is absolutely essential for a forum (not a blog), otherwise the ‘forums’ are just a list of wordpress categories.
The problem with Categories, is that we don’t have ‘forums’ belonging to them, instead we have ‘forums’ that are called categories. A simple 1/0 in a db. But it’s not enough. Why?
Well it means that the loop in front-page.php to iterate through forums has to check to see if it’s a category. There is no independent check for categories and forums. This of course makes no difference in the world of all forums being in a singular table (the category can just be an individual TR and we can use a PHP continue to end the loop), but as soon as we move to multiple tables (which is essential for accessibility focussed websites), or nested divs this becomes quite useless.
What we need its:
Category
Forum
Topic
Forum
Topic
Topic
Reply
Reply
Each belonging to the parent above it. But we don’t have that in BBpress for categories. It’s massively short-sighted.
Now, this may seem like a simple thing, but I raise it as more of a mindset. We’re coming across a bug/issue/problem/feature request and we’re solving that specific request rather than seeing how it fits in. Take, if I may, the brilliant UNREAD POSTS plug-in by _CK_. When it was built it added a class to the specific span of the name of the topic post in the list of topics. Upon request it then did the same to the name of the forums. At no time was the thought process – wait a minute, if I put this at the top level item of the iteration that means that all child nodes can use it. _CK_ fixed this oversight yesterday and his plugin is now brilliant and easily rivalling the methodology used in the bigger forum solutions.
But it’s the mindset behind it I think we need to change. Fixing a singular problem, or even adding a new requested feature, without planning how it will impact others or if it’s at a high enough level is starting to make BBpress look amateurish.
I’m not saying we have to emulate the big boys and their massively bloated software, but what we have to accept, as a community, is that the likes of PHPbb and IPB etc. all do certain functions as standard, and these are what our users will expect.
I can’t see a roadmap or feature list for a finished 1.0 anywhere, I can’t even see a feature list for 1.5 anywhere (and yes I’ve been to the TRAC site for both). I just get the feeling as we move towards 1.0 release, that we’re not really releasing forum software, we’re releasing blogging software:
WordPress: categories > posts > comments
BBpress: forums > topics > replies
These are effectively one and the same. I’m quiety confident that someone could write a WP theme that effectively does what BBpress does. The BBpress front page list topics then forums (with the number of topics /posts in it). A WP page could list blog Posts titles and then categories (with the number of posts / comments in it). They are, to an end user, the one and the same.
I mean, was XML-RPC absolutely essential for BBpress? It seems to me that Categories, or the Unread Posts feature would be far more essential in that other forums have them. Why haven’t we used the same folder structure as WordPress so that we can easily convince wordpress users to also use BB? Heck why isn’t even our website set out in the same way (this may bring over some WP plugin creators)?
These things are not complains, and I do not raise them to flame or criticise in anyway, I merely hope to kick start a little discussion that can see us move BBpress forward. To often in the past few months I’ve suggested BBpress to friends or fellow developers and they’ve told me that it just doesn’t meet their needs – I think that’s something we need to fix, together

Kev
Hello, I have this code (which comes from another support thread here) on my front-page.php:
<table id=”highest”>
<?php $top_topics = bb_top_topics(); ?>
<?php foreach ( $top_topics as $topic ) : ?> // line 70
<tr<?php topic_class(); ?>>
</td>
<td class=”num”><div class=”rating-holder”><?php bb_rating();?>
<span class=”count”><?php bb_rating_count(); ?>
</span>
</div>
</td></tr>
<?php endforeach; ?>
</table>
And under it the code for latest topics.
It gives me this error:
Warning: Invalid argument supplied for foreach() in /home/home1/novapojistovna_cz/public_html/www/bbpress/bb-templates/kakumei/front-page.php on line 70
Can anybody help, please. Don’t quite understand what is wrong

Thanks

Thanks for the great theme. Once again, I know, kick in some cash. I will. Can I pay rent first?