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 -->

Submit a ticket - and get fast and professional assistance with your vldPersonals website

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

BVI Captain Only Yacht Charters
My non-VLD site, so that if you really, really do need to contact me, you can.

17

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

good evening
I would like to add another code but for guests (Welcome guest) that can helps me thank you I'm French

18

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

Hello,
who can help me I would add welcome invites! what code? thank you

19

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

Kingteamdunet, go to the site in my signature and contact me. I think I might be able to help you (if I understand correctly what you want)

BVI Captain Only Yacht Charters
My non-VLD site, so that if you really, really do need to contact me, you can.

20

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

Where do you need it ?
in header of your site ?
in members profile ?

21

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

Hello

both

22

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

kingteamdunet wrote:

Hello

both

I had read the forum topics here and think it tell us how to do
so no need for a new tutorial how to do it wink

but it depends of the templates you are using they are all different !
so it is better if you need my help please contact me ...

Last edited by gugu (2013-10-17 17:12:26)

23

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

good evening
anyone can help me thank you

24

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

good evening

I'm looking for the code to welcome calls and once connected the code change to welcome king here thank you