Topic: Username on top page
alverman
avatar
Freshman
Freshman
Posts: 36

Posted:
16.Mar 2008 - 18:05

How can i make visible the username on the top of homepage in themes/modules/home.htm in the current theme?
I tried with pnUserGetVar(uname), but does not work!

Helpme, thank
AmmoDump

Team Member
Team Member
Posts: 3024

Posted:
16.Mar 2008 - 20:20

Code

<!--[user]-->



--
David Pahl
Zikula Support Team
alverman
avatar
Freshman
Freshman
Posts: 36

Posted:
16.Mar 2008 - 21:20

simple :)
Thanks
And if i want control if is registred user or guest ?
Can you showme the simple code? :)

many many thanks



edited by: alverman, Mar 16, 2008 - 04:22 PM
AmmoDump

Team Member
Team Member
Posts: 3024

Posted:
16.Mar 2008 - 22:23

alverman

And if i want control if is registred user or guest ?


How do you mean...


--
David Pahl
Zikula Support Team
alverman
avatar
Freshman
Freshman
Posts: 36

Posted:
16.Mar 2008 - 22:58

I have write this and work.







Now I would like to insert the default message, the one that starts with _ where is "Register".
this:
define('_USERS_REGISTER','Register');

If i write
the output is _USERS_REGISTER and not Register !!

Why ?

Sorry for my bad english ....... i'am italian :)
kaffeeringe.de
avatar
Professional
Professional
Posts: 900

Posted:
16.Mar 2008 - 23:46

Code

<!--[pnml name='_USERS_REGISTER']-->


--
best regards from Kiel, sailing city

Steffen Voss

Member of the PostNuke Steering Committee
Read The Zikulan's Blog
alverman
avatar
Freshman
Freshman
Posts: 36

Posted:
17.Mar 2008 - 04:41

No kaffeeringe.de ..... not work :(
It show "_USERS_REGISTER" and not "Register"


I reply message because the last my message is incomplete :)

I have write this and work.

Code

<!--[if $loggedin eq 1]-->
          <li><a href="<!--[pnmodurl modname=Profile]-->"><!--[user]--></a></li>
      <!--[else]-->
          <li><a href="<!--[pnmodurl modname=Users]-->"><!--[pnml name='_USERS_REGISTER']--></a></li>
      <!--[/if]-->

Now I would like to insert the default message, the one that starts with _ where is "Register".
this:
define('_USERS_REGISTER','Register');

If i write
the output is _USERS_REGISTER and not Register !!

Why ?

Sorry for my bad english ....... i'am italian
AmmoDump

Team Member
Team Member
Posts: 3024

Posted:
17.Mar 2008 - 05:50

Well, you can always add a new language define as a theme level define, instead of trying to sort from where the define is being called.

If I create theme level defines, I make them with add a theme marker

_THEME_USERS_REG

You can all look at this plugin

Code

<!--[userwelcome]-->


--
David Pahl
Zikula Support Team