2012-12-20, 09:59 AM
(2012-12-20, 09:36 AM)Mr_Soul Wrote: [ -> ]You can edit this my headerinclude code for login box?
<script type="text/javascript"> <!-- var cookieDomain = "{$mybb->settings['cookiedomain']}"; var cookiePath = "{$mybb->settings['cookiepath']}"; var cookiePrefix = "{$mybb->settings['cookieprefix']}"; var deleteevent_confirm = "{$lang->deleteevent_confirm}"; var removeattach_confirm = "{$lang->removeattach_confirm}"; var loading_text = '{$lang->ajax_loading}'; var saving_changes = '{$lang->saving_changes}'; var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}"; var my_post_key = "{$mybb->post_code}"; var imagepath = "{$theme['imgdir']}"; // --> </script> {$newpmmsg} <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> jQuery.noConflict(); $(document).ready(function() { $('a.login-window').click(function() { //Getting the variable's value from a link var loginBox = $(this).attr('href'); //Fade in the Popup $(loginBox).fadeIn(300); //Set the center alignment padding + border see css style var popMargTop = ($(loginBox).height() + 24) / 2; var popMargLeft = ($(loginBox).width() + 24) / 2; $(loginBox).css({ 'margin-top' : -popMargTop, 'margin-left' : -popMargLeft }); // Add the mask to body $('body').append('<div id="mask"></div>'); $('#mask').fadeIn(300); return false; }); // When clicking on the button close or the mask layer the popup closed $('a.close, #mask').live('click', function() { $('#mask , .login-popup').fadeOut(300 , function() { $('#mask').remove(); }); return false; }); }); </script>
You might have to change all the $ to jQuery - not sure, I don't use jQuery with MyBB.