Logout 'fading' that works in IE, FireFox, Opera, etc..
This modification is in the archives.
UPDATED TO 1.0.1
For vB 4.0 - please see this thread Logout 'fading' that works in IE, FireFox, Opera, etc I'm not sure if there is already something like this here, if there is, sorry. By default, the way vBulletin handles it, it will only work in Internet Explorer. Using the code below, however, it will work in IE, FireFox, Opera, (and should in others, but these are the only browsers I have installed ). Note, though, it doesn't do the exact same style as vB default. Installation: On 3.5.x - 3.6.5 In the AdminCP > Styles & Templates > Styles Manager > (your style) > navbar template find: HTML Code:
<script type="text/javascript"> <!-- function log_out() { ht = document.getElementsByTagName("html"); ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; if (confirm('$vbphrase[sure_you_want_to_log_out]')) { return true; } else { ht[0].style.filter = ""; return false; } } //--> </script> Note, if you installed this before today.. this code is different To update, simple find "// You can change 30 and 0.3 to suit your 'tastes' " in your template code, and replace the function with this HTML Code:
<script type="text/javascript" language="JavaScript"> <!-- function log_out() { // You can change 30 and 0.3 to suit your 'tastes' :) bo = document.getElementsByTagName('body')[0]; bo.style.filter = 'Alpha(opacity="30")'; bo.style.MozOpacity = '0.3'; bo.style.opacity = '0.3'; if (confirm('$vbphrase[sure_you_want_to_log_out]')) { return true; } else { bo.style.filter = 'Alpha(opacity="100")'; bo.style.MozOpacity = '1'; bo.style.opacity = '1'; return false; } } //--> </script> On 3.6.6+ In the clientscript/vbulletin_global.js file find: HTML Code:
function log_out(confirmation_message) { var ht = document.getElementsByTagName("html")[0]; ht.style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; if (confirm(confirmation_message)) { return true; } else { ht.style.filter = ""; return false; } } HTML Code:
function log_out(confirmation_message) { // You can change 30 and 0.3 to suit your 'tastes' :) var bo = document.getElementsByTagName('body')[0]; bo.style.filter = 'Alpha(opacity="30")'; bo.style.MozOpacity = '0.3'; bo.style.opacity = '0.3'; if (confirm(confirmation_message)) { return true; } else { bo.style.filter = 'Alpha(opacity="100")'; bo.style.MozOpacity = '1'; bo.style.opacity = '1'; return false; } } Changelog: 1.0.0 - 11. Jun 2007 - Updated 3.5.4 code - Added a way to get this to work on 3.6.6+ 1.0.0 - 25. Jul 2006 - Initial release The screenshot is in FireFox, however, it's the same in both IE and Opera. That's it. Enjoy! Download This modification is archived and cannot be downloaded. Screenshots
|