Thread Rating:
  • 10 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a modal login box to MyBB using jQuery
#31
Right, I've found a fix for the issue LeeFish mentioned. To implement it, simply add the following code to your JS:

$('#loginModal input[name="url"]').attr("value", window.location);

I've also added this to the code in the first post.
Reply
#32
Thank you euantor for this great tutorial! +Repped.

I only have one question. How do I apply the dark background? I know it has something to do with z-index: 9015; but I can't seem to get it to work.
Reply
#33
You mean the mask? It should work so long as you have the <div id="mask"><div> line of code within your template somewhere.
Reply
#34
Thank you Euantor. Now to get this redirect to work in Prototype (I keep trying to take the jQuery OFF leefish.... Toungue )
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#35
How would I modify the text alignment on the modal box? It's a bit to much to the top-left.
Reply
#36
(04-29-2012, 04:25 PM)Leefish Wrote: Thank you Euantor. Now to get this redirect to work in Prototype (I keep trying to take the jQuery OFF leefish.... Toungue )

Try this:

var redirectURLInput = $$('#loginModal input[name="url"]');
redirectURLInput[0].value = window.location;

I haven't tested it, but I believe it should work Smile

(04-29-2012, 06:35 PM)Rigby Wrote: How would I modify the text alignment on the modal box? It's a bit to much to the top-left.

Could you post a screenshot of what you mean exactly? It should be a simple CSS edit Smile
Reply
#37
http://www.adminsbb.com/index.php
Click Login and it will appear.
I need to space the text a bit more to the right and lower it, as right now it looks too much to the left.
Reply
#38
Ah, you need to add some padding to the header. Try something like this in your CSS:

.modalBox .thead {
    padding: 4px 10px;
}

It may cause some issues with your theme, but that's the basic way of doing it Big Grin
Reply
#39
Once again, thanks man.
Reply
#40
Hmmm... I think I will be trying this later in May. May will be a month of large change on my forum (at least, if everything works out!).
PGP Key (Fingerprint: 23B6 F4C0 FE2D 45AA 61A0 1E86 DB87 09DC DD87 6E40)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)