Welcome, Guest. Please Login or Register.
November 29, 2024, 04:38:10 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Calling up username in the template « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Calling up username in the template  (Read 408 times)
bri
Jr. Member
**
Posts: 59


I eat llama!

Calling up username in the template
« on: May 24, 2003, 05:02:34 AM »
Reply with quote

what would I put in the <> to call up just the username in the template? ;) And for future reference, how did you know that?

Bri
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Calling up username in the template
« Reply #1 on: May 24, 2003, 05:07:45 AM »
Reply with quote

<?php global $username; echo $username;?>

I'm a developer :P.

-[Unknown]
Logged
bri
Jr. Member
**
Posts: 59


I eat llama!

Re:Calling up username in the template
« Reply #2 on: May 24, 2003, 05:21:17 AM »
Reply with quote

you rawk! How about the name, i.e. Name:
This is the displayed name that people will see.

;)
Thnak again!
Bri
Logged
bri
Jr. Member
**
Posts: 59


I eat llama!

Re:Calling up username in the template
« Reply #3 on: May 24, 2003, 05:22:40 AM »
Reply with quote

also, when the teplate refers to things like <yabb uname> what file is it refering to?

Bri
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Calling up username in the template
« Reply #4 on: May 24, 2003, 05:50:09 AM »
Reply with quote

template.php.  But that will say "Hey, Name, you have..."

It finds these in Subs.php. ( as yyuname() or variables $yyuname, etc.)

For the realName...
<?php global $realname; echo $realname;?>

-[Unknown]
Logged
bri
Jr. Member
**
Posts: 59


I eat llama!

Re:Calling up username in the template
« Reply #5 on: May 24, 2003, 07:21:57 PM »
Reply with quote

thanks so much! ;)

Bri
Logged
Overlord
Jr. Member
**
Posts: 54


YaBB, I am your llama!

WWW
Re:Calling up username in the template
« Reply #6 on: May 24, 2003, 10:57:46 PM »
Reply with quote

It works if you just put <?php echo "$username"; ?> also. Why did you put the global variable thing?
Logged

-=Overlord=-
Only the dead have seen the end of war (C) Plato
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Calling up username in the template
« Reply #7 on: May 24, 2003, 11:51:24 PM »
Reply with quote

Quote from: Overlord on May 24, 2003, 10:57:46 PM
It works if you just put <?php echo "$username"; ?> also. Why did you put the global variable thing?

Because I was too lazy to check on whether template_header() global'd it.

Plus, if you use it after <yabb main> it will not work without the global.

-[Unknown]
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Calling up username in the template « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.052 seconds with 21 queries.