HowTo: add the user login form to any page

  • Code for Login

    Place this code into the template where you want the login form to be displayed.
        {jrCore_form_create_session module="jrUser" option="login" assign="token"}
        <div id="jrUser_login_msg"></div>
        <form id="jrUser_login" name="jrUser_login" action="{$jamroom_url}/user/login_save" method="post" accept-charset="utf-8" enctype="multipart/form-data">
            <input type="hidden" id="jr_html_form_token" name="jr_html_form_token" value="{$token}">
            <input type="hidden" name="user_remember" value="off">
            user login <input type="text" id="user_email_or_name" class="form_text" name="user_email_or_name" value=""><br>
            password <input type="password" id="user_password" class="form_text" name="user_password" value=""><br>
            <img id="form_submit_indicator" src="{$jamroom_url}/skins/jrNova/img/submit.gif" width="24" height="24" alt="working...">
            <input type="button" id="jrUser_login_submit" class="form_button" value="login" tabindex="3" onclick="jrFormSubmit('#jrUser_login','{$token}','ajax');">
        </form>
    
  • If you have the jrOneAll module installed and also want to add that functionality to your custom login page the documentation for that can be found here:

    "jrOneAll"
    https://www.jamroom.net/the-jamroom-network/documentation/modules/284/jroneall
  • A Newer Method: Since this doc was written, a widget to do the same thing has been added to the Site Builder system. So you can just drag-and-drop the widget in using that system. The above method does still work though.
  • Code for signups

    If you require an individual page for signups, use the code below.

    Be sure to change the [b]quota_id[b] value to the number of a quota that has allow signups enabled.
    {jrCore_include template="header.tpl"}
    
    
    {jrCore_form_create_session module="jrUser" option="signup" assign="token"}
    <div id="jrUser_signup_msg"></div>
    <form id="jrUser_signup" name="jrUser_signup" action="{$jamroom_url}/user/signup_save" method="post" accept-charset="utf-8" enctype="multipart/form-data">
        <input type="hidden" id="jr_html_form_token" name="jr_html_form_token" value="{$token}">
        user name <input type="text" id="user_name" class="form_text" name="user_name" value=""><br>
        email <input type="text" id="user_email" class="form_text" name="user_email" value=""><br>
        password <input type="password" id="user_passwd1" class="form_text" name="user_passwd1" value=""><br>
        repeat password <input type="password" id="user_passwd2" class="form_text" name="user_passwd2" value=""><br>
        <input type="hidden" id="quota_id" name="quota_id" value="1">
        <img id="form_submit_indicator" src="{$jamroom_url}/skins/jrNova/img/submit.gif" width="24" height="24" alt="working...">
        <input type="button" id="jrUser_signup_submit" class="form_button" value="signup" tabindex="3" onclick="jrFormSubmit('#jrUser_signup','{$token}','post');">
    </form>
    
    
    {jrCore_include template="footer.tpl"}
    

Share This

Tags