ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


error occurs when add the second registration page


  • 2009-03-09 10:36:53

    error occurs when add the second registration page

    I want to add another registration page for the SecondLife's user, the process is:
    Step 1:
    I added the following code in \atutor\themes\default\login.tmpl.php:
    <div class="column">
    <form action="sluserveri.php" method="get">
    <div class="input-form" style="background-color:white;">
    <fieldset class="group_form"><legend class="group_form"><?php echo _AT('old_sl_user') ;?></legend>
    <p><?php echo _AT('sl_user_verify_text'); ?></p>

    <?php if (defined('AT_EMAIL_CONFIRMATION') && AT_EMAIL_CONFIRMATION): ?>
    <p><?php echo _AT('confirm_account_text'); ?></p>
    <?php endif; ?>
    <div style="width: 20%;margin-left:auto; margin-right:auto;margin-bottom:.6em;padding:.5em;">
    <br /><br /><br />
    <input type="submit" name="sluserverify" value="<?php echo _AT('sl_user_verify'); ?>" class="button" />
    </div>
    </fieldset>
    </div>
    </form>

    </div>

    Step 2:
    copy the registration.php and rename to sluserveri.php in the \atutor directory ;

    Step 3:
    copy the registration.tmpl.php and rename to sluserveri.tmpl.php in the \atutor\themes\default directory

    But when I click the second registration button I added, I got the following error:
    Page cannot be found.

    You can check this in my website:
    http://21vcity.com/school/login.php

    How can I add another registration page correctly?
    Please help me, Greg.

  • 2009-03-09 10:45:34

    Re: error occurs when add the second registration page

    and I have modified the last line of sluserveri.php:
    $savant->display('sluserveri.tmpl.php');

  • 2009-03-09 10:47:49

    Re: error occurs when add the second registration page

    Hello,

    You may want to take a look at include/lib/menu_pages.php line 178~181 and add your codes there.

  • 2009-03-09 11:18:24

    Re: error occurs when add the second registration page

    OK, Harris,

    I added the following code after line 181:
    $_pages['sluserveri.php']['title_var'] = 'register';
    $_pages['sluserveri.php']['parent'] = AT_NAV_PUBLIC;
    $_pages['sluserveri.php']['children'] = isset($_pages['browse.php']['children']) ? $_pages['browse.php']['children'] : array();
    $_pages['sluserveri.php']['guide'] = 'general/?p=sluserveri.php';

    Although I need do more adjusting, but it's working properly, thank you very much.

  • 2009-03-09 11:25:11

    Re: error occurs when add the second registration page

    you're welcome :)

  • 2009-03-09 11:35:50

    Re: error occurs when add the second registration page

    And one more question:
    How can I add a "Verification For SL User" Menu tab beside the "Register" tab?

    Or let "Register" menu tab link to login.php, not registration.php directly?

  • 2009-03-09 11:51:59

    Re: error occurs when add the second registration page

    I know how to do that,

    add a line after line 24:
    $veri_tab = "sluserveri.php";

    and then, modify line 27:
    $_pages[AT_NAV_PUBLIC] = array_merge(array('login.php',$reg_tab,$veri_tab,'browse.php'), (isset($_pages[AT_NAV_PUBLIC]) ? $_pages[AT_NAV_PUBLIC] : array()));

    Done! Thanks a lot!