News:

Wondering if this will always be free?  See why free is better.

Main Menu

logout gray effect!

Started by A.M.A, April 10, 2004, 07:06:47 PM

Previous topic - Next topic

A.M.A

while surfing one of my favorites Arab VB's forums I've notice this feature, that will gray screen when clicking the logout button .. a similar effect found in windows XP when clicking  Log off.

in script.js add the following code at the end of the file:
// Logout effect like in WindowsXP gray logoff effect!
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('Are you sure you want to logout?'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}

in (index.template.php) look for
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
and replace it with:
<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
we just add this : onclick="return log_out()"

note that this will work only with IE.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Ben_S

Liverpool FC Forum with 14 million+ posts.

Homie

#2
WOW Awesome it worked for me YAYAYAYYYYYAAAAA  :o  :D GOOD Job A.M.A YOU Know Simple machines should ad this to there forum

Homie

#3
I just found a forum with the Log Out Gray Effect Its Jin The MC Forum

http://www.holla-front.com/forum/index.php?

Ben_S

Homie, thats nice but its of no relevance, considering it's not even an SMF board.
Liverpool FC Forum with 14 million+ posts.

Peter Duggan

Quote from: Homie on April 10, 2004, 07:34:46 PM
YOU Know Simple machines should ad this to there forum

Since you could have said 'could' but chose to say 'should', I should say you could be wrong there!

Oldiesmann

Interesting feature, but usually logging out happens pretty quickly (unless you're on a 56k modem ;)), so I don't know if that would be useful or not.
Michael Eshom
Christian Metal Fans

A.M.A

Quote from: Oldiesmann on April 16, 2004, 05:05:07 PM
Interesting feature, but usually logging out happens pretty quickly (unless you're on a 56k modem ;)), so I don't know if that would be useful or not.
Even if you got very fast connection .. you will *notice* this one, trust me  ;)
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

[Unknown]

Not in Firefox.  Unless it can work in Opera/Mozilla as well, I'm not interested :P.

-[Unknown]

vkot

I think it could be done using CSS & JavaScript...
The JS would have a loop that changes all the colors on the page little by little until everything is black.
For specialized SMF installation/customization, Web Development, Linux Server Administration, click here.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Trekkie101

If it doesnt work in firefox its not worth the trouble, plus i have Netscape, Opera, Mozilla Suite, Crazy Browser, Avant  just so i can make sure things work right for all. Im still trying to get Lynx to work, but god its hard! No installer file.

Webby

Nice trick ;)  Works like a charm !

npeelman

Quote from: [Unknown] on April 16, 2004, 10:01:22 PM
Not in Firefox.  Unless it can work in Opera/Mozilla as well, I'm not interested :P.

-[Unknown]

Since 'filters' are pretty much IE specific (maybe Mozilla) I doubt they would work in anything but IE.  Now maybe some Javascript with a DIV (tiled graphic). Have JS bring the DIV to the front then either change the colors of the graphic or whatever...

Norm
www.easyavatar.com [nofollow]

Jan


mediman

Quote from: [Unknown] on April 16, 2004, 10:01:22 PM
Not in Firefox.  Unless it can work in Opera/Mozilla as well, I'm not interested :P.

-[Unknown]
:P
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Elmacik

its been more than 120 days this topic is not replied :)
ok, maybe the posters still alive, i will try my chance.

when this hack is done, the grey fonts turn into green in internet explorer.
everything is ok in opera and firefox. but in ie, the greys turns to green :S
Home of Elmacik

IncubuS

Just one wierd question , I cant find any script.js lol in all forum folder .
www.the-ien.com [nofollow]

JayBachatero

It located in Themes/{your_theme}/script.js
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Sheepy

Quote from: [Unknown] on April 16, 2004, 10:01:22 PM
Not in Firefox.  Unless it can work in Opera/Mozilla as well, I'm not interested :P.
Agree.  However perhaps we can do fade out instead by adding a semi-transparent png on these browsers? (However the png may have to be pre-loaded to guarentee it displays fast... when the mouse moves into logout command, at least, if you do not show a dialog like the original trick does)

If consistancy is in mind, Ie can also do fade out with filter.

CeZa


Advertisement: