Mark Waterous (@delayedinsanity)

Forum Replies Created

Viewing 25 replies - 1 through 25 (of 72 total)

  • Mark Waterous
    Member

    @delayedinsanity

    It has to have my name and web site linked to somewhere on it. Then people will know my name. And my web site address. And that I’m super cool enough to be linked to from a theme that I didn’t make. :)

    In reply to: removing tags

    Mark Waterous
    Member

    @delayedinsanity

    Sorry for trailing off topic there. Here’s a quick question, have you modified the template in any way? If the proper classes/ID structure is not in place on the html side of things, the javascript will not have anywhere to hook into to make the AJAX updates. Could be the problem if you accidentally removed a class declaration somewhere.


    Mark Waterous
    Member

    @delayedinsanity

    Those are warnings, not errors. They are only presented when E_STRICT is on, as the PHP engine can and will disregard them and continue to compile just fine. Without looking into the problem too deep (it’s getting on, and I’m about ready for bed), off the top of my head I would suggest that the deprecated warnings are due to the fact that PHPs handling of OOP has changed mildly between v4 and 5. Objects are now passed by reference by default, whereas in PHP4 they weren’t. Since bbPress is backwards compatible to work on PHP4 (it cuts down on the snarky accusations that one might receive for being version specific), it will return warnings in PHP5 that are just that. Warnings.

    That’s the only real problem too. Turn off E_STRICT and you won’t get the remaining notices. The ‘headers already sent’ errors are due to the fact that you’re getting the deprecated warning (which outputs text to the screen, thus sending headers) before the script has completed its run.

    So… simply put, it can be called stable, as it’s purely your setup that is causing the issue, not bbPress itself.


    Mark Waterous
    Member

    @delayedinsanity

    I think they should be nominated for an academy award. ;)

    In reply to: Simple PHP Question

    Mark Waterous
    Member

    @delayedinsanity

    1) Yes. Not much per, but add them all together… in any site where you expect to have any respectable amount of traffic it’s always a good idea to make your templates static where and whenever possible.

    2) Nope.

    In reply to: removing tags

    Mark Waterous
    Member

    @delayedinsanity

    I made an oops. That code above doesn’t work, and I edited it earlier but I forgot to hit submit (I have so many tabs open it’s not even funny).

    The proper code is as follows;

    $id = ( isset($_GET['tag']) ) ? $_GET['tag'] : false;
    if ( ! $id || ! bb_get_tag( (string) $id ) )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $tag = bb_get_tag( (string) $id );
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    …with the code I originally posted, there’s no tag information passed on, so you get a whole wheelbarrow full of nothing.

    Trac filed, #1197… first time I’ve ever filed a trac, so I hope I followed etiquette/protocol properly. ;)

    In reply to: removing tags

    Mark Waterous
    Member

    @delayedinsanity

    Looks like it’s bb_repermalink that’s choking and causing us to get that blank page.

    Submit to trac? You can modify the following in functions.bb-core.php, starting on line 737;

    $_original_id = $id;
    if ( !$id )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $tag = bb_get_tag( (string) $tag_name );
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    To;

    $_original_id = $id;
    $tag = bb_get_tag( (string) $id );
    if ( !$tag )
    $permalink = bb_get_tag_page_link();
    else {
    global $tag, $tag_name;
    $tag_name = $id;
    $permalink = bb_get_tag_link( 0, $page ); // 0 => grabs $tag from global.
    }

    And instead of returning that blank page, it will return the global tags page. Possibly not the most eloquent solution, but works nonetheless.


    Mark Waterous
    Member

    @delayedinsanity

    Honestly when it comes to basic integration there’s absolutely no difference. WP and WPMU are the same codebase after all. The only real difference is whether or not you want your blog owners to be automatically added to your primary blog and by proxy as members of the forum.

    Deep integration is accomplished exactly the same on either platform too. Just stick with µ, eventually (as in anywhere from tomorrow to 2017) the two will merge anyways and if you install a second copy of standalone WP.org for your forums, you’re just going to wind up with two µ’s down the road. ;)

    I noticed you tagged this convo bbmu, just so you know (you probably do) but when you integrate bbPress with µ you don’t get bbPress µ as a result. When /bbpress is accessed, no matter the blog, the viewer will get the exact same forum.

    In reply to: removing tags

    Mark Waterous
    Member

    @delayedinsanity

    You might want to explore where that 500 is coming from, that probably shouldn’t happen. I did the same thing just to see if it was inherent to bbPress or maybe just bbPress.org, and it seems it might be just you. :) I got a blank page (would be nice to see that redirect somewhere else for non-existent tags) but it was showing a 200 ok, and not a 500.

    I just realized bbPress doesn’t have anywhere to view/edit tags in the administration panel. Is that coming down the road?


    Mark Waterous
    Member

    @delayedinsanity

    @olaf, muchos appreciado senor, but I’ve already written my own workaround. :) Just more of a suggestion based on situations I’ve ran into, something to consider as a future feature to make it easier for those who aren’t at home with PHP.

    The problem with simply truncating such a thing is you could wind up with a front page description of something like “The following forum is a good place to…” or something of the sort. I’ve looked at a lot of other bbPress sites in the last couple of months, and they all seem to be fairly out of the box setups, so I’m not so sure this is really widely being sought out, just something that would be fairly easy to implement and might aid in future scalability of bbPress installations.


    Mark Waterous
    Member

    @delayedinsanity

    Downgrading is not an option.

    If I could use signatures here, that would be my new one. :)


    Mark Waterous
    Member

    @delayedinsanity

    The ‘fix’ that’s listed on that changeset has nothing to do with removing the brackets. It’s completely unrelated.

    One other option for the meantime, which I’ve employed on my old site is replace the brackets with LI list elements to make an ordered or unordered list (style away) of the options. You can float this list or display it inline to make it look exactly the same, or if you would prefer, go to town and make it look snazzy.


    Mark Waterous
    Member

    @delayedinsanity

    I turned them on.

    I found the problem though, some time in the middle of last night I had some hair brained idea to reverse integrate bbpress back into WordPress so I could display forums in my sidebars and what not… well I’m running µ and I didn’t want everybody who hosts with us to have to load bbpress and not even get to use it, so I was being ‘crafty’. Somehow I managed not to break WP, but I busted bbPress. :) Woke up this morning and forgot all about it.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    Look for the function add_signature_to_post in bb-signatures.php, line 78 should look like;

    $text.='<div class="signature">'.nl2br($signature).'</div>';

    Change it to

    $signature = nl2br($signature);
    $text.='<div class="signature">'.bb_rel_nofollow($signature).'</div>';

    Signatures problem most likely has to do with bb_send_headers(); on line 297, but I’d have to install it to find out for sure. If I can spare the time, I’ll let you know. ;)


    Mark Waterous
    Member

    @delayedinsanity

    @adamkayce – you might want to look into an application called phpMyAdmin, it provides a visual interface for database interaction. From there you could easily export your original bb_ tables to an .sql dump file, and then simply reupload the file to the new database via import.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    If your theme doesn’t already have a functions.php, you can create one and add that code to it – it will automatically be found and run by bbPress, and it’s a lot safer than adding it to the core code (next time you upgrade, it will overwrite).

    1. bbPress doesn’t have signatures by default, so I’m guessing you’re using a plugin for this? If you are, hopefully the designer has added a filter which you can hook into, but we’d have to take a look at the specific plugin you’re using.

    2. You should have a style.css file in your bb-templates/yourthemename/ directory. Find that file, and do a search for ‘textarea’. It should possibly be under ‘.postform textarea’ to be more specific. Look and see if there’s a font-size attribute there, and up the size.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    Turns out there is a bb_rel_nofollow() already, it’s just not hooked into anything (?).

    So you could just omit mine, and add the following;

    add_filter('pre_post', 'bb_rel_nofollow');


    Mark Waterous
    Member

    @delayedinsanity

    1) https://api.wordpress.org/secret-key/1.1/salt

    2) There won’t be. You have to add it directly to the wp-config.php file, in the following format:

    define('SECURE_AUTH_SALT', 'replacewithyourstring');


    Mark Waterous
    Member

    @delayedinsanity

    Did you activate the plugin via your dashboard?


    Mark Waterous
    Member

    @delayedinsanity

    Make one. :) We promise we’ll cover our eyes.

    Once you have one for your wp-config, load up your favorite phpMyAdmin (er…) and make sure there’s an entry for bb_secure_auth_salt in the bb_meta table, and that it matches the string you added to your wp-config.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    If you have a my_plugins.php (or something similar) in your bb-plugins/, you can add this there. Alternatively, you could add it to your themes functions.php file. It’s only stopgap though, it’s not bulletproof, I’m a little rusty on regular expressions since I’ve been developing themes more lately than I have been doing real programming;

    function my_nofollow ( $ret ) {
    return preg_replace('#(<a[^"]+"[^"]+")>([^<]+</a>)#', '$1 rel="nofollow">$2', $ret);
    }

    add_filter('pre_post', 'my_nofollow');

    I’m not sure if this would qualify for trac, considering it’s not so much of a bug as it is an oversight? Mods?

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    Ah it seems if you explicity declare the link with A, they’re not discovered and nofollowed. Spammer loophole.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    I wouldn’t yet, at least not until it can be reproduced. At this point, I can’t, though I might not be taking the same steps as you. I tried two links, one with http and one without, and they were both nofollowed.

    What version of bbPress are you using?

    Is this just for a regular post in a regular forum, or is there special circumstances?

    Is it for links that are discovered by bbPress, or the ones that are explicitly declared by the poster with A tags?


    Mark Waterous
    Member

    @delayedinsanity

    That was kind of rhetorical in nature. I know how to get to the favorites page (by the by, mine is /profile/XX/favorites… permalinks are our friend). The problem is that bb_get_location() on the favorites page returns the location as being ‘profile-page’, not ‘favorites-page’ as you would expect.

    By proxy, I wonder if /favorites.php is still being used by bbPress or if it’s just legacy from 0.9 and all the favorites are being managed by /profile.php now. If that’s the case, bb_get_location() might need to be updated to use another method of determining what page the viewer is actually on.

    In reply to: Nofollow

    Mark Waterous
    Member

    @delayedinsanity

    1. Haven’t looked into that yet, but it should definitely be nofollowed no matter how the link is formatted so this might be worth looking into/filing a trac for.

    2. You run the risk of people spamming through their profile if they figure that out, but if you’re willing to take the risk, it’s not too difficult. Open up your templates profile.php, and add the following at the top of the page;

    <?php $GLOBALS['bb_nofollow_off'] = TRUE; ?>

    …then open bb-includes/backpress/functions.formatting.php and go to line 950 at the bottom of function _make_url_clickable_cb() and replace;

    return $matches[1] . "<a href="$url" rel="nofollow">$url</a>";

    with;

    return (isset($GLOBALS['bb_nofollow_off'])) ? $matches[1] . "<a href="$url">$url</a>" : $matches[1] . "<a href="$url" rel="nofollow">$url</a>";

    Note that if you have deep integration, you’ll have to change the above line in your WordPress version of the same function, not the bbPress one.

Viewing 25 replies - 1 through 25 (of 72 total)