Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile edit URL


  • chandersbs
    Member

    @chandersbs

    I want to add an “edit” button right next to the “log out” button, but i’m not sure what calls this the page. I checked the logged-in.php and found this:

    <?php printf(__(‘Welcome, %1$s’), bb_get_profile_link(bb_get_current_user_info( ‘name’ )));?>

    That generates “Welcome, username”

    What code generates the “edit” button?

    I checked the profile.php and I found that this code outputs an EDIT button:

    <?php if (bb_current_user_can( ‘edit_user’, $user->ID )) : ?>

    <?php printf(__(‘You may edit this information.’), esc_attr( get_profile_tab_link( $user_id, ‘edit’ ) ) ); ?>

    <?php endif; ?>

    The downpart of this code is, the output is only visible when you actually are on the profile page. I need something like this which is visible no matter which you page you are.

    Ideas?

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

  • gerikg
    Member

    @gerikg

    put it in the header


    chandersbs
    Member

    @chandersbs

    You mean to make it show on every page?

    This is the code located in logged-in.php that’s being called:

    <p id=”inloggen”>

    • <?php printf(__(‘Fawaka, %1$s’), bb_get_profile_link(bb_get_current_user_info( ‘name’ )));?>
    • <?php bb_admin_link( ‘before= ‘ );?>
    • <?php bb_logout_link(); ?>
    • </p>

    This is what I have in my header.php

    <div id=”inloggen”>

    <?php if ( !in_array( bb_get_location(), array( ‘login-page’, ‘register-page’ ) ) ) login_form(); ?>

    <?php if ( bb_is_profile() ) ; ?>

    </div>

    However, if you are on the frontpage (/index.php) or any other page, apart from profile.php

    you don’t see the “edit” link.

    Got?

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

You must be logged in to reply to this topic.