Forum Replies Created
-
In reply to: Patch: Categories for version 0.8
You don’t want it! It already lets you do this. Go to bb-Admin > Content > Forums and you can make forums sub/child-forums of other forums. It’s like this, only built-in.
In reply to: bbSyncIt’s there! I’m looking at it right now. In the code you copied it is line 10.
The bb_posts table is what we’re looking for, not wp_posts (also a table), and it tells you the
databasename.tablename
so it’s actually trying to look for a table called “posts”. I don’t think thewpbb_prefix
option exists in your tables, I suspect that’s a Latest Discussions plugin thing (ah, hindsight). If it did, it would readbb_
. The.
is used to join two strings together, so what it should be doing is joining'bb_'
and'posts'
together into the table name'bb_posts'
, but since that option doesn’t exist in your tables it just join together''
(a blank) and'posts'
, leaving us with the incorrect table name of just'posts'
. I suspect.In reply to: BBPress / WordPress – Same Prefixes?Yes, it will. WordPress has (what is usually) wp_posts and bbPress has (ditto) bb_posts, with a different table structure, so there’d be issues.
What are the dis/advantages of putting tables in the same database, does anyone know?
In reply to: bbSyncSneaky, I have an idea of what it is. Find this line near the beginning:
$bbprefix = get_option( 'wpbb_bbprefix' );
And replace with
$bbprefix = 'bb_';
or your actual bb table prefix.
In reply to: Freshness LinkedSorry, forgot about this 😮 Looked at it, can’t figure out where it might go wrong, so here’s some slightly alternative code that will use a different function to do it’s thing and we’ll see if that works. Replace function fel_addlatestlink() with
function fel_addlatestlink($title)
{
global $topic;
//$felgtlpl = get_topic_last_post_link($topic->topic_id);
$felgtlpl = get_post_link( $topic->topic_last_post_id );
$title = $title . ' <a href="' . $felgtlpl . '"> » </a>';
return $title;
}In reply to: Access bbPress login info from existing siteMy guess was that the cookies were set for the forum but not for folders higher up, but if that didn’t fix it I don’t know if that’s right.
In reply to: bbPress 0.8.2I think that instead of “Fourth, sit back and relax; you’re done!”, you also need to go to bb-admin and click the upgrade link. But then you’re done.
In reply to: bbSyncYeah, I know, but thanks. ^^ In the meantime you can use this hack I brewed up a while ago to display replies as comments beneath bbPress-Post integrated posts. Don’t think it supports avatars, though. But we’ll get this to work
In reply to: Access bbPress login info from existing siteAre you sure you’re actually logged in? I would argue that you’re not logged in if it comes up with the login form.
I think this sounds like a cookies issue. Can you add this to your config.php and see if it works?
$bb->cookiepath = '/';
If not, check what the properties are for cookies set (just to make sure that’s not the problem).
In reply to: bbSyncSorry to leave you guys in limbo, but I can’t give you the new version because I’m halfway through adding stuff so it probably doesn’t work and I’ve got exams over the next few days so I’m a bit busy 😮 Will be back on this on Thursday. Could be quite rad!
In reply to: bbSyncStarrett, there’s a few template tags. Originally I was thinking I could make it so people can customise the comment structure in a seperate template file but dismissed it as thinking that no-one would care (I don’t). It’ll be quite easy to put it back in. They are all used internally, so they do work. Do you use the Avatar Upload plugin, actually? Can’t remember if I made a check for that.
It’s probably a good idea to let it stop at the
more
tag. With a link to the original entry? Can do, would make that a generic option (hmm, got quite a lot of options now).The option “how much of your post” is the character count. A little less than ideal, I suppose.
You can set this on a per-post basis by enabling per-post options, too.
Sneaky, the most important thing is error logs. I’ll see if I can help with that.
In reply to: “Cannot select DB.”It probably means your database information is wrong. Open
config.php
and check it.In reply to: bbSyncStarrett: Fantastic! I think I’ve got the problem, for now go to the options and disable the “Do you want me to load bbPress whenever to …” checkbox. Temporary fix.
Sneaky, we’re gonna make it work!
In reply to: bbpress info in wordpress?Forget about the PHP.
Where it just says “avatar” instead of displaying the image, open the page source (in FF: Ctrl + U, in IE: probably something), then search for “avatar” until you hit the right place. There should be an image tag. Look at the
src
property. Does that URL point to a valid image file? If not, what does it read?In reply to: bbSyncSneaky: cool, thanks. I suspect you have a similar problem to Starrett but it’s going to be very difficult to find without seeing the errors. I’ll see if I can write you something that can read the error logs for you.
Starrett: That’s progress! I like it!
Try adding $bb_roles to the list, so that it becomes
global $bbdb, $bb_cache, $bb_roles;
This could be interesting. Either this will fix everything, or we’ll go through global by global variable and it should work eventually. Cool!
(All I’m doing is looking at the code you’ve got, finding the right line and looking at the variables called in it. The one we’ve got a problem with is usually the one which is called just before, like in this case line 275 uses $bb_roles and a few lines up it says
global $bb_roles;
. If you feel confident, you can look for the variable that’s causing a problem yourself. Or we can keep doing this.)
In reply to: bbpress info in wordpress?$avatar[0] is the filename I believe. Have you checked what’s wrong with the urls?
In reply to: usually forums would have…Any news or update on what? Plugins? Yeah, for ages. https://bbpress.org/plugins/
In reply to: Editing hot tags so they point outside the bbNo. Just a mistake.
In reply to: bbpress info in wordpress?The URL doesn’t point to a valid image file so it just displays the alt text. Check what’s wrong with the URL (and remove the pointless reference to $bbposter->user_login).
In reply to: bbpress info in wordpress?Same database but not same codebase. However you can make bb load wp at the start, and you can make wp load bb at the start (that’s the other method). It’s not difficult but not guaranteed to work, because only a few people have done it. It might mean fiddling with things until they work. If you did that, you could do what you were trying.
<?php
/*
Plugin Name: WP Avatars
*/
function wp_aud( $felID ) {
$avatar = get_usermeta( $felID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = 'Plz enter the URL of your bb install here';
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}
?>Otherwise you could paste that in a new text file, save it in your plugins folder, activate it and then use this in wordpress:
<?php wp_aud( $comment->user_ID ); ?>
In theory.
In reply to: bbpress info in wordpress?Didn’t see ganzua’s post, posted at the same time. 😮
When copy and pasting the code you have to remove any bb dependencies. For example, bb uses the $bbdb; wordpress uses the $wpdb, and for queries and the like you can just switch them. Note that $wpdb does not contain information about the names of bb tables, so $wpdb->topics or the like will not work. In other cases the function names are simply different; bb_get_option() or simply get_option() for example. This code is what I used in bbSync to integrate avatars:
function bbreplyavatar() {
global $bbposter, $opshuns;
$avatar = get_usermeta( $bbposter->ID, 'avatar_file' );
$avatar = explode('|', $avatar );
$bburl = $opshuns['bburl'];
echo '<img alt="' . $bbposter->user_login . ' avatar" src="' . $bburl . '/avatars/' . $avatar[0] .'" class="avatar" />';
}Note that $opshuns and $bbposter need definition (or changing). bbSync could be quite useful to you actually.
What’s the specific problem you want to solve right now, and what have you tried?
In reply to: Editing hot tags so they point outside the bbGot an example? I haven’t seen that and can’t find it in the code. 😮
In reply to: bbpress info in wordpress?Okay, but which do you want to do? I don’t feel qualified to make that decision for you. Can you make a start on either?
In reply to: Any idea to integrate wp and bb login forms?Very nice, sorry my ‘help’ wasn’t that useful
In reply to: Any idea to integrate wp and bb login forms?Try this one.
global $user_ID;
get_currentuserinfo();
... bbpress/profile.php?id=' . $user_id . '">' . ...