MyBB Community Forums

Full Version: onclick login function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, Im trying to include the onclick login box for mybb forum on my website and was wondering what code I would have to load on my main site in order to get it to work. I know I have to add,

onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true }); return false;"

and then after that I also have to include:

<div class="modal" id="quick_login" style="display: none;">
					<form method="post" action="{$mybb->settings['bburl']}/member.php">
						<input name="action" type="hidden" value="do_login" />
						<input name="url" type="hidden" value="" />
						<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
						<input name="quick_login" type="hidden" value="1" />
						<table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
								<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
								<td class="trow1" width="25%"><strong>{$login_username}</strong></td>
								<td class="trow1"><input name="quick_username" id="quick_login_username" type="text" value="" class="textbox initial_focus" /></td>
								<td class="trow2"><strong>{$lang->password}</strong></td>
								<td class="trow2">
									<input name="quick_password" id="quick_login_password" type="password" value="" class="textbox" /> <a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password">{$lang->lost_password}</a>
								<td class="trow1">&nbsp;</td>
								<td class="trow1 remember_me">
									<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
									<label for="quick_login_remember">{$lang->remember_me}</label>
								<td class="trow2" colspan="2">
									<div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
				<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));

I'm assuming this is everything needed and all I have to do is edit the above piece of code to include all the information missing? Any help would be appreciated! Thanks in advance!
Make sure your website loads the required files if you are not using the forum header.