1

Topic: How To: add "You are Logged In As" username123" above the...

How To: add "You are Logged In As "username123" in the header template or above the "My Profile" tab on the left user menu--
I am using the SocialType template.


Thanks All.

2

Re: How To: add "You are Logged In As" username123" above the...

Edit 'header.tpl' template file. To display username use {session.username} tag.

Developer

3

Re: How To: add "You are Logged In As" username123" above the...

<!-- IF loggedin == "1" -->
<a href="{virtual_path}account/home/">Welcome {session.username}</a>
<!-- ENDIF -->

4

Re: How To: add "You are Logged In As" username123" above the...

WOW!

You guys are awesome!!!

I had to locate and relcoate a few times to get the exact position, but it looks great now.



Just in case someone else wishes to use this for their SocialType - left hand "logged in" member profile menu.
Here it is.

<div id="usernav">
    <ul>
        <li class="first"><a href="{virtual_path}account/home/">Logged In As: {session.username}</a></li>
        <li>{anchor:url1="account/home/",url2="index.php?m=account_home",name="core|usermenu_profile"}</li>
        ....
    </ul>
</div>

5

Re: How To: add "You are Logged In As" username123" above the...

How would you put an "else" in there, to welcome them as a guest if they are not logged in, like on this site.

Thanks.

6

Re: How To: add "You are Logged In As" username123" above the...

<!-- IF loggedin == "1" -->
<a href="{virtual_path}account/home/">Welcome {session.username}</a>
<!-- ELSE -->
<a href="{virtual_path}account/login/">Welcome guest!</a>
<!-- ENDIF -->

www.vldMagic.com - first choice customizations store and help desk

7

Re: How To: add "You are Logged In As" username123" above the...

Thanks smile

8

Re: How To: add "You are Logged In As" username123" above the...

Will this work in 2.4.1? And where exactly in header.tpl is the best place to put it? (Thanks smile)

9

Re: How To: add "You are Logged In As" username123" above the...

radioact wrote:

<!-- IF loggedin == "1" -->
<a href="{virtual_path}account/home/">Welcome {session.username}</a>
<!-- ELSE -->
<a href="{virtual_path}account/login/">Welcome guest!</a>
<!-- ENDIF -->

I used this code to place a "welcome username" in my main navigation bar. It shows up right next to the hotornot link. I want to move it to the far right so that it is directly over the "log-out" link in the user navigation bar. What code do I use in site.css to move it to the far right?

Thanks

10

Re: How To: add "You are Logged In As" username123" above the...

Try this:

<li style="float:right;"><a href="{virtual_path}account/home/" style="text-decoration:none;"> Hello {session.username}</a></li>

11

Re: How To: add "You are Logged In As" username123" above the...

Thanks for the quick response. I can't get it to work - probably because I'm unsure about the placement of the code you provided. What code should it follow?

Thanks again and merry Xmas!

12

Re: How To: add "You are Logged In As" username123" above the...

db3204 wrote:

Try this:

<li style="float:right;"><a href="{virtual_path}account/home/" style="text-decoration:none;"> Hello {session.username}</a></li>

I'm probably using a different version of vldPersonals than you are but try the following (please backup before making changes).

In your header.tpl find:

<!-- IF loggedin == "0" -->
                        <li>{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register",pre="<span>",pro="</span>"}</li>
                    <!-- ENDIF -->

First thing I would do, is move the above code so it displays your Sign Up link as the last selection in the naviagation menu. Right now it is the 3rd selection.

Look for:

<!-- IF session.can_access_cp -->
                        <li>{anchor:host=virtual_cp_path,url1="",url2="",name="core|usermenu_cp",pre="<span>",pro="</span>"}</li>
                    <!-- ENDIF -->

and place the above code after it.

After you moved the above link to the right position, I would change the code to something like:

<!-- IF loggedin == "0" -->
                        <li>{anchor:url1="account/register/",url2="index.php?m=account_register",name="core|menu_register",pre="<span>",pro="</span>"}</li>
                        <!-- ELSE -->
                        <li style="float:right;"><a href="{virtual_path}account/home/" style="text-decoration:none;"> Welcome {session.username}</a></li>
                    <!-- ENDIF -->

That should work.  If it does not work, you may have to ask someone who is using 2.5.5 since I'm still using 2.5.3.

13

Re: How To: add "You are Logged In As" username123" above the...

Thank you for your time. I'll give it a try.

14

Re: How To: add "You are Logged In As" username123" above the...

thanks wink

15

Re: How To: add "You are Logged In As" username123" above the...

Does this work in 2.7 ?

16

Re: How To: add "You are Logged In As" username123" above the...

boentertainment wrote:

Does this work in 2.7 ?

Yes

RadioAct's Site: VLD Magic