Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • vivekb Friend
    #122356

    Posting the hack I just created to display “Hi, <username>” instead of “Login/Register” on the header. That way my users & I can quickly tell if we’re logged in when we first visit the site.

    pull up index.php, replace:

    <span id=”ja-hp-switch”>Login/Register</span>

    with this:

    <span id=”ja-hp-switch”>
    <?php
    $greeting = $params->def( ‘greeting’, 1 );
    $name = $my->username;
    if ( $name ) {
    $name = $my->username;
    echo _HI;
    echo $name;
    }
    else { echo ‘Login/Register’; }
    ?>
    </span>

    You’ll note that I opted to hardcode username instead of “name”, as I use username on the site.

    Ok, it’s not really rocket science-level tips, but i’m going on 4 weeks of Joomla experience, so i’m content with being able to figure *something* out.

    Michael Casha Friend
    #228186

    <em>@vivekb 25895 wrote:</em><blockquote>Posting the hack I just created to display “Hi, <username>” instead of “Login/Register” on the header. That way my users & I can quickly tell if we’re logged in when we first visit the site.

    pull up index.php, replace:

    with this:

    You’ll note that I opted to hardcode username instead of “name”, as I use username on the site.

    Ok, it’s not really rocket science-level tips, but i’m going on 4 weeks of Joomla experience, so i’m content with being able to figure *something* out.</blockquote>
    Well done, that’s a great hack!

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

This topic contains 2 replies, has 2 voices, and was last updated by  Michael Casha 17 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum