Modifying the Login form

Elise
Elise
@elise
9 years ago
249 posts
I know I saw this somewhere but search for "login form" or "sign up form" does not provide what I am looking for...

I need to modify the Login form to provide extra instructions to my confused members :)
How do I access that one? I know there's a simple link but i cant find!
updated by @elise: 12/10/16 10:55:59PM
michael
@michael
9 years ago
7,799 posts
What you could do is create a page with Site Builder and use the 'Login and Signup' widget. Add a login form to the page in the right column and as much text/instructions as you like in the left.

There are some instructions on howto in this doc:

Docs: "Make the site visible to members only : Create the Login box "
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/4357/howto-make-the-site-visible-to-members-only#create-the-login-signup-box

And if you wanted to add extra Form Fields for the members to enter when they sign up, you're probably thinking of the Form Designer.

Docs: "Using the Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1275/using-the-form-designer
Elise
Elise
@elise
9 years ago
249 posts
I thought there was a way to edit the login form. With a special URL.

1) if I make a Site Builder page linked to the top menu, won't that conflict with the hard coded login form? Meaning both will show when you are logged out? This conflict only occurs on Logged out items because you can't delete them from Site Builder (you can't see them).

2) If i use site builder on my index page, I will wipe out my Ningja skin. So I don't think that works.
updated by @elise: 09/11/16 06:32:50PM
michael
@michael
9 years ago
7,799 posts
The suggestion was not to put the login form on your home page, but rather make a login page setup however you want to set it up.

Currently the login page is here:
http://empathcommunityeliselebeaucom.jamroomhosting.com/user/login

on the /user/login url. With Site Builder you can add a new url anywhere and either add it to the menu, or don't.

By visiting a url that doesnt exist, say:
http://empathcommunityeliselebeaucom.jamroomhosting.com/login

You can create a NEW page there with site builder. You can add the login widget to the page and that will replicate the setup that exists on '/user/login' now, then add extra bits to the page via the site builder system.

Is what I was thinking. Programatically you could alter the /user/form page with events and listeners, but Im pretty sure thats not the question.

#2 Yes if you wanted to turn Site Builder on on your index page, the current content of the index page would be hidden, so you'd have to recreate it. We've heard the good suggestion about making that stuff already exist as Site Builder content and have it on our TODO list.
Elise
Elise
@elise
9 years ago
249 posts
I'm sorry I didn't explain that well.

If I make a Site Builder page with URL login and add the login form, it looks like the attached screenshot when logged out (duplicate Login menu).

Site Builder does not allow me to *delete* the hard coded Create Account and Login menu/pages because it's hard coded somewhere (although I have been unable to find that template).

How do we solve that?
updated by @elise: 09/11/16 07:15:33PM
michael
@michael
9 years ago
7,799 posts
Another way to do it would be to alter the header.tpl file and add a URL specific div to the page
ACP -> SKINS -> NINGJA -> TEMPLATES -> header.tpl -> MODIFY

At the bottom of that file:
        {if $_post._uri == '/user/login'}
        <div>
        THIS IS AN EXTRA BIT added to just the login page
        </div>
        {/if}

Would add a block of code that just showed on the /user/login page.

Docs: "Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor
michael
@michael
9 years ago
7,799 posts
The extra item in the menu issue. Goal: remove the "Login" link that points to /user/login from the menu OR change it to point to our new page.

How we do that depends on what system is generating our menu. If its the Site Builder menu system, then open the MENU EDITOR and change the destination URL from there.

If its the default system for the skin, then change it in the header_menu_desktop.tpl file
ACP -> SKINS -> NINGJA -> TEMPLATES -> header_menu_desktop.tpl -> MODIFY

The line you're after is line 122 which reads:
<li><a href="{$jamroom_url}/{$uurl}/login">{jrCore_lang skin=$_conf.jrCore_active_skin id="5" default="login"}</a></li>

Adjust that to point to just the login url, the text can stay the same:
<li><a href="{$jamroom_url}/login">{jrCore_lang skin=$_conf.jrCore_active_skin id="5" default="login"}</a></li>
Elise
Elise
@elise
9 years ago
249 posts
michael:
If its the Site Builder menu system, then open the MENU EDITOR and change the destination URL from there.

I think there's a confusion here (most likely on my part). I appreciate your patience. You're a saint!

As far as I can see, I cannot change the LOGGED OUT menu in Site Builder (Create Account + Login).
It does not show up in the list of editable items. So I cannot change the url (which is what I would LOVE to do). And If I log out (to see those menu items), then I cannot edit them since, well, I'm logged out.


Screenshot attached.
Elise
Elise
@elise
9 years ago
249 posts
I think editing the template is the only way to edit these menu items (just for posterity, if someone else is trying to do this). So I'll go that route.

Thanks for posting the location in the template.
michael
@michael
9 years ago
7,799 posts
Yep, thats it. comment out the login line, 122 and if you're going to build you're own signup page too, then comment out that too.

The communication issues in this thread probably arose because there are many ways to set things up and i wasn't sure how yours was set up so my instructions weren't specific enough. I've got it now.

In ACP -> SKINS -> NINGJA -> TEMPLATES -> header_menu_desktop.tpl, down near line 117 you will see this section:
            {if !jrUser_is_logged_in()}
                {jrCore_module_url module="jrUser" assign="uurl"}
                {if $_conf.jrCore_maintenance_mode != 'on' && $_conf.jrUser_signup_on == 'on'}
                    <li><a id="user-create-account" href="{$jamroom_url}/{$uurl}/signup">{jrCore_lang skin=$_conf.jrCore_active_skin id="4" default="create account"}</a></li>
                {/if}
                <li><a href="{$jamroom_url}/{$uurl}/login">{jrCore_lang skin=$_conf.jrCore_active_skin id="5" default="login"}</a></li>
            {/if}

That is the menu block that is showing to users who are not logged in. We can either delete that section or comment it out. (Term: "comment it out" means to leave it showing in the code, but not have that section actually run. Programmers often leave comments in code to let others know what they are thinking. I know you know this elise, but others might not.)

The comment format in smarty templates is to wrap the section in {* this is a comment *}

So if we want to comment out the login link, it becomes:
            {if !jrUser_is_logged_in()}
                {jrCore_module_url module="jrUser" assign="uurl"}
                {if $_conf.jrCore_maintenance_mode != 'on' && $_conf.jrUser_signup_on == 'on'}
                    <li><a id="user-create-account" href="{$jamroom_url}/{$uurl}/signup">{jrCore_lang skin=$_conf.jrCore_active_skin id="4" default="create account"}</a></li>
                {/if}
                {* <li><a href="{$jamroom_url}/{$uurl}/login">{jrCore_lang skin=$_conf.jrCore_active_skin id="5" default="login"}</a></li> *}
            {/if}
michael
@michael
9 years ago
7,799 posts
FYI: comments in the template editor show up in yellow so they're easy to spot.
screenshot_comments.png


updated by @michael: 09/11/16 07:46:45PM
Elise
Elise
@elise
9 years ago
249 posts
Yeah, I can edit the template (now that I know where).
I was trying to do it with Site Builder which is not possible.

Btw, this is the comment that I was looking for (at the very bottom, the comment section).
https://www.jamroom.net/the-jamroom-network/documentation/modules/945/users

Quote:
You can edit the SIGNUP form by going to "yoursite/user/signup", and look for the "form designer" tab.


I thought there was a similar URL for the login form.
There isn't.

And they loved happily ever after...
Strumelia
Strumelia
@strumelia
9 years ago
3,605 posts
And i learned a thing or two about 'commenting out' code here. :)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

Tags