Robin W (@robin-w)

Forum Replies Created

Viewing 16 replies - 14,126 through 14,141 (of 14,141 total)
  • @robin-w

    Moderator

    Kate t

    Thanks for posting this, saved me hours of trying to work out which file I needed to change, and how to code it.

    For those that want to add fields to their users, as well as Kate’s Meta pro, the following link shows how to add and use custom field, and the combination of these two made it quick and simple

    Adding and using custom user profile fields

    I also added the ability within BBpress for the user to change their location within the built in profile amend by changing Form-user-edit.php (located in web/wp-content/plugins/bbpress/templates/default/bbpress

    The following was added after line 125
    <?php bbp_edit_user_display_name(); ?>
    BBpress version 2.3.1

    <div>
    			<label for="town"><?php _e( 'Town', 'bbpress' ); ?></label>
    			<input type="text" name="town" id="town" value="<?php echo esc_attr( bbp_get_displayed_user_field( 'town' ) ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />
    		</div>
    In reply to: Forum sidebar

    @robin-w

    Moderator

    I used “Bbpress wp-tweaks” it creates a bbpress sidebar that is used on the forum pages.
    You could also use “Widget logic” – allows conditional statements on widgets to produce page or category specific sidebar content. Using the logic “is_bbpress()” allows sidebar specific content. “!is_bbpress()” excludes widgets from forum pages.

    @robin-w

    Moderator

    From the sticky on the upgrade put the following into your CSS

    `.bbp-search-form {
    display:none !important;
    }`

    @robin-w

    Moderator
    In reply to: Template Tags

    @robin-w

    Moderator

    code

    In reply to: Template Tags

    @robin-w

    Moderator

    `<a href="edit” >Amend Profile/Change password`

    ok think i worked it out

    In reply to: Template Tags

    @robin-w

    Moderator

    ok so how do you post code in this forum? it keeps swallowing it !

    In reply to: Template Tags

    @robin-w

    Moderator

    sorry lost the text through the forum interpreting it – try again

    a href=”edit” >Amend Profile/Change password
    Just wrap this in the usual <a and /a's

    @robin-w

    Moderator

    I have also added it in a page by creating a shortcode
    In functions.php in my child theme I added

    //edit profile
    function profileedit() {
    return ‘Amend Profile/Change password‘ ;
    }
    add_shortcode(‘profileedit’, ‘profileedit’);

    Then in any page type [profileedit] and up comes the href with the current user correctly filed in.

    In reply to: Template Tags

    @robin-w

    Moderator

    Not sure which bit of your site you plan to put this in, but the following php code will put up some text which they can click

    <a href="edit” >Amend Profile/Change password

    without the “edit”, it’ll take them to their profile page.

    @robin-w

    Moderator

    Lynq,

    Thnaks for your unput. I played with several ideas, but in the end just added a libe to bbpress’s widgets.php on line 140 as follows :

    <a href="edit” >Amend Profile/Change password

    That did the trick.

    @robin-w

    Moderator

    Can you point me to the newer example, and i’ll code that for snitz so that it looks consistent and has help prompts in it, then I’ll ticket it to you.

    @robin-w

    Moderator

    PS the example.php that downloads with the bbpress plugin doesn’t have a bit to bring the message accross, so initially I had a great forum with no topic content!

    I nicked the following from another converter and it seemed to work

    // Topic content.
    // Note: We join the posts table because topics do not have content.
    $this->field_map[] = array(
    ‘from_tablename’ => ‘FORUM_TOPICS’,
    ‘from_fieldname’ => ‘T_MESSAGE’,
    ‘join_tablename’ => ‘thread’,
    ‘join_type’ => ‘INNER’,
    ‘join_expression’ => ‘USING (threadid) WHERE post.parentid = 0′,
    ‘to_type’ => ‘topic’,
    ‘to_fieldname’ => ‘post_content’,
    ‘callback_method’ => ‘callback_html’

    @robin-w

    Moderator

    Stephen,

    Thanks, that got me going in the right direction and I have achieved it.

    I’ll try and post the full method for future users – I found your custom stuff useful https://codex.bbpress.org/import-forums/custom-import/

    Working out the mapping and date formats took a bit of effort, but once there the rest is easy !

    Thanks again

    @robin-w

    Moderator

    and it trashed my code, try again without the ‘s

    a href=”” class=”submit user-submit”><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?

    @robin-w

    Moderator

    Sorry I’m a rookie idiot that didn’t include the website

    http://www.gospbc.co.uk

Viewing 16 replies - 14,126 through 14,141 (of 14,141 total)