Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 20,976 through 21,000 (of 32,499 total)
  • Author
    Search Results
  • #89487
    chrishajer
    Participant

    What is the hacking to get rid of the backtick quote problem? I’m not sure what you were trying to solve there. Was that to fix the code and backtick problem?

    The escaping of single quotes on integrated installations has been covered here before.

    Slashes being added in front of apostrophes

    Apostrophe and or quotation marks cause backslash to appear.

    https://bbpress.org/forums/topic/slash-text-issue-in-10-alpha-6-have-searched

    Sounds that that is your problem – escaping single quotes in an integrated installation. The hacking you did is unrelated (I think.) I confused backticks with quotation marks.

    I don’t think it’s related to the keys at all. They are not used that way when posting. The worst that ever happened was that bbPress did not support the complex keys (with escaped characters) that WordPress did. But that resulted in a 500 Internal Server Error.

    #88530
    Rootside
    Member

    Upgraded to WordPress RC 3, still getting the same error.

    print_r($_POST); gives me the following:

    Array ( [user_login] => hello [user_email] => xxxxxxx@rootside.com [user_url] => [from] => [occ] => [interest] => [Submit] => Register ยป )

    I obscured the email address here, but it is the one I have entered in the registration form above. So it seems that user_email IS defined.

    Thanks for that hint. Maybe it’s a freakish bug – nobody else has chimed in with the same problem so far – but I don’t know how many people are testing WP 3 with bbPress yet, so I’m not quite ready to re-install the whole sermon from scratch again. I’ll try setting up the same combo on a different server as soon as I can find the time, but I’m still hoping that this can be tracked down, so I don’t have to fear for the worst with every future update…

    Does the information above give any of you guys an idea?

    Again, greatly appreciated.

    #89435
    driz
    Member

    I think I found a much better way to get around it. Just wrap the new tag with the old tag, as it check for the forums if none then don’t run the new code.

    <?php if ( bb_forums( $forum_id ) ) : ?>

    <?php if(bb_forums(array('where' => "where forum_parent = $forum_id"))) : ?>

    #89484
    ghettobsd
    Member

    Please see above! :P

    I used a NEW (not related) db, i used both clean installs.

    So basically, the problem is reproduced on the stock installs of wp,bb with integration on mysql. So nothing, not even the themes from before were used.

    At first I thought it was because I changed the type of links (permlinks) and then did a stock install with no changes, but integration and it happened again.

    I basically did many installs under different configurations/databases. And everything ended up the same every time.

    I ruled out:

    – The theme being the problem.

    – The hacks …

    – Perm link options …

    – .htaccess …

    – The database…

    Maybe it has to do with the auth key info? That’s the only obvious thing.

    I do have wp and bb installed else where and integrated without the same problem.

    I used a generator that also generated the salt, could that be it?

    #89475
    zaerl
    Participant

    bb_update_forum is a function, not a hook. Like I said there is no way to fire custom actions when a forum is added/modified/deleted.

    #89474

    ooooh bb_update_forum. Awesome find.

    thats the difference between someone who can actually code PHP and someon like me.

    I’ll have to play with it though, and might ask you for some help, as in some re-ordering will fire that once for each forum is manually updated by an admin. I mean that won’t happen often ofc, but it’s (number of SQL calls my function makes * each function affected).

    Currently, and in no way overly optimized, the “forum_family_tree_setup” script uses 2 + (3 * parent) SQL calls per per forum.

    Even on my large football forum, (large in terms of number of forums) which has quite deep relationships, this is far less intensive than a recount. If this was to be multiplied by 3 or 4 times though (depending on how many forums are updated with a move), that might cause a hic-up.

    I’ll do some benchmarks after the weekend – I’ve got 31 non-England teams to support in the World Cup this weekend ;-)

    Cheers bro!

    #89473
    zaerl
    Participant

    So you need to hook bb_new_forum, bb_update_forum and bb_delete_forum. There is no way to set hooks after the db stuff. Or at least this is what I think after 20 mins of studying the core.

    #89472

    do_action( ‘bb_update_topic’, $topic_id ); actually is fired after all the db stuff and not before. Given the code of bb_insert_topic we have:

    You’re a Legend.

    Once again, Thank You.

    I thought it might, but thats at least me down to 4 non-supported major features in my code:

    1) Update family tree upon adding/removing forums or changing forums order

    (the code is there, the trigger isn’t – right now I’ve just got a reminder in the readme and added it to the daily cron job on my servers)

    2) Gives accurate counting for parent child relationship in terms of “total” forums/topics/posts/voices.

    (Again, code is there and working, and runs on “recount”, but should also be activated upon adding/removing forums or changing forums order)

    3) Addition of “Groups” instead of categories. Again, this is written and working, but I’d need to come up with some form of changeover script.

    (Apparently to group forums together, you need to make it’s parent read only. But if you want to make a forum read only but not a ‘header/category/group’ you can’t. Don’t get me wrong it was a great hack by _ck_ when 0.8.3 came out, but man, why roll it into the core without any actual thought!! 0.8.3 was 3 years ago.)

    4) Rewrite hooks for moderation to comply with other plugins (specifically to play nice and read yours and Nightgunner5’s), as right now it only natively reads my own plugins, which is daft.

    #89434
    zaerl
    Participant

    Yes I know. Unfortunately I had to fight with that piece of code also in my plugin zaerl Visibility. bbPress doesn’t allow zero forums.

    #89471
    zaerl
    Participant

    I’m basically wanting to know when someone changes the name/title of a topic. Which seems very simple to me (in theory).

    do_action( 'bb_update_topic', $topic_id ); actually is fired after all the db stuff and not before. Given the code of bb_insert_topic we have:

    db update

    bb_update_topic

    bb_insert_topic

    in that order. If you intercept bb_update_topic the db must be already updated. At least if there isn’t something evil inside wp_cache_*

    If you want something that works before the database is updated. See this:

    add_filter('pre_topic_title', 'foo', 10, 2);

    function foo($topic_title, $topic_id)
    {
    global $bb_post;

    if($bb_post) echo "You changed me. How dare you.";

    return $topic_title;
    }

    but keep in mind that I’m not proud of this code nor I have run it. What actions do you want to take when a topic is renamed? You want to filter away the new title, changing the slug or what?

    I’m really not a fan of the colours and layout, but I love that you’ve done so much with it and have a thriving community. From what I can see, signatures and image posting are working really well for you as have Avatars etc.

    While my personal taste preffers your Kate Humble forums, its great to see you and your forums doing so well!

    Keep us notified of any changes you make too, and well done :)

    #89433

    oh for goodness sake, that code bug is really getting on my tits.

    Driz, the main thing to remember is this. these forums are aimed at making the WordPress support forums. Once you try and venture outside the functionality they have, you’re going ot hit issues which will need you to be able to read/write/investigate the source PHP files.

    #89432

    Ok, so you’re trying to do something that bbPress can’t natively do.

    You’re presuming, and we can all see why, that because this is forum software that it has native parent/child relationships; when it doesn’t really.

    I’ve always found the best thing to do is to write my own forum subroutine in a page.

    if ( bb_forums( $forum_id ) )

    {

    while ( bb_forum() )

    {

    global $forum;

    global $forum_id;

    print_r($forum);

    // I output my own code here using

    // $forum->forum_name

    // $forum->posts

    // To show children of forum

    if($forum->forum_parent == $forum_id || empty( $forum_id))

    {

    //Output code here, it’s a child or you’re on the front page

    }

    }

    }

    To re-iterate, I’m coding the above from memory, so if there are errors you’ll need to check them yourself :)

    #89470

    Wonderful Zaerl mate.

    Issue 1:

    bb_new_post and bb_new_topic actually cause me a world of issues, because they’re fired before all of the SQL/PHP is fired. It took me about 2 days to work out my copy and pasted SQL was producing different results in the PHP and the actual database.

    In the end, I had to move those functions to add_action('bb-post.php') and then test if a topic was passed or not.

    (I’m guessing a little that this might have something to do with the wp_cache functions, as in certain places we call wp_cache_flush and wp_cache_delete before the bb_new_post actions)

    bb_update_post though seems like its exactly what I want, though am a tad concerned that the same thing will happen – at least if I have access to $_POST I can hack it.

    I’m basically wanting to know when someone changes the name/title of a topic. Which seems very simple to me (in theory).

    ==========================================================

    The second one is a bit more tricky.

    I basically have a (half-baked) plugin that deals with the geneology of a forum, with true parent/child n-to-n relationships. For my non-flat websites, this (again half-hacked) plugin has really made my life easier.

    Before I release it, I want to make sure I’m covering as many bases as possible, and these have been outstanding bugs for about a year now.

    Whenever someone reorders their forums, or adds a new forum, or marks a forum as hidden; I’d like my plugin to know about it. Basically, I want my plugin to be fired AFTER the core has finished what it’s doing, and we’ve no action for that.

    But there’s no action or pluggable function that gets called after, thre is only bb_check_ajax_referer and thats called before any processing.

    I really apprecaite your help Zaerl mate, if you can think of anyhing else – please shout!

    #89431
    driz
    Member

    This only works for forums that have subforums. If I have a forum that is just top level and has no subforums when I view it it blows up saying Invalid argument supplied for foreach() in /nfs/c03/h05/mnt/52704/domains/paperviewmagazine.com/html/forums/bb-includes/functions.bb-forums.php on line 84

    If I switch the original if statement on instead it doesnt break, so it’s defo the new code. Any ideas? Thanks

    #89469
    zaerl
    Participant

    I have a plugin that needs to be fired when someone edits a post.

    bb_update_post, bb_new_post respectively. Post ID is passed.

    Now beware of the magic (?) hack. Given case 'order-forums' : you can use the the action fired by bb_check_ajax_referer:

    do_action('bb_check_ajax_referer', $action, $result);

    if $action == 'order-forums' then you are in that particular case.

    Now you can read $_POST or accessing other actions. What do you want to do?

    p.s. at least in this way God doesn’t kill a kitten.

    #89430
    zaerl
    Participant

    if(bb_forums(array(‘where’ =] “where forum_parent = $forum_id”)))

    Substitute the square bracket ] with the angular bracket. For great justice.

    #89429
    driz
    Member

    I tried the code zaerl posted, but it when viewing forums it requires the $forum_id within the function to display the correct stuff otherwise it will show the same as the front page and not the selected forums subforums. I need to use $forum_id with the array posted so I only get the top level forums within the chosen forum.

    I tried doing this to see if it would combine the two:

    if(bb_forums($forum_id, array(‘where’ => ‘where forum_parent = 0’)))

    but it just showed all the forums for that forum and not just the parents

    #89428

    What code did you try on the sub forum pages nad we can try and help :)

    #89446
    mr_pelle
    Participant

    Prepend this code to line 233 of functions.bb-template.php:

    if ( 'favorites' != $item[4] )

    #89479

    What I’m looking for is to have a simple forum integrated with my WP installation. It seems like bbPress is the perfect choice but now I’m not so sure

    If you want a “simple forum” then bbPress fits that need.

    If you want single sign on with your WordPress install, then bbPress is probably the best out there.

    as of yesterday I’ve heard of buddypress… and now I’m confused

    Yeah, we have to explain this every day to someone.

    Truly wish anyone with Documentation rights would maybe save this as a sticky or maybe in the documentation section or something…

    BuddyPress and bbPress are not connected.

    BuddyPress allows you to install a forked version of bbPress. It is not the same as this bbPress. We don’t know why they kept the name. We don’t know why they don’t publicise that they are different. If you use BuddyPress in any way, we can’t help you on this forum.

    It seems like the two products are made by the same people, are intended for similar purposes, but some people have both installed

    BuddyPress is ‘like’ a WordPress plugin, in the same vein of a fancy WooTheme or Thesis framework. Its like an additional layer onto which other plugins can be installed.

    About a year ago the BuddyPress team, under the great coding skills and direction of Andy Peatling (http://apeatling.wordpress.com/) forked and ported a version of bbPress to be run as a BuddyPress plugin.

    So bbPress and BuddyPress are two different products, with different aims and goals, and some people can have both installed – just not this version of bbPress.

    On top of that it seems like support for bbPress is waning

    Yes.

    But it will not go away or die. It runs the Automattic support forums, so its not going anywhere. It will be ported to a WrodPress plugin at some stage. Other than that sentance, we have no information on that.

    If what you need is a forum, use bbPress.

    If you need to build a social network (friends, groups, private messaging, activity) then use BuddyPress.

    Thats basically it :)

    #34472

    Hello folks,

    I was hoping that someone could point me in the direction of an ACTION that occurs on the following pages so that I can hook my plugin into them without hacking the core:

    bb-edit.php

    I have a plugin that needs to be fired when someone edits a post.

    Forum layout update

    In the backend we do it all through AJAX (how wonderful), except we call the following page bb-admin/admin-ajax.php and the following sections (via a switch statement): add-forums and order-forums.

    Except, no actions there to call either. And yes, to the best of my ability, I’ve stuck with the code the whole way through all the functions they call. I’ve yet to find a pluggable one.

    ===============================================================================

    I realise that my phrasing is sometimes considered combative, and I apologise for that, but are we seriously suggesting that at no point is the ability to add/edit/control/order our forum pluggable in anyway; and the same for the editing of a forum post??

    I’m more than happy to be wrong here, because right now I’m having one of those “bbPress moments” where you’re not quite sure if you’re losing your marbles or if whoever decided to make these not pluggable is.

    Thanks for the help

    #89426
    driz
    Member

    Cool works great. How do I do the same for the sub forums page where the tag looks like this:

    <?php if ( bb_forums( $forum_id ) ) : ?>

    #89443
    gerikg
    Member

    you can start with:

    add to your style.css

    #favorite-toggle{display:none;}

    The three tabs will still show up but the option to add to favorites option won’t show up on the posts.

    open profile.php

    line #25 that starts with

    <?php if (bb_current_user_can( 'edit_favorites_of', $user->ID )) : ?>

    add BEFORE

    <!--

    line #27

    <?php endif; ?>

    add AFTER

    -->

    I don’t know how to edit the three tabs.. sorry

    #89440
    cv3t
    Member

    Do not prompt where?

    p.s I already everywhere searched find a code could not…

Viewing 25 results - 20,976 through 21,000 (of 32,499 total)
Skip to toolbar