inherit
142718
0
Apr 1, 2024 15:00:33 GMT -8
Tiffamu
187
July 2009
tiffamu
|
Post by Tiffamu on Jun 23, 2018 18:26:24 GMT -8
dragonridersofberk.boards.net/So my site is a roleplay site and it's one account per character, so members will be switching accounts a lot. I was wondering if there was a code to maybe show their avatar and display name with "logged in as X" maybe with a logout link (or if there's a way to switch accounts other than the bottom right, then a link to switch accounts). And then for guests it just has the standard "welcome guest, please login or register". I don't really even know where to start with coding this (I'm such a noob) and don't even know if it's possible.
|
|
Nori
Junior Member
Posts: 481
inherit
182806
0
Apr 15, 2024 17:59:08 GMT -8
Nori
481
September 2012
nori
|
Post by Nori on Jun 24, 2018 7:49:53 GMT -8
That is certainly possible doing something like this in the Layout Templates:
It's just a matter of where you want this to appear on your forum. I think by default it shoes by the 'Login/Register' area but I see you have custom coding that has removed that (at least for guests).
If you want it back in front of the 'Login/Register' section of the nav bar you could go to Layout Templates -> Forum Wrapper, and find the line <p id="welcome">, then add in the text you want -- following the guideline of the code above.
|
|
inherit
142718
0
Apr 1, 2024 15:00:33 GMT -8
Tiffamu
187
July 2009
tiffamu
|
Post by Tiffamu on Jun 24, 2018 14:39:14 GMT -8
Thank you. I'm wanting to put it kind of floating on the left with a picture of their avatar next to it, but I have no idea how I'd do that :/ similar to this: I tried messing around trying to make something similar, but it wouldn't work for me so I don't know what I'm missing.
|
|
Kami
Forum Cat
Posts: 40,020
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,020
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jun 24, 2018 14:48:11 GMT -8
To get you started, you'd need to do something like this in your forum wrapper: {if $[current_user.is_guest]} Welcome Guest! Please $[login.link] or $[register.link]. <img src="link%20to%20guest%20avatar%20here" class="fr-fic fr-dii"> {elsif $[current_user.is_member]} Welcome back $[current_user.name]! $[current_user.avatar] {/if}^ this is just an example, so you don't have to do it exactly like this. To get everything to float to the left, you'd have to style your CSS with a left float. Unfortunately, though this is as far as I can assist because each situation is different and without knowing where you want to put this, and considering the fact your forum theme is very customised, it would be best if you reached out to the theme creator (margie on Adoxography 2.0) to see how best to put this all together.
|
|