Solved: 2 Years, 1 Week ago [How To?] Login Change ?
#1
Solved: 2 Years, 1 Week ago
I would like to do this at mybb, is it possible? for mybb header ??

[Image: BLmKeDG.png]
Reply
#2
Solved: 2 Years, 1 Week ago
Use this piece of code to put it into your Header Template "header_welcomeblock_guest":

<div>
{$lang->welcome_guest}
<form method="post" action="{$mybb->settings['bburl']}/member.php">
	<input type="text" class="textbox" name="username" value="" placeholder="{$lang->username}" />
	<input type="password" class="textbox" name="password" value="" placeholder="{$lang->password}" />
	<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label>
	<input type="submit" class="button" name="loginsubmit" value="{$lang->login}" />
	<input type="hidden" name="remember" value="yes" />
	<input type="hidden" name="action" value="do_login" />
	<input type="hidden" name="url" value="" />
	<input type="hidden" name="quick_login" value="1" />
	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
</form>
<a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>
</div>

Then style the input fields and buttons with CSS or defined classes.

[ExiTuS]
New Forum / MyBB 1.8.26 + innovative full-responsive Theme
Live-Escape-Game-Forum
Reply
#3
Solved: 2 Years, 1 Week ago
(2019-11-28, 12:14 PM)[ExiTuS] Wrote: Use this piece of code to put it into your Header Template "header_welcomeblock_guest":

<div>
{$lang->welcome_guest}
<form method="post" action="{$mybb->settings['bburl']}/member.php">
	<input type="text" class="textbox" name="username" value="" placeholder="{$lang->username}" />
	<input type="password" class="textbox" name="password" value="" placeholder="{$lang->password}" />
	<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label>
	<input type="submit" class="button" name="loginsubmit" value="{$lang->login}" />
	<input type="hidden" name="remember" value="yes" />
	<input type="hidden" name="action" value="do_login" />
	<input type="hidden" name="url" value="" />
	<input type="hidden" name="quick_login" value="1" />
	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
</form>
<a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>
</div>

Then style the input fields and buttons with CSS or defined classes.

[ExiTuS]

hi friend

the problem is, i have a modified template, this is what my code looks like

						<!-- Continuation of div(class="upper") as opened in the header template -->
						<span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a> <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register">{$lang->welcome_register}</a></span>
					</div>
				</div>
<div class="lower">
	<div class="wrapper">
		<ul class="menu panel_links">
			
		</ul>
		<ul class="menu user_links">
			</a></li>
			
		</ul>
	</div>
	<br class="clear" />
</div>
				<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="quick_login" type="hidden" value="1" />
						<table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
							<tr>
								<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
							</tr>
							<tr>
								<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>
							</tr>
							<tr>
								<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>
							</tr>
							<tr>
								<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>
							</tr>
							<tr>
								<td class="trow2" colspan="2">
									<div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
								</td>
							</tr>
						</table>
					</form>
				</div>
				<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));
				</script>


I changed the menu bar

but when I replace your code, it is visible - wrong !

Can you help me ?

[Image: LAOD1wm.png]

Wrong !
[Image: wHzis4g.png]

Problem solved, I pasted the code and did not replace it, so it works fine

Thank you
Reply
#4
Solved: 2 Years, 1 Week ago
There are ugly line breaks where they should not be. This is because the <form...> seems to be a block element.
No big deal! Just move the welcome_guest variable and the register link inside the form element.

[ExiTuS]
New Forum / MyBB 1.8.26 + innovative full-responsive Theme
Live-Escape-Game-Forum
Reply
#5
Solved: 2 Years, 1 Week ago
(2019-11-28, 02:52 PM)[ExiTuS] Wrote: There are ugly line breaks where they should not be. This is because the <form...> seems to be a block element.
No big deal! Just move the welcome_guest variable and the register link inside the form element.

[ExiTuS]


ok thank you friend.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)