fel64 (@fel64)

Forum Replies Created

Viewing 25 replies - 526 through 550 (of 1,001 total)
  • @fel64

    Member

    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: bbSync

    @fel64

    Member

    It’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 the wpbb_prefix option exists in your tables, I suspect that’s a Latest Discussions plugin thing (ah, hindsight). If it did, it would read bb_. 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.

    @fel64

    Member

    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: bbSync

    @fel64

    Member

    Sneaky, 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 Linked

    @fel64

    Member

    Sorry, 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 . '">&nbsp;&raquo;&nbsp;</a>';

    return $title;
    }

    @fel64

    Member

    My 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.2

    @fel64

    Member

    I 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: bbSync

    @fel64

    Member

    Yeah, 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 :)

    @fel64

    Member

    Are 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: bbSync

    @fel64

    Member

    Sorry 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! :P

    In reply to: bbSync

    @fel64

    Member

    Starrett, 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. :P 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. :)

    @fel64

    Member

    It probably means your database information is wrong. Open config.php and check it.

    In reply to: bbSync

    @fel64

    Member

    Starrett: 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! :P

    @fel64

    Member

    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: bbSync

    @fel64

    Member

    Sneaky: 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. :) )

    @fel64

    Member

    $avatar[0] is the filename I believe. Have you checked what’s wrong with the urls?

    @fel64

    Member

    Any news or update on what? Plugins? Yeah, for ages. https://bbpress.org/plugins/

    @fel64

    Member

    No. Just a mistake. :)

    @fel64

    Member

    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).

    @fel64

    Member

    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.

    @fel64

    Member

    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?

    @fel64

    Member

    Got an example? I haven’t seen that and can’t find it in the code. 😮

    @fel64

    Member

    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?

    @fel64

    Member

    Very nice, sorry my ‘help’ wasn’t that useful :P

    @fel64

    Member

    Try this one.

    global $user_ID;
    get_currentuserinfo();

    ... bbpress/profile.php?id=' . $user_id . '">' . ...

Viewing 25 replies - 526 through 550 (of 1,001 total)