MyBB Community Forums

Full Version: Change the text in the Login dialog box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all

We have a mybb forum with the login linked to login on our associated website.  In other words, registering on our website automatically passes that username and pw info to our mybb database, so that users can use the same username and pw to access the forum.

I would like to modify the login box to be able to tell this to users.

Therefore in this dialog box I'd like to:
1) add text to the banner and
2) add text below the login button

[Image: forumlogin1.png]

Likewise, if the user enters the wrong username/pw this pops up:

[Image: forumlogin2.png]

...and I would likewise like to be able to edit these dialogs as well, perhaps the text in the yellow field

Can someone please tell me where the file is (or files are) in the new mybb release that would allow me to edit the text in these dialogs?

The only thread I found that seemed relevant to my question was this one from 2015
https://community.mybb.com/thread-167199.html

I looked for the file mentioned by one of the respondents to this post:
inc/languages/english/vars_envy.lang.php

...but there is no such file in my inc/languages/english/ folder, so I thought this may be outdated information

Thank you for any help!
I believe it would be member Lang likely. Possibly even global? But I will further look this evening after work.

Okay I took a gander further into this!

Looks like it is located in inc/languages/english/global.lang.php where most of what you are looking for starts around line 66 (or you can do a quick search for Remember Me).

HOWEVER the variable is already there like on the member action login page. It just needs added to your modal as well. The modal is located in Header Templates.

Open header_welcomeblock_guest_login_modal and find:
<label for="quick_login_remember">{$lang->remember_me}</label>

Replace with (or add where ever you want however you want):
<label for="quick_login_remember">{$lang->remember_me}</label>
		<br />{$lang->remember_me_desc}

You can use the same {$lang->remember_me_desc} in Member Templates --> member_login.
thank you isoldehn!

I will see if I can figure it out and let everyone know how it goes in an update here.

p.s. @isoldehn: I am no sql expert but I know enough to understand your signature. hilarious!
You are most certainly welcome! And yes I found it quite hilarious. xD
OK...so it half worked.

I found inc/languages/english/global.lang.php

...and I successfully changed the text in those descriptions

But what I could *not* figure out is how to adjust header_welcomeblock_guest_login_modal or member_login per the advice of @isoldehn

I located those template files in both
Home » Template Sets » BootBB Templates
and
Home » Template Sets » Default Templates

But when I made changes to the header_welcomeblock_guest_login_modal and member_login files in either of these template sets, nothing happened.

I feel like I am accessing the wrong template files

Could someone please give me a bit more detail on which header_welcomeblock_guest_login_modal and member_login files in particular I should adjust?

Thanks!
That might be my fault, what version of MyBB are you using currently? These templates my not be available in your current version. Smile
Sorry for my shorthand in my last post.

I am using the latest version. I found the templates in:

Home » Template Sets » BootBB Templates
and
Home » Template Sets » Default Templates

...but none of the changes I made had any effect! I would delete entire lines of code from the template just to check, but it would have no effect on the dialog box appearance.

That's what made me think I was editing the wrong template files.

Cheers
Jason
It will be in the template set in use by your current theme (which I’m guessing is the BootBB one?).
I’m unsure why the template changes are not working. Can you paste here everything in the header_welcomeblock_guest_login_modal template?
Yes, BootBB is the theme

I have tried adjusting two files:

Home » Template Sets » BootBB Templates » Header Templates » header_welcomeblock_guest_login_modal which looks like this:

<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>

....and then I tried (as an example) removing this checkbox code:

<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />

Then I saved, cleared cache, reloaded the forum page, pressed login, and the checkbox was still there!

I did the same thing with 

Home » Template Sets » BootBB Templates » Member Templates » member_login

...and still no effect!

thanks for any help - I feel like I am missing something obvious here...
<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><br />{$lang->remember_me_desc}
    </td>
</tr>
<tr>
    <td class="trow2" colspan="2">
        <div align="center"><input name="submit" type="submit" class="button" value="{$lang->login}" /></div>
    </td>
</tr>

Replace that template with this.
Pages: 1 2