Author Topic: {username} in temlate files?  (Read 6419 times)

0 Members and 1 Guest are viewing this topic.

Offline ilaslan

  • Newbie
  • *
  • Posts: 44
    • View Profile
{username} in temlate files?
« on: January 24, 2011, 08:19:39 PM »
hello
in pageheader.php
$detailsplsregistermessage "pls register bla bla bla";

....
$site_template->register_vars(array(
...
  
"detailsplsregistermessage" => $detailsplsregistermessage,
....



i am usin in details.html
<center>{detailsplsregistermessage}</center>

but i need  {if userunregisateredorunloged}            

<
center>{detailsplsregistermessage}</center>

{endif 
userunregisateredorunloged}


which basic code is doing this?

TY

Edit : i find

{if user_loggedout
	
<
center>{detailsplsregistermessage}</center> {endif user_loggedout}
« Last Edit: January 24, 2011, 08:51:23 PM by ilaslan »

Offline ilaslan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: {username} in temlate files?
« Reply #1 on: January 24, 2011, 08:37:37 PM »
hello

in detals.html or other html i want to write my registered users. welcome
so

in details.html
{if user_loggedin} <center>welcome {username} . ihope u' are good today. bla bla bla </center> {endif user_loggedin}

what code is {username} ?

TY
edit:
i tryed in details.html

<center> <b>{loggedin_user_namewelcome </b></center>
and unsuccessfull .
« Last Edit: January 24, 2011, 08:49:25 PM by ilaslan »

Rembrandt

  • Guest
Re: {username} in temlate files?
« Reply #2 on: January 24, 2011, 08:57:40 PM »

Offline ilaslan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: {username} in temlate files?
« Reply #3 on: January 24, 2011, 09:36:27 PM »
i will try
but

search in your templates / user_loginform.html:

<form action="{url_login}" method="post">

füge darüber ein: paste it:

{lang_loggedin_msg}

in details.html there isn't
<form action="{url_login}" method="post">


and i need only

{username}





Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: {username} in temlate files?
« Reply #4 on: January 25, 2011, 03:44:11 AM »
In page_header.php add:

  "loggedin_user_name" => format_text($user_info['user_name'], 2),
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline ilaslan

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: {username} in temlate files?
« Reply #5 on: January 25, 2011, 11:43:03 AM »
thnx vano
in details.html

{if user_loggedin}  <center>welcome {user_name} . bla bla bla </center>  {endif user_loggedin}



That is OKey