• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 12:37:55 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


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

April 10, 2004, 07:34:46 PM #2 Last Edit: April 10, 2004, 07:37:06 PM by Homie
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

April 16, 2004, 08:09:40 AM #3 Last Edit: April 16, 2004, 08:15:43 AM by Homie
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
Cincy Space - now open!

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


Elmacik

It works for RC2 too. Just index.template.php changed a bit.
Code (Find) Select

<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>

Code (Replace) Select

<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
Home of Elmacik

husmen73 (Gulhin)

Quote from: Elmacik on June 15, 2006, 10:16:21 AM
It works for RC2 too. Just index.template.php changed a bit.
Code (Find) Select

<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>

Code (Replace) Select

<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>

thanx Elmacik.

----------------------
thanx A.M.A
-Kurumsal Kimlik Web Tasarım Hizmeti.
Gülhin Portal Sistemi hakkında yorumlarınızı bekliyorum.
SMF
Referanslar --> http://www.gulhin.com/referanslar-portfoy/
-Web Tasarımı ve Tema Tasarımı Sitesi www.gulhin.com
-TOPLU MAİL GÖNDERİMİ --> http://www.toplumailsms.com
E-Ticaret Sistemi yaptırmak mı istiyorsunuz?

özgür şahin


husmen73 (Gulhin)

osahin aynısını uygula. index.template.php'de ise kodları bulamazsan, benzer kodları ara ve değiştir. Herhangi bir problem çıkacağını sanmam. JS kodu ne de olsa.
-Kurumsal Kimlik Web Tasarım Hizmeti.
Gülhin Portal Sistemi hakkında yorumlarınızı bekliyorum.
SMF
Referanslar --> http://www.gulhin.com/referanslar-portfoy/
-Web Tasarımı ve Tema Tasarımı Sitesi www.gulhin.com
-TOPLU MAİL GÖNDERİMİ --> http://www.toplumailsms.com
E-Ticaret Sistemi yaptırmak mı istiyorsunuz?

özgür şahin

Olmuyor. Onun için sordum.

Alan S

Quote from: osahin on January 19, 2007, 08:14:44 PM
for 1.1.1?

Same code

Script.js


// 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;
}
}


Index.template.php

Find

<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>


Replace With


<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

houston

Quote from: Alan S on January 24, 2007, 04:00:56 PM
Quote from: osahin on January 19, 2007, 08:14:44 PM
for 1.1.1?

Same code

Script.js


// 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;
}
}


Index.template.php

Find

<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>


Replace With


<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>


Thanks for the code. It works great

teamvtec

Is it possible to delay the greyeffect like in windows?

eriktm

I don't know, but it's fantastic!

PS: I've tried it on v.1.1.2, it works ;)

dDOTr2

April 02, 2007, 05:00:21 AM #29 Last Edit: April 02, 2007, 05:02:33 AM by dDOTr2
really awesome. thanks for the code. tried and works on 1.1.2 with IE alone.

geniusrohit

Thanx its working fine and most of end users still choose bydefault browser i.e IE so still impressive

msvdm

i find some problem with this hack like Erik™ i put this in 1.1.2 work fine but when im login and pres logout it ask me i want to log out ore cancel when i press cancel it redirect me out from the forum dont redirect me back in the forum

John S

its too fast.. is it supposed to fade? because it doesnt 'fade' just turns grey.. how can i control the speed of the fade?

macuser9214

not working for me. in the VB green theme, there was no script.js file, so I made one and it didn't work.


speak121

Quote from: SimplMachnsforum_user on July 15, 2007, 07:13:17 PM
not working for me. in the VB green theme, there was no script.js file, so I made one and it didn't work.

Put on script.js of default theme.

diplomat.

Had this on my site for a while, sexy little addition (although I hardly ever log out ;))
avidSOUND.com: Where Aspiring Musicians Can Be HEARD!

asdas2

this one working with default theme .... not the other theme that i m using riht now ... i m using dilber mc theme ....

help plzzzz
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

asdas2

www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

metallica48423

Is this issue solved or do you still require assistance?

does that theme have its own script.js? Keep in mind this does NOT work in firefox.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

asdas2

No, its not solved yet

i m using INternet Explorer 7, and i m using Dilber Mc them, and smf 1.1.4

and i did not find any Script.js file in dilber mc folder.... so i guesss this theme dosent hov its own script.js


www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

metallica48423

and did you add it to the default theme's script.js?

do you get javascript errors on the page?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

asdas2

well, it works fine with dafault theme.
and i dun get any error on my dilber mc theeme
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

jagannath

ya it works well for me too in my new site hxxp:www.techforums.in [nonactive] using the SoftMC Blue Theme
thanks for this tip.. even though this is small this is a great effect :D

Aileen


CultureGlue

Does this work on smf 1.1.11 ?
On 2.0RC2 ?

I tried to modify my index.template.php file but it is not actually the same..

frenki

i dont think it works for 2.0RC2 ,code is kinda completely different ?

Joe_Dean

This is sad - roughly ~33k users use IE. Learn to browse the web the right way people! Mozilla > all. There is no competition.

KensonPlays

Joe_Dean: yes there is compitition, Google Chrome

kysangel

Thanks for the help

kysangel

dzinerfusion

Does this work on the latest version of smf2?  :o

Masterd

I don't think that it will work.


uninvited13th


Arantor

Even if it were available for RC5, the code would need to be rewritten because right now it's IE only. Though there's code posted for RC2 which should work just as well.
No good deed goes unpunished
All helpful urges should be circumvented

desibees

I don't have
<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>';
in my.... index.template.php

Im using RC5.

Custom template. ( i checked all template files)

help?


I'm the.. Help abuser



MotherBoard

wow...this is nice. Good find!

agent47

Quote from: desibees on April 05, 2011, 06:44:40 PM
I don't have
<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>';
in my.... index.template.php

Im using RC5.

Custom template. ( i checked all template files)

help?
We all don't because this is a really old topic and is probably written for SMF V1. Just stay put and maybe someone will take the liberty to re-write the code for the current SMF versions.

PortaMx is probably the best SMF portal!

pearpandas

This is a really cool effect... thanks!

Advertisement: