John Blackbourn (@johnbillion)

Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • @johnbillion

    Participant

    Thanks for the compliments!

    @sambauers: I’ve fixed the login integration by updating bbPress to RC2 (it was still on an alpha) and all is well again. Thanks for all your hard work on bbPress. Much appreciated.

    @johnbillion

    Participant

    @Michael3185:

    The user profile fields are simply items in a PHP array. You can remove an item from the array to remove the profile field, or add a new item to the array to add a new profile field.

    <?php

    /*
    Plugin Name: My Profile Fields
    Description: My profile fields for my lovely forums
    Version 1.0
    */

    function my_profile_fields( $fields ) {
    /* This removes the Occupation profile field: */
    unset( $fields['occ'] );
    /* This adds a new optional field called Favourite Band: */
    $fields['faveband'] = array(0,'Favourite Band');
    /* This adds a new *required* field called State: */
    $fields['state'] = array(1,'State');
    /* You must return the array at the end of the function: */
    return $fields;
    }

    add_filter( 'get_profile_info_keys', 'my_profile_fields' );

    ?>

    Save the code above as a .php file and upload it to your my-plugins directory (you may need to create this directory in the root of your forums installation) and then activate it from the Plugins menu in the bbPress admin area.

    Edit: Code updated as a complete example of a plugin.

    @johnbillion

    Participant

    There is a filter on the function get_profile_info_keys() in bb-includes/functions.bb-core.php which can be used to add and remove profile fields.

    @johnbillion

    Participant

    Nice looking theme there massbase. Keep up the good work.

    @johnbillion

    Participant

    @johnbillion

    Participant

    @sambauers: This video is absolutely spot on. If you follow it step by step, integration works, period. Thank you for your time and effort!

    @johnbillion

    Participant

    I’m working on a patch and a plugin to allow this functionality. Will post here when I’m done.

    In reply to: replacing page title

    @johnbillion

    Participant

    Oh hang on, that’s not right either. Use add_filter(). Try this:

    function my_title( $title ) {
    return 'PHP Scripts Development Forum';
    }

    add_filter('bb_get_title', 'my_title');

    In reply to: replacing page title

    @johnbillion

    Participant

    The second parameter in apply_filters() needs to be a function that returns the text to be displayed in the title. Eg:

    function my_title( $title ) {
    return 'PHP Scripts Development Forum';
    }

    apply_filters('bb_get_title', 'my_title');

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