Advertisement:

Author Topic: logout gray effect!  (Read 72475 times)

Offline A.M.A

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,133
  • Gender: Male
  • ..
logout gray effect!
« on: April 10, 2004, 07:06:47 PM »
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:
Code: [Select]
// 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
Code: [Select]
<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:
Code: [Select]
<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 :)

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,702
  • xxx
Re: logout gray effect!
« Reply #1 on: April 10, 2004, 07:10:08 PM »
Nice :)
Liverpool FC Forum with 14 million+ posts.

Offline Homie

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
  • I Love SMF 1.0 Beta 5
    • Homies Community
Re: logout gray effect!
« Reply #2 on: April 10, 2004, 07:34:46 PM »
WOW Awesome it worked for me YAYAYAYYYYYAAAAA  :o  :D GOOD Job A.M.A YOU Know Simple machines should ad this to there forum
« Last Edit: April 10, 2004, 07:37:06 PM by Homie »

Offline Homie

  • Jr. Member
  • **
  • Posts: 127
  • Gender: Male
  • I Love SMF 1.0 Beta 5
    • Homies Community
Re: logout gray effect!
« Reply #3 on: April 16, 2004, 08:09:40 AM »
I just found a forum with the Log Out Gray Effect Its Jin The MC Forum

http://www.holla-front.com/forum/index.php?
« Last Edit: April 16, 2004, 08:15:43 AM by Homie »

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,702
  • xxx
Re: logout gray effect!
« Reply #4 on: April 16, 2004, 12:28:02 PM »
Homie, thats nice but its of no relevance, considering it's not even an SMF board.
Liverpool FC Forum with 14 million+ posts.

Offline Peter Duggan

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,663
  • Gender: Male
    • Peat Stack or Pete's Tack?
Re: logout gray effect!
« Reply #5 on: April 16, 2004, 04:30:20 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!

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: logout gray effect!
« Reply #6 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.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline A.M.A

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,133
  • Gender: Male
  • ..
Re: logout gray effect!
« Reply #7 on: April 16, 2004, 07:36:10 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 :)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: logout gray effect!
« Reply #8 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]

Offline vkot

  • Senior Translator
  • Full Member
  • *
  • Posts: 602
  • Gender: Male
  • @}-'-,--
    • vassiliskotaras on LinkedIn
    • kithara.gr
Re: logout gray effect!
« Reply #9 on: December 03, 2004, 05:47:47 AM »
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.
Για εξειδικευμένες υπηρεσίες στα παραπάνω, πατήστε εδώ.

Offline Trekkie101

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,157
  • Gender: Male
  • Ad Astra!
    • https://www.facebook.com/DLRPRoundup on Facebook
    • @dlrproundup on Twitter
    • DLRP Roundup
Re: logout gray effect!
« Reply #10 on: December 03, 2004, 06:35:07 AM »
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.

Offline Webby

  • Full Member
  • ***
  • Posts: 482
  • Gender: Male
  • Let's generate some buttons !
    • marcovanveelen.nl
Re: logout gray effect!
« Reply #11 on: December 03, 2004, 08:44:31 AM »
Nice trick ;)  Works like a charm !

Offline npeelman

  • Semi-Newbie
  • *
  • Posts: 10
  • Gender: Male
  • The number of the Beast
    • EasyAvatar
Re: logout gray effect!
« Reply #12 on: December 16, 2004, 09:44:55 AM »
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

Offline Jan

  • Semi-Newbie
  • *
  • Posts: 46
  • Gender: Male
Re: logout gray effect!
« Reply #13 on: December 17, 2004, 11:36:43 PM »
Nice effect  :)

Offline mediman

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,663
  • Gender: Male
Re: logout gray effect!
« Reply #14 on: February 05, 2005, 01:51:12 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.

Offline Elmacik

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,276
  • Gender: Male
  • = Human Draft =
    • IT Store
Re: logout gray effect!
« Reply #15 on: August 18, 2005, 02:21:59 AM »
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

Offline IncubuS

  • Semi-Newbie
  • *
  • Posts: 14
    • http://www.the-ien.com
Re: logout gray effect!
« Reply #16 on: November 24, 2005, 08:55:44 PM »
Just one wierd question , I cant find any script.js lol in all forum folder .
www.the-ien.com [nofollow]

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: logout gray effect!
« Reply #17 on: November 24, 2005, 09:36:03 PM »
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

Offline Sheepy

  • Full Member
  • ***
  • Posts: 418
  • -=~ Love ~=-
    • Sheepy's SMF Mod board
Re: logout gray effect!
« Reply #18 on: November 25, 2005, 02:47:09 AM »
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.

Offline CeZa

  • Full Member
  • ***
  • Posts: 648
  • Gender: Male
  • ?!..
Re: logout gray effect!
« Reply #19 on: June 15, 2006, 04:55:00 AM »
For RC2 ? ::)