John Conners (@johnconners)

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)

  • John Conners
    Participant

    @johnconners

    Been a bit swamped with work lately so I’ve not had a chance to finish it up yet (there are still a couple of use cases where certain pages aren’t flushed from the cache). However my approach has been to try and hook into the fewest places possible and just do the ‘edit_post’ action on whatever topic / forum / page needs flushing.

    My current work in progress, in case anyone else has more free time just now than I do, is here:

    http://downloads.johnsadventures.com/bbpress-cache-support-01.php

    Hopefully in the next week or two I’ll have some time to finish it myself if nobody else does in the meantime. Also, any thoughts on a better implementation – let me know!


    John Conners
    Participant

    @johnconners

    I’m working on a simple plugin that effectively fires:

    do_action( 'edit_post', $id );

    on any topic, forum, etc. when edited, created, trashed, spammed, split, etc to flush the topic and forum out of the cache.

    I’ve almost got it working and am just getting trashing / untrashing to work then will put it up somewhere to let others work on it. While it’ll work in my case where I’ve not got a bbPress aware theme it may need some tweaking / improvements for all cases.


    John Conners
    Participant

    @johnconners

    JJJ: Ok, I’ll put together the list of actions / filters I’ve used to get cache invalidation working when I get back to my home machine (then hopefully you can say “no no no, all you needed to do was this…”). Is this forum post the best place or a trac ticket?

    CiaranG: I was thinking along the same lines and shouldn’t be hard to do with a bit of jQuery I’d hope!


    John Conners
    Participant

    @johnconners

    So I can get both of these cache plugins to work by hooking into a few actions in bbPress and invalidating the post (which may be a topic or forum) and any ancestors (which would be a topic / forum in the case of a reply) by doing the ‘edit_post’ action on each post. There are a couple of edge cases still to deal with (like subscribing to a topic that needs your user page invalidating) that I’ll have a look at this evening.

    Only real thing I don’t have an answer to is the freshness count. If you view a forum and the last topic was posted 1 minute ago then you come back an hour later and refresh the page you’ll see the cached page stating that the last topic was posted 1 minute ago rather than an hour ago. I could go with the fixed date approach but it’s not as neat.


    John Conners
    Participant

    @johnconners

    Yeah, that’s right. Agreed, I assumed it would work too so figured I should check if I was missing something. Will have a look and see what’s going on.


    John Conners
    Participant

    @johnconners

    Sounds like you want to check something like this:

    <?php if( bbp_is_forum() || bbp_is_topic() || bbp_is_reply() ) {
    echo "iam_forum";
    }
    ?>

    In reply to: forgotten username

    John Conners
    Participant

    @johnconners

    Unless I’m missing something I don’t believe you can log in with your email address to bbPress 1.0. You certainly can’t on this forum or my own (both running 1.0.2).


    John Conners
    Participant

    @johnconners

    To stop all users from being marked as bozos you’ll need to run the following SQL scripts (you mentioned you did this above but thought I’d put the exact statements in to make sure you didn’t miss anything):

    delete from bb_usermeta where meta_key = ‘is_bozo’;

    delete from bb_usermeta where meta_key = ‘bb_bozo_topics’;

    And to un-bozo all topics and posts you’ll need to run the following scripts:

    delete from bb_topicmeta where meta_key = ‘bozos’;

    update bb_topics set topic_status = 0 where topic_status = 2;

    update bb_posts set post_status = 0 where post_status = 2;

    I’d back your database up first though just to be on the safe side but the above should do the trick. I suspect the topic totals will be out of sync once you do this so you’ll need to recount the totals from the admin section.


    John Conners
    Participant

    @johnconners

    Remove the brackets – this is what you want to execute:

    UPDATE bb_topicmeta SET
    meta_value='http://www.portcityunderground.com/bbpress/'
    WHERE meta_key='uri' LIMIT 1

    In reply to: hiding the long URL

    John Conners
    Participant

    @johnconners

    You use standard HTML markup so to create the following link:

    Here’s a link

    you’d enter the following:

    <a href="http://www.example.com/">Here's a link</a>


    John Conners
    Participant

    @johnconners

    If you want people to stay logged in after the end of the session, just add the following within the form element in the login-form.php template file:

    <input name="remember" type="hidden" value="1" />

    Just make sure it’s before the closing </form> tag.

    In reply to: Gravatar Disable Issue

    John Conners
    Participant

    @johnconners

    See: https://trac.bbpress.org/ticket/870

    You can make the change yourself to fix this using this changeset:

    https://trac.bbpress.org/changeset/1499

    Or alternatively you can go directly into your MySQL database and remove the row from the bb_topicmeta table with the meta_key of ‘avatars_show’.


    John Conners
    Participant

    @johnconners

    I believe the new support forum theme was designed by the same people who redesigned the WP admin screens (Happy Cog).

    Here’s an explanation of how to get avatars working in WP 2.5:

    http://weblogtoolscollection.com/archives/2008/03/03/gravatars-and-wordpress-25/


    John Conners
    Participant

    @johnconners

    Have a look in your mysql database with phpmyadmin at the bb_usersmeta table for your user (whatever ID that is, which you can get from the bb_users table). If you find the row that has the meta_key column of bb_capabilities, you’ll probably find the meta_value is:

    a:1:{s:6:"member";b:1;}

    If you change that to:

    a:1:{s:9:"keymaster";b:1;}

    You’ll find you’re an admin and can see the admin panel.


    John Conners
    Participant

    @johnconners

    I’ve experienced this problem in 0.8.3.1. If you follow the password reset link you get emailed and then try to log in from that page you’ll get the key not found error. The reason is the ‘re’ value in the login form is getting set to that password reset link (bb-reset-password.php?key=xxxxxx) so when you log in bbPress bounces you back to that page (as it would do if you logged in from a specific topic) and now that the password has been reset, the key xxxxxx is no longer in the database and the ‘key not found’ error pops up.

    The way I’ve worked around it is to do the following prior to calling login_form() on password-reset.php in my template:

    <?php global $re; $re = bb_get_option(‘uri’); ?>

    The trouble is that in the default template login_form() is in the header so you’ll need to set $re elsewhere or come up with another solution.

    Hope that helps!

Viewing 15 replies - 1 through 15 (of 15 total)