Getting logged user

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
eusunt
Registered User
Posts: 9
Joined: Wed Jul 02, 2008 2:59 pm

Getting logged user

Post by eusunt » Wed Jul 02, 2008 3:07 pm

Hey dudes,

I've been using phpBB for 4-5 days and until now everything is so cool. At the moment I'm integratind my website with the phpBB, so it will look super cool ( I guess :) ), but I already have a problem :D

I "added" the website style in the forum using the overall_header.tpl, found some code at overall_footer.tpl for not logged:

Code: Select all

<!-- BEGIN switch_user_logged_out -->
...
<!-- END switch_user_logged_out -->
Okey, this is for non-logged people.. how do I get the logged? I tried with

Code: Select all

<!-- BEGIN switch_user_logged_in -->
.. {USERNAME}
<!-- END switch_user_logged_in -->
but it didn't work. Can someone tell me how is the shortcode of it, and how are the variables ({USERNAME} etc)? Or maybe give me a link to a tutorial, haven't found much in the Internet :)

</eusunt>

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50746
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Getting logged user

Post by Brf » Wed Jul 02, 2008 3:16 pm

That switch should work, but there is no {USERNAME} tag. You would have to define that yourself in page_header.php.
Look for:

Code: Select all

	'L_USERNAME' => $lang['Username'],
and after that put in

Code: Select all

	'USERNAME' => $userdata['username'],

eusunt
Registered User
Posts: 9
Joined: Wed Jul 02, 2008 2:59 pm

Re: Getting logged user

Post by eusunt » Wed Jul 02, 2008 3:18 pm

Brf wrote:That switch should work, but there is no {USERNAME} tag. You would have to define that yourself in page_header.php.
Look for:

Code: Select all

	'L_USERNAME' => $lang['Username'],
and after that put in

Code: Select all

	'USERNAME' => $userdata['username'],
Well I didn't know how is the username tag anyway :) Thank you for your fast help dude, I really appreciate it.

</eusunt>

eusunt
Registered User
Posts: 9
Joined: Wed Jul 02, 2008 2:59 pm

Re: Getting logged user

Post by eusunt » Wed Jul 02, 2008 7:48 pm

Since the code I need help is with this thread too I wanna ask you guys, how to get the avatar. Yes, I did:

Code: Select all

	'AVATAR' => $userdata['user_avatar'],
but as you know there's user_avatar_type where 1 = webpage, 2 = uploaded. How to do it that way, so
AVATAR should return the real picture, not http://image.com/image.png or 243534863c664ec9f5.gif for example?

eusunt
Registered User
Posts: 9
Joined: Wed Jul 02, 2008 2:59 pm

Re: Getting logged user

Post by eusunt » Thu Jul 03, 2008 12:44 pm

Okey guys, I've managed this alone =)

Anyway if someone needs it too here's the code:

Code: Select all

	'AVATAR' => (($userdata['user_avatar_type'] == 1) ? "<img src=\"images/avatars/$userdata[user_avatar]\" />" : "<img src=\"$userdata[user_avatar]\" />"),

Post Reply

Return to “[2.0.x] MOD Writers Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests

cron