Hello Guest
No Avatar
Sign In to Remove
Posts: 
15
Reputation: 
2
Posted: August 11, 2011, 3:20 PM
  • Group: Member
Hey there,

It's me another time. I recently tried to install the following mod: http://custom.simplemachines.org/mods/index.php?mod=1807, which detects whether capslock is activated on tipping your password in or not but the mod is unable to install himself properly because some lines in the index.template.php are missing.

I was able to replace
Code: [Select]
</head>trough
Code: [Select]
<script type="text/javascript"><!-- // -->','
function capsLock(e, div)
{
keyCode = e.keyCode ? e.keyCode : e.which;
shiftKey = e.shiftKey ? e.shiftKey : ((keyCode === 16) ? true : false);
if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))
{
document.getElementById(div).style.visibility = \'visible\';
}
else
{
document.getElementById(div).style.visibility = \'hidden\';
}
}
// ]]','></script>

but not to replace
Code: [Select]
<input type="password" name="passwrd" size="10" class="input_password" />trough
Code: [Select]
<input type="password" name="passwrd" size="10" class="input_password" onkeypress="capsLock(event,\'quick_login\')" />
or

Code: [Select]
<input type="hidden" name="hash_passwrd" value="" />trough
Code: [Select]
<input type="hidden" name="hash_passwrd" value="" />
<div class="error" style="visibility:hidden" id="quick_login">', $txt['capslock_warning'], '</div>

because the two lines are missing in the template. Can I find them somewhere else our do I have to insert them first somewhere?

Thanks so far,
Katsulynx
Posts: 
400
Reputation: 
20
Posted: August 11, 2011, 10:46 PM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
Those 2 edits do not need to be made since the log-in form on the index.template.php does not exist on Cadence. They are just trying to protect the log in form that is on default as shown below:


So all that you need to do is add the script in the head and your good. Here is the index.template.php if you do not understand(in attachments).
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
15
Reputation: 
2
Posted: August 12, 2011, 4:10 AM  -- Last Edit: August 12, 2011, 4:15 AM by Katsulynx
  • Group: Member
Thanks,
but unluckily the file you attached did not work at all, in fact, it killed the whole style:

I had to use a backup of the index.template.php to get it working again.

Edit: I also replaced the </head> trough the text I should and installed the mod like normal, but it does not work at all...
Posts: 
400
Reputation: 
20
Posted: August 12, 2011, 6:59 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
well I do not know how the mod works but I just answered how to make the modifications to the theme.
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
15
Reputation: 
2
Posted: August 12, 2011, 2:28 PM
  • Group: Member
Okay, no problem at all, then thanks for the help =)
anything