Adam Harley (Kawauso) (@kawauso)

Forum Replies Created

Viewing 25 replies - 151 through 175 (of 285 total)
  • @kawauso

    Member

    Google? Animated fire gifs have been around longer than bbPress, BuddyPress and WordPress put together…

    @kawauso

    Member

    Slight difference between bb_load_template() and include(), bb_load_template() can take as it’s 2nd argument an array of containing the names of variables to be used as globals within the template, whereas using include() the included file just inherits all the global variables from the parent.

    @kawauso

    Member

    @kawauso

    Member

    The very, very first link in this thread (where it says download ‘here’) works:

    http://members.lycos.co.uk/wmnkhayal/files/phpbb3tobbpress%20converter.tar.gz

    but that’s the version without any fixes

    In reply to: Displayname check

    @kawauso

    Member

    @gerikg: There’s far more chance that someone has written something like this for WordPress in their plugin database

    @kawauso

    Member

    Guh. Last stab at it, the action only runs on a valid tag being added (rather than just an attempt being made to add one). Beyond that though, who knows, I’m running 2.8.2 SVN so it’s always hard to tell what’s just me :)

    @kawauso

    Member

    To the Internets!

    @kawauso

    Member

    Nooo idea where they are then sorry, try using something like Find in Files with Programmer’s Notepad to search for the line

    @kawauso

    Member

    Not quite sure what you’re asking, but if you’re just trying to display a message to non-logged in users, use something like:

    <?php if ( !bb_is_user_logged_in() ) : ?>
    Welcome, please log in or register!
    <?php endif; ?>

    in front-page.php

    My coding is pretty terrible too ;P I just learn from poking around in bbPress and WordPress and breaking things a lot, so you’re going about it the right way :P

    @kawauso

    Member

    There might be a fatal database error, and database errors might hidden by default, $bbdb->suppress_errors( false ); will turn them on if they are. Obvious question is, does that work without any database interaction?

    @kawauso

    Member

    It’s not necessarily very obvious if it is run unless you get something to echo because it’s all hidden under AJAX

    <?php
    function status_tags_update( $a, $b, $c ) {

    var_dump($a);
    var_dump($b);
    var_dump($c);

    }

    add_action('bb_tag_added', 'status_tags_update',100,3);
    ?>

    I put that in my functions.php and it happily threw out some mangled HTML with the dumps underneath the tag list :)

    In reply to: IPB3 to bbPress

    @kawauso

    Member

    I’d have a go at it if IPB wasn’t paid software :/ kind’ve hard to develop for something you don’t have really, which might be why it’s difficult to find a viable converter. Do you know if there are any formats it will export to natively?

    @kawauso

    Member
    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <a href="<?php topic_link(); ?>"><?php topic_title(); ?></a><?php topic_page_links(); ?> <a href="<?php post_link($topic->topic_last_post_id); ?>">Latest</a></td>
    <td class="num"><?php topic_posts(); ?></td>
    <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num"><a href="<?php topic_last_post_link(); ?>"><?php topic_time(); ?></a></td>

    Just change the word Latest to whatever you like :)

    @kawauso

    Member

    It should be. There’s an option in the Advanced Options section of the WordPress Integration section to specify different settings for the user database, so you’d just have to use that. The rest of the bbPress database could be stored locally.

    In reply to: Displayname check

    @kawauso

    Member

    I couldn’t reproduce getting the error, only changing and getting the okay message. No idea why that is, but my money is because of MySQL and UTF-8. Maybe someone else can fix that, but I definitely can’t for now.

    @kawauso

    Member

    Yep.

    @kawauso

    Member

    There’s no such thing as bb_print_scripts. bbPress is partially integrated with WordPress functions (BackPress), so in bbPress it remains wp_print_scripts.

    @kawauso

    Member

    @johnnydoe: In your theme’s register.php, before the line if ( is_array($profile_info_keys) ) : (above the <?php tag before that), put:

    <?php unset( $profile_info_keys['user_url'], $profile_info_keys['from'], $profile_info_keys['occ'], $profile_info_keys['interest'] ); ?>

    That will take out the extra fields in the register form. What you did was take out the part that outputs all the form fields :D

    I can’t see the “to participate” part either, did you manage to get hold of the bbPress.org template? ;)

    In reply to: Displayname check

    @kawauso

    Member

    How fun, your install is ignoring a exit (die) command :D got a link to your forum?

    That or 1.0.2 is radically different in how it structures when that function is called D:

    In reply to: Enhance your 404 page

    @kawauso

    Member
    <?php
    $redirect_301 = array(
    '/ddd/' => '/forum/newlocation',
    );

    list( $request, $query ) = explode( '?', $_SERVER['REQUEST_URI'], 2);
    $request = rtrim( $request, '/' );

    $forum = dirname( $_SERVER['PHP_SELF'] );

    foreach( $redirect_301 as $from => $to ) {
    $from = $forum . '/' . trim( $from, '/' );
    if( $from != $request )
    continue;
    if( !empty( $query ) )
    $to .= '?' . $query;
    wp_redirect( bb_get_uri ( $to ), 301 );
    exit();
    }

    ?>

    That might support IIS, the native WP function doesn’t use the Location: header so I guess that’s an issue?

    http://support.microsoft.com/kb/q176113/

    @chandersbs: It’s nice :D I tidied it up to support trailing slashes no matter what and query strings amongst other things. I think. That or it’ll break :D

    I dropped the need to have the forum directory included in the $redirect_301 array as well, that’s automatically added now. Just change bb_get_uri ( $to ) to $to if you need to point the redirect outside the forum directory or use ..

    @kawauso

    Member

    Easy enough to do

    <?php if (40 <= $topic->topic_posts) : ?>I'M ON FIRE<?php endif; ?>

    Put that in your front-page.php and/or forums.php somewhere inside the parts that say foreach( $something as $topic ), probably best before <?php bb_topic_labels(); ?>. Change 40 to whatever you want the topic to change at and the on fire bit to something… fiery.

    @kawauso

    Member

    Slightly lighter version <a href="<?php post_link($topic->topic_last_post_id); ?>">Latest</a>

    In reply to: Displayname check

    @kawauso

    Member

    That’s… weird, and slightly worrying. Unless you mean can it stop people already registered with a duplicate name already? It could, but that’d be easily avoidable by never editing your profile. If it’s registering changes to an already existing display name from a different one though, there’s something very wrong, because it’s run before anything is saved and has a hard stop put in right after the redirect.

    @kawauso

    Member

    Doing a quick var_dump of the passed argument, it’s just a string of the tags passed by the user (commas and all) and before checks are made to see if they’re existing tags. I think you’d want to use bb_tag_added which passes $tt_id, $user_id, $topic_id as each tag is added (if you register the action function as taking as many variables).

    In reply to: target _blank

    @kawauso

    Member

    This is pretty simplistic regex, you’d need something that checked the URL host again the local address for that. Probably do-able using regex, but I can’t write it to save my life…

Viewing 25 replies - 151 through 175 (of 285 total)