Add secret PIN to ACP login
I just added this to my new forum and it works great.
Thanks @ poster
This user has been denied support. This user has been denied support.
Could this be taken further to give a login pin system similar to Libertyreserve or other online banks?

ex; [Image: VDnWLYQ.png]
MyBB Researcher

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}">


<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)

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.
Please don't PM me for support. Smile
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.
This user has been denied support. This user has been denied support.
Very helpful! Thanks paul
Very nice dude, thanks heaps for this.
this one must be default option for any admin
Very nice dude, thanks heaps for this.
[Image: sundi3yansyah@github.jpg]
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.
PGP Key (Fingerprint: 23B6 F4C0 FE2D 45AA 61A0 1E86 DB87 09DC DD87 6E40)

Forum Jump:

Users browsing this thread: 1 Guest(s)