MyBB Community Forums

Full Version: Small edit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I need help modifying a small part of mybb. I'm trying to make the "quick login form" be next to the "your last visit was" section. What must I do to make this work? First, i tried to place the two scripts next to each other, like
{$loginform}{$lang->welcome_message}
, but it resulted like the image below - they are still not next to each other. [Image: mybbtest.png]
Then I tried using divisions. First, I placed then into one division, and that resulted like in having them on top of each other again. Then I used two divisions and floated them next to each other, but it still did not work. My guess is there is a break in one of the scripts, but I'm not sure. So, how do I fix this problem, and make the two scripts stay right next to each other?
You might need to take a look at the index_loginform template.

I do want to point out an issue though:
{$loginform} only makes sense on the index page, so if you're putting it in the header, it'll only appear on the index page
I did forget to metion that I edited the index_loginform, so that no breaks were included (Breaks were the only type of script that could make the line break). Also, the loginform is just re-positoned on the index template. I was thinking there may have been a problem in the languages files, such as index.lang.php - but are there is are variables.
Can you post your index_loginform template?

Also, $lang->welcome_message is not something included with MyBB (to my memory) - where have you defined that?
The code I have in the index_loginform template is:
<form action="member.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
	<input type="hidden" name="action" value="do_login" />
	<span class="smalltext"><strong>{$lang->quick_login}</strong></span>
	<input type="text" class="textbox" name="username" title="{$lang->login_username}" value="{$lang->login_username}" onfocus="if(this.value == '{$lang->login_username}') { this.value=''; }" onblur="if(this.value=='') { this.value='{$lang->login_username}'; }" />
	<input type="password" class="textbox" name="password" title="{$lang->login_password}" value="{$lang->login_password}" onfocus="if(this.value == '{$lang->login_password}') { this.value=''; }" onblur="if(this.value=='') { this.value='{$lang->login_password}'; }" />
	{$gobutton}
</form>

The {$lang->welcome_message} was created by me, as suggested in this forum post. It used to be called {$lang->welcome_backtest}, but I changed to a more approiate name. I think it was you who suggested it to me, and it worked great!
That all looks about right. I'm not that familiar with CSS, but the <form> tag may be being interpreted as a block level element.
Try using something like this:
<form action="member.php" method="post" style="display: inline;">