I am wondering if anyone has created a code that would allow me to automatically insert members username into a form (as in "messages administration"). I would like to have an individual Welcome message appear when a person logs in or otherwise address them as Guest.
Thanks in advance.
Regards,
Lon
Code to insert username...
-
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
If you want to check if a user is logged in, use the function "pnUserLoggedIn()" in an if statement. See the theme code in:
many F.A.Tweaks">"VersaTheme" Starter…e w/many F.A.Tweaks for an example. In this example, a login form is displayed if they are not logged in and links if they are...
You can echo the person's username and any other user variables in your theme or module's form (first check if they are logged in) by echoing the function "pnUserGetVar('uservariable')"; pnUserGetVar('uname'), in this case...
Check this post (Part II - Personlaizing the User Experience) for some other neat stuff...
Theme Guide: Tips fo…g and starter theme
--
Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods
Cape Cod Travel Info... -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Nov 22, 2003
- Posts: 3
Nate,
Many Thanks! This whole community amazes me in the willingness to share whatever knowledge they have attained. You brilliant techies make my head spin. Very cool! Nate, perhaps you could give me a clue as to why my hrefs are showing the code instead of the links in my "admin comments" on my homepage - http://www.onquick.net
Again, much appreciated.
A 39 Year Old Newbie,
Lon -
- Rank: Senior
- Registered: Sep 22, 2003
- Last visit: Oct 21, 2009
- Posts: 2774
Thanks for the kudos - under your admin->settings, you have to set certain HTML to be "allowed with parameters" so it won't display raw code... Stay away from activating tags such as
- Moderated by:
- Support
