Author Topic: [MOD] Autologin CheckBox state changing  (Read 22474 times)

0 Members and 1 Guest are viewing this topic.

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
[MOD] Autologin CheckBox state changing
« on: March 11, 2005, 11:34:44 PM »
Author of modification: V@no

Always when a checkbox appears on the internet I tend to click on the description text next to the checkbox... but it doesn't change the state of the CBox 

This tiny mod allows the user to change the „auto_login“-checkbox state by clicking the text next to it… and not only by clicking the "small" CheckBox itself.

open {your_template}/user_loginform.html

find:

Code: [Select]
<td><span class="smalltext">{lang_auto_login}</span></td>
change to:

Code: [Select]
<td><span class="smalltext" onClick="if(auto_login.checked) auto_login.checked=false; else auto_login.checked=true;" style="cursor:default;">{lang_auto_login}</span></td>
MAяTRIX


Offline supastoked

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • ThoseDudes
Re: [MOD] Autologin CheckBox state changing
« Reply #1 on: July 01, 2005, 07:08:52 PM »
Hey Guys,
Thanks for this - was just what i was looking for  :D  One thing i added though, was
Code: [Select]
style="cursor: pointer", just so users can see that they can click on the text.. Otherwise it is perfect!!!
Cheers
Chris

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #2 on: July 01, 2005, 07:39:50 PM »
hi martrix,

also ... thanks for this nice tiny mod ...  :D
@supastoked ... correct : style="cursor: pointer" ...  :!:

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #3 on: November 26, 2005, 02:00:40 PM »
it should be autologin instead of auto_login.
At least on my site

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Autologin CheckBox state changing
« Reply #4 on: November 26, 2005, 05:52:25 PM »
it should be autologin instead of auto_login.
At least on my site
Not in fresh 4images installation...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #5 on: November 26, 2005, 06:41:50 PM »
hmm... maybe it's the phpbb mod :)
You know if it could work under firefox?

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [MOD] Autologin CheckBox state changing
« Reply #6 on: November 26, 2005, 06:43:08 PM »
with netscape there is no problem, so i think its works in Firefox too...

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #7 on: November 26, 2005, 06:54:51 PM »
Not quete
take a look on Vano's homepage.
http://gallery.vano.org/en/13932

with netscape there is no problem, so i think its works in Firefox too...

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [MOD] Autologin CheckBox state changing
« Reply #8 on: November 26, 2005, 06:58:09 PM »
and then?

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #9 on: November 26, 2005, 06:59:46 PM »
Can you mark the remember by clicking the text with FF?

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [MOD] Autologin CheckBox state changing
« Reply #10 on: November 26, 2005, 07:16:28 PM »
i have it also on my site and with Netscape it works...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Autologin CheckBox state changing
« Reply #11 on: November 26, 2005, 07:41:57 PM »
You are right, this method doesnt work on FF...
The work around I found so far is add id="auto_login" into the checkbox
and then use "cross-browser ID read" script.
So, the final code is:
Code: [Select]
<script language="javascript">
function get_id(id)
{
  if (document.getElementById) return document.getElementById(id);
  if (document.all && !document.getElementById) return document.all[id];
  if (document.layers) return document.layers[id];
}
</script>
<input type="checkbox" name="auto_login" id="auto_login" value="1" checked/>&nbsp;<span class="smalltext" onClick="alcb=get_id('auto_login');if(alcb.checked) alcb.checked=false; else alcb.checked=true;" style="cursor:default;">{lang_auto_login}</span>
(if you already have get_id() JS function, then you should not use mine.)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Autologin CheckBox state changing
« Reply #12 on: November 26, 2005, 09:05:10 PM »
Great V@no.

Bart sends v@no a big hug  :mrgreen: