MyBB Community Forums

Full Version: Adding a modal login box to MyBB using jQuery
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Where do i add it though?
Add it to the actual HTML for the modal box within the header_welcomeblock_guest template.

Find:

<div id="loginModal" class="modalBox loginModalBox">
    <div class="thead">
        Login at {$mybb->settings['bbname']}
    </div>

Replace:

<div id="loginModal" class="modalBox loginModalBox">
    <div class="thead">
        Login at {$mybb->settings['bbname']}
<a rel="closeModal" href="#">Close</a>
    </div>
It looks like this, http://gyazo.com/1c7c593c1f4ac7cc3d0cdae83ce5052d

Shouldn't it be like, at the top right corner?
Yes, you can move it using CSS. Simply apply a class to the link (such as "closeButton") then do something like this:

.loginModalBox .thead {
position: relative;
}

.loginModalBox .thead .closeButton {
position: absolute;
right: 0;
top: 0;
}
http://gyazo.com/06fe3db91cfca57913aa7ce2bd32d060

This is what it looks like, the close bg changes when you hover Smile

I copied the thead css from your forum if you don't mind? <3
Yeah, that's fine Smile
(2012-04-26, 01:20 AM)euantor Wrote: [ -> ]Yeah, that's fine Smile

Thanks, looks beast Smile
I followed the instruction and my forum now looks a complete mess please help
You haven't followed them properly then. I can see straight away that you've mucked up the javascript part of it at the very least.
Ohhhhhh Dammit

Can someone pm me I need a lil help lol
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26