Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
3 Days to go and I am waaay out of scope. :)
  • Posted: 30.11.2004, 20:10
     
    dolbex
    rank:
    Freshman 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!
  • Posted: 01.12.2004, 01:36
     
    Simon
    rank:
    Steering Committee 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
  • Posted: 01.12.2004, 15:12
     
    Chestnut
    rank:
    Steering Committee 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
  • Posted: 02.12.2004, 01:19
     
    dolbex
    rank:
    Freshman Freshman
    registered:
     May 2004
    Status:
    offline
    last visit:
    14.06.05
    Posts:
    48
    Cha cha cha!!!

    Thanks Chestnut!
  • Posted: 04.12.2004, 04:02
     
    dolbex
    rank:
    Freshman Freshman
    registered:
     May 2004
    Status:
    offline
    last visit:
    14.06.05
    Posts:
    48
    If I insert your code Chestnut I get a parse error. Whats up with that?
  • Posted: 04.12.2004, 05:23
     
    Chestnut
    rank:
    Steering Committee 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
  • Posted: 08.12.2004, 22:12
     
    dolbex
    rank:
    Freshman Freshman
    registered:
     May 2004
    Status:
    offline
    last visit:
    14.06.05
    Posts:
    48
    totally worked.
  • Posted: 07.01.2005, 07:58
     
    remmingtonshowdown
    rank:
    Helper 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...

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula