1
khuhner
X_UNAME?
  • 2006/8/5 0:03

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


I noticed in the System->Blocks area in a block you can use {X_SITEURL} and it is replaced by the sites URL at runtime.

I am looking for the user name and found X_UNAME in one of the email templates. I tryed using X_UNAME in my custom block and it doesnt seem to work.

Any suggestions on this or any other variable that I can use in a custom block to get the user name?

Thanks,
Kurt

2
snow77
Re: X_UNAME?
  • 2006/8/5 0:30

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


It seems smarty tags don't work on custom blocks but you can apply them directly to the theme like this:

<{$xoops_uname}>

In some themes I have seen this:
<{if $xoops_isuser}> Hello <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>&nbsp;&nbsp;&nbsp;<a href="<{$xoops_url}>/user.php">your 
                  account 
</a>&nbsp; <{else}> <a href="<{$xoops_url}>/register.php">Register 
                  now
</aon mysite.com! <{/if}> <span class="right"> <{if $xoops_isuser}> 
                  <
a href="<{$xoops_url}>/user.php?op=logout"></a> <{else}> &nbsp;&nbsp;&nbsp;<a href="<{$xoops_url}>/user.php">Login</a
                  <{/if}> </
span>
www.polymorphee.com
www.xoopsdesign.com

3
khuhner
Re: X_UNAME?
  • 2006/8/5 1:52

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Thanks snow77...

I knew these would work in templates, unfortunately, I'm looking for the username in a block.


Thanks again...

Kurt

4
snow77
Re: X_UNAME?
  • 2006/8/5 14:13

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I just read this post today by dave_uk, you can make it php code instead - that I why I think it can render ok in a custom block... you can read it HERE
www.polymorphee.com
www.xoopsdesign.com

Login

Who's Online

229 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits