solved How do i add a login box to my index page.

alt=
duke
@musamensa
8 years ago
253 posts
Hi, i would like to add a login box like the one on the followme premium skin to my skin. I am currently using the iskin4 skin and unfortunately the codes are not available for that skin.
i have currently tweeked the css to display the slider text on the right and I would like a login box to be positioned on the left hand side of the index slider.

Thanks
login box.jpg
login box.jpg  •  53KB


updated by @musamensa: 04/20/17 11:33:22AM
michael
@michael
8 years ago
7,772 posts
there are a couple of ways to do it. If that design is part of the Site Builder system, then you can do it with a widget.

Otherwise there is code to do it here:

Docs: "How To add the user login for to any page"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/603/howto-add-the-user-login-form-to-any-page

Docs: Site Builder (table of contents)
https://www.jamroom.net/the-jamroom-network/documentation/site-builder

--edit--
The Follow Me skin has a login box in a similar location, you can use that for a guide.
updated by @michael: 01/06/17 10:31:27AM
alt=
duke
@musamensa
8 years ago
253 posts
i am looking a the follow me skin right now but i dont know which bits of the code to copy and where to place it...
alt=
duke
@musamensa
8 years ago
253 posts
I still cant seem to get it working...
douglas
@douglas
8 years ago
2,797 posts
Did you follow the docs Michael posted?

https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/603/howto-add-the-user-login-form-to-any-page

It is a fairly simple copy and paste type of doc, not sure why it wouldn't work for you?

If you can give us more detailed steps on what your doing, what your expecting to see and what you actually see, we might be able to guide you in the right direction.

Thanks!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
duke
@musamensa
8 years ago
253 posts
@douglas I am taking a new approach i have created a blank template page and i have pasted the code which works fine but I am having difficulties trying to style the new page. I am trying to style the page using the style.css css where i have added new lines of code.

.tpl code
{* /////////// DO NOT REMOVE //////////  *}
{assign var="page_template" value="index"}
{* /////////// DO NOT REMOVE //////////  *}

{jrCore_include template="header2.tpl"} 


   
    <div class="loginbody">
       {jrCore_form_create_session module="jrUser" option="login" assign="token"}
    
    <div class="logincontainer">
    
    <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>
    </div>
    </div>

{jrCore_include template="footer.tpl"}


.css


.logincontainer {
	width: 500px;
	height: 100%;
	text-align:center;
	background-color:#131111 ;
	border-radius: 4px;
	margin: 0 auto;
	margin-top: 150px;

	
}


.loginbody{
	height:100%;
	margin: 0 auto;
	background-color: #FFED00;
	background-repeat: no-repeat;
	background-size: 100% 720px;
	

thanks for your help guys, its really driving me nuts.
myoutput.png
myoutput.png  •  18KB

michael
@michael
8 years ago
7,772 posts
That looks the same as what I'm getting. The structure matches the CSS that you have here. You're wanting help constructing the CSS to match the image you posted? or you have the CSS from the image you posted somewhere?
alt=
duke
@musamensa
8 years ago
253 posts
hi michael, the css I pasted above is from the skin.css file i simply added extra css codes, for some reason the css is also styling the header and footer instead of just the login from div.
thanks
michael
@michael
8 years ago
7,772 posts
The CSS you posted is doing what its supposed to do. It reads "set the width of the login container to 500 px and in the center of the screen. make its background color blackish and have rounded corners, give it a bit of space on the top."

Then the ext bit reads "put this in the center of the page, make its background color yellow and make it 720px wide"

so its doing what its asked to do. What I want to know is do you have CSS that makes the layout you want, maybe from a skin you've purchased somewhere, or from a designer who has done it for you, or other.......

Or are you looking for someone to construct the CSS necessary to reproduce what is on your image.
alt=
duke
@musamensa
8 years ago
253 posts
I can see that the css is doing what I want it to do, my problem is that the heard and footer are not where they are suppose to be. Here is a link to the tutorial i was trying to emulateDesign form login with css
thanks
michael
@michael
8 years ago
7,772 posts
Nice one. Good on you for trying to learn CSS.

The issue here is there is a lot of other info that is making the whole system look like the video is making it look, but you've only copied a portion of that. So the portion you have copied has worked and has some left-over bits that do nothing.

I can see what you're after though.

This will get you closer, then you need to tweak it:
.logincontainer {
    background-color: rgba(29, 30, 12, 0.8);
    border-radius: 4px;
    color: white;
    margin: 50px;
    padding: 37px;
    width: 500px;
}


.loginbody {
    background-color: #FFED00;
    background-size: 100% 720px;
}
alt=
duke
@musamensa
8 years ago
253 posts
hooray i did it, thanks for all the help guys. https://goo.gl/KoEYWa
i was able to get my head around the css and i used the tag and z-index to position the login where i wanted it, i even added the 'desk' class so the login box disappears when viewed from smaller devices . My next challenge is to get it to also disappear when viewed from tablets.
michael
@michael
8 years ago
7,772 posts
Well done.

Maybe this will help with your next step. Open a new thread for each new issue. Marking this one SOLVED.

Docs: "{if jrCore_is_tablet_device()}{/if}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/3256/if-jrcore-is-tablet-device-if
Strumelia
Strumelia
@strumelia
8 years ago
3,603 posts
Nice looking site, Musamensa.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
alt=
duke
@musamensa
8 years ago
253 posts
thanks @strumelia

Tags