- Moderated by:
- Support
-
- rank:
-
Freshman
- registered:
- May 2004
- Status:
- offline
- last visit:
- 14.06.05
- Posts:
- 48
Hehe. Well, as always, I have a deadline in 3 days and I still want to add features that I have NO CLUE how to add. Maybe someone can help.
Basically I want to check if someone is logged in and display different image on a part of my template if they are. Ok, so I know you use this method to check if the user is logged in:
pnUserLoggedIn( )
I guess my question is: What is the syntax to plug into that pnUser.php and have access to all of those functions. Also, I may have to use Smarty syntax because this code would be located in a "wrapper/zone".
Thanks in advance! -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 28.11.08
- Posts:
- 13417
<--[pnuserloggedin]-->
do some stuff....
I think - check the Xanthia plugins directory for a little more info.
--
Regards,
Simon
itbegins.co.uk - Zikula Consulting
Please read the Support Guide -
- rank:
-
Steering Committee
- registered:
- August 2002
- Status:
- offline
- last visit:
- 03.03.08
- Posts:
- 1221
The smart(y) way:
Code
<!--[pnusergetvar name="uid" assign="uid"]-->
<!--[if $uid != 0 and != ""]-->
<!-- SHOW ME YOUR POWA -->
<!--[else]-->
<!-- REGISTER OR die -->
<!--[/if]-->
What this does is get the uid... if uid = 0 then we assumed that the user is not logged. if the uid is not 0 and not ""... then we can assume he is logged.
:wink:
--
Chestnut !
Support via Private message won't be answered...
http://dev.pnconcept.com
http://www.postnuke-france.org -
- rank:
-
Steering Committee
- registered:
- August 2002
- Status:
- offline
- last visit:
- 03.03.08
- Posts:
- 1221
YEAAAAAAAAAA YEAAAAAAAAAAAAAAAAAA..... ok... ok......
....
I was tired.......
Here is the fix :
Code
<!--[pnusergetvar name="uid" assign="uid"]-->
<!--[if $uid != 0 and $uid != ""]-->
<!-- SHOW ME YOUR POWA -->
<!--[else]-->
<!-- REGISTER OR die -->
<!--[/if]-->
:wink:
--
Chestnut !
Support via Private message won't be answered...
http://dev.pnconcept.com
http://www.postnuke-france.org -
- rank:
-
Helper
- registered:
- May 2004
- Status:
- offline
- last visit:
- 06.11.08
- Posts:
- 283
Does anyone know if this will work in a Pagesetter block list??? It works in a full article template but as of yet have not been able to manipulate it into working in a list...
