2012-10-23, 02:08 AM
2013-01-04, 11:37 AM
Thanks @ poster
2013-01-26, 03:43 AM
Could this be taken further to give a login pin system similar to Libertyreserve or other online banks?
ex;
ex;
2013-01-26, 06:47 AM
Yep.
Assign an id and a name to the form, we shall call it "login". This means, on line 382, replace
with
Two lines above, you will find "print <<<EOF". Add after:
Next, find:
Between the "/>" and the "</div>", add this:
I borrowed some of the code off the internet, specifically here and adapted it to fit Paul's modifications. Remember, it uses JavaScript so an Admin MUST have that enabled to use this, otherwise they can type it out manually.
There shouldn't be any issues, but I did not test this on a MyBB environment, only on a fresh HTML page.
Assign an id and a name to the form, we shall call it "login". This means, on line 382, replace
<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}">
with
<form method="post" action="{$_SERVER['PHP_SELF']}{$query_string}" id="login" name="login">
Two lines above, you will find "print <<<EOF". Add after:
<script type="text/javascript">
<!--
function insertText(pin)
{
document.login.pin.value+=pin;
}
//-->
</script>
Next, find:
<div class="label"{$login_label_width}><label for="pin">Secret PIN</label></div>
<div class="field"><input type="password" name="pin" id="pin" class="text_input" /></div>
Between the "/>" and the "</div>", add this:
<input type="button" name="insertTxt" onClick="insertText('0');" value="0"/>
<input type="button" name="insertTxt" onClick="insertText('1');" value="1"/>
<input type="button" name="insertTxt" onClick="insertText('2');" value="2"/>
<input type="button" name="insertTxt" onClick="insertText('3');" value="3"/>
<input type="button" name="insertTxt" onClick="insertText('4');" value="4"/>
<input type="button" name="insertTxt" onClick="insertText('5');" value="5"/>
<input type="button" name="insertTxt" onClick="insertText('6');" value="6"/>
<input type="button" name="insertTxt" onClick="insertText('7');" value="7"/>
<input type="button" name="insertTxt" onClick="insertText('8');" value="8"/>
<input type="button" name="insertTxt" onClick="insertText('9');" value="9"/>
I borrowed some of the code off the internet, specifically here and adapted it to fit Paul's modifications. Remember, it uses JavaScript so an Admin MUST have that enabled to use this, otherwise they can type it out manually.
There shouldn't be any issues, but I did not test this on a MyBB environment, only on a fresh HTML page.
2013-01-26, 08:52 PM
I still wish there was a way to have to enter multiple pins not just one.
I would have like to enter 10 different pins if I could.
I would have like to enter 10 different pins if I could.
2013-01-28, 11:51 AM
Very helpful! Thanks paul
2013-02-04, 12:46 PM
Very nice dude, thanks heaps for this.
2013-02-04, 04:37 PM
this one must be default option for any admin
2013-04-04, 06:52 PM
Very nice dude, thanks heaps for this.
2013-04-06, 11:57 PM
I want to thank whichever developer added this to the 1.8 core. I have the code on my 1.8 test board set to something similar to what you'd see in an ssh key, then I set my Mac up so that when I type a terminal command, it copies to my clipboard.
It didn't work as perfectly with this modification, for some reason unknown to me. But add this to password protecting directories, and you've probably avoided a lot of the risk of having your ACP compromised.
It didn't work as perfectly with this modification, for some reason unknown to me. But add this to password protecting directories, and you've probably avoided a lot of the risk of having your ACP compromised.