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

Dizkus

Bottom
module templates help
  • Posted: 05.06.2007, 18:32
     
    Meta-Morphis
    rank:
    Freshman Freshman
    registered:
     June 2007
    Status:
    offline
    last visit:
    05.06.07
    Posts:
    14
    Hi, Im wondering if any of you can help me...

    I need to make a module template that applies to user.php.

    What do I need to name it to work? I have tried user.htm and it doesnt work...

    Full details about what Im doing, what Ive done etc can be found here:

    http://community.pos…ewtopic&topic=52600

    I need to over-ride the security thats in place for if a user has lost password or needs to register... currently, all logged-out users get a logon. If you click forgot password or register, you get taken back to the logon page...

    Thanks
  • Posted: 05.06.2007, 18:45
     
    Meta-Morphis
    rank:
    Freshman Freshman
    registered:
     June 2007
    Status:
    offline
    last visit:
    05.06.07
    Posts:
    14
    its ok, its sorted now!
  • Posted: 05.06.2007, 19:16
     
    Kenshino
    rank:
    Professional Professional
    registered:
     September 2004
    Status:
    offline
    last visit:
    31.07.08
    Posts:
    935
    Maybe you'll like to post the solution because it might help other users later on!
  • Posted: 05.06.2007, 19:28
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    offline
    last visit:
    21.11.08
    Posts:
    2975
    The solution to this particular issue the user.htm was not solved, but the workaround is included in the link in the original post here.

    --
    David Pahl
    Zikula Support Team
  • Posted: 05.06.2007, 19:35
     
    Meta-Morphis
    rank:
    Freshman Freshman
    registered:
     June 2007
    Status:
    offline
    last visit:
    05.06.07
    Posts:
    14
    Full details can be found here:
    http://community.pos…ewtopic&topic=52609

    In a nutshell, I used the following code in home.htm and master.htm (the code not my own, credit for this code goes to AmmoDump)

    Code

    <head>
    // your head stuff
    </head>
    <!--[if pnuserloggedin($loggedin) eq 1]-->
    // the rest of your theme code<!--[else]-->
    <div>
    // not logged in code
    <!--[userlogin]-->
    <!--[/if]-->


    and created user.htm which was a clone of home.htm, except the not logged in code was replaced with (again, courtesy of AmmoDump):

    Code

    <!--[else]-->
    <!--[$maincontent]-->


    however, this did not work... if a user clicked the lost password link or the register link, they were still treated as an unregistered user on every other page, and prompted with a logon page...

    the workaround, courtesy of Igor (videokid) was to replace the original code of:

    Code

    </head>
    <!--[if pnuserloggedin($loggedin) eq 1]-->


    with

    Code

    <!--[pnmodgetname assign=currentmod]-->
    <!--[if $currentmod == "User" || $currentmod == "NewUser" || $currentmod == "LostPassword"]-->  
    <!--[$maincontent]-->// should be the login etc.. screen I guess
    <!--[elseif pnuserloggedin($loggedin) eq 1]-->


    and it worked a treat. :)

    Igor did suggest that maybe user.htm should have been User.htm (capital U), however, I did not try this so I cannot say if it does or doesnt work.

    Again, the credits for this go to AmmoDump and videokid... my only contribution was encountering this problem, lol!

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula