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.
Nice :)
WOW Awesome it worked for me YAYAYAYYYYYAAAAA :o :D GOOD Job A.M.A YOU Know Simple machines should ad this to there forum
I just found a forum with the Log Out Gray Effect Its Jin The MC Forum
http://www.holla-front.com/forum/index.php?
Homie, thats nice but its of no relevance, considering it's not even an SMF board.
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!
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.
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 ;)
Not in Firefox. Unless it can work in Opera/Mozilla as well, I'm not interested :P.
-[Unknown]
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.
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.
Nice trick ;) Works like a charm !
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
Nice effect :)
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
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
Just one wierd question , I cant find any script.js lol in all forum folder .
It located in Themes/{your_theme}/script.js
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.
For RC2 ? ::)
It works for RC2 too. Just index.template.php changed a bit.
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
Quote from: Elmacik on June 15, 2006, 10:16:21 AM
It works for RC2 too. Just index.template.php changed a bit.
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
<a onclick="return log_out()" href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
thanx Elmacik.
----------------------
thanx A.M.A
for 1.1.1?
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.
Olmuyor. Onun için sordum.
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.phpFind
<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: 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
Is it possible to delay the greyeffect like in windows?
I don't know, but it's fantastic!
PS: I've tried it on v.1.1.2, it works ;)
really awesome. thanks for the code. tried and works on 1.1.2 with IE alone.
Thanx its working fine and most of end users still choose bydefault browser i.e IE so still impressive
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
its too fast.. is it supposed to fade? because it doesnt 'fade' just turns grey.. how can i control the speed of the fade?
not working for me. in the VB green theme, there was no script.js file, so I made one and it didn't work.
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.
Had this on my site for a while, sexy little addition (although I hardly ever log out ;))
this one working with default theme .... not the other theme that i m using riht now ... i m using dilber mc theme ....
help plzzzz
plzzz help :(
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.
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
and did you add it to the default theme's script.js?
do you get javascript errors on the page?
well, it works fine with dafault theme.
and i dun get any error on my dilber mc theeme
ya it works well for me too in my new site www.techforums.in using the SoftMC Blue Theme
thanks for this tip.. even though this is small this is a great effect :D
ths one is great
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..
i dont think it works for 2.0RC2 ,code is kinda completely different ?
This is sad - roughly ~33k users use IE. Learn to browse the web the right way people! Mozilla > all. There is no competition.
Joe_Dean: yes there is compitition, Google Chrome
Thanks for the help
kysangel
Does this work on the latest version of smf2? :o
I don't think that it will work.
nice inf
2rc5 please.. :(
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.
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?
Love this trick thanks!
wow...this is nice. Good find!
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.
This is a really cool effect... thanks!