vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Logout 'fading' that works in IE, FireFox, Opera, etc.. (https://vborg.vbsupport.ru/showthread.php?t=122049)

Eric 07-24-2006 10:00 PM

Logout 'fading' that works in IE, FireFox, Opera, etc..
 
UPDATED TO 1.0.1

For vB 4.0 - please see this thread https://vborg.vbsupport.ru/showthread.php?t=228086

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>

Replace with:
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;
        }
}

Replace with:
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!

JD210 07-25-2006 08:05 AM

Sweet. Works beautifully. ***Clicks Installed.***

TTG 07-25-2006 10:26 AM

Works in 3.6.0 ... :) .. Thanks

Clicked install

Snake 07-25-2006 11:25 AM

Oh well I was looking for the exact default one that works on IE but whatever, this should do it.

Thanks! :)

Eric 07-25-2006 10:57 PM

Glad ya'll like it :)
Quote:

Originally Posted by Dark Blade
Oh well I was looking for the exact default one that works on IE but whatever, this should do it.

Well, I was just playing around and came up with this. I might take some time later and see if I can get it closer to default.

Mr Chad 07-25-2006 11:40 PM

very nice!

hotwheels 07-26-2006 04:16 AM

very kewl..........Installed

rmxs 07-26-2006 09:06 AM

Thanks...fantastc installed

hcmagix 07-26-2006 12:02 PM

Thank you

realraptor 07-26-2006 07:08 PM

*clicks install*

thank you, works great on 3.5.4!


All times are GMT. The time now is 02:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01067 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete