09 Click X To Login

Started by Mindless, July 26, 2012, 10:08:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

spark

This is the result



But when the visitor misses the X the links will disappear




to fix that go to the file takelogin.php and find the line

Code (php) Select

$lang = array_merge( load_language('global'), load_language('takelogin') );


Move the entire line to the beginning of the file under the line

Code (php) Select

require_once "include/password_functions.php";
 

Mindless

Credits to Retro :)

Ok heres another excellent mod from one of my favourite coder's = Retro :-P

Its for login and it will hinder bots and bruteforce attacks i guess due to how it works. It places a random X as login button so the postion of the X changes every refresh.

@File login.php find :

Code (php) Select
$HTMLOUT .= "<script type='text/javascript' src='captcha/captcha.js'></script>

Above it add :

Code (php) Select
$value = array('...','...','...','...','...','...');
$value[rand(1,count($value)-1)] = 'X';


Find :

Code (php) Select
<tr>
        <td colspan='2' align='center'>
          <input type='submit' value='{$lang['login_login']}' class='btn' />
        </td>
      </tr>
    </table>";

   
Change to :

Code (php) Select
<tr>
     <td align='center' colspan='2'>Now click the button marked <strong>X</strong></td>
     </tr>
     <tr>
     <td colspan='2' align='center'>";
     for ($i=0; $i < count($value); $i++) {
     $HTMLOUT .= "<input name=\"submitme\" type=\"submit\" value=\"".$value[$i]."\" class=\"btn\" />";
     }
     $HTMLOUT .= "</td></tr></table>";


@File takelogin.php find :

Code (php) Select
if (!mkglobal('username:password:captcha'))
      die();


Change to :
 
Code (php) Select
if (!mkglobal('username:password:captcha:submitme'))
      die();
   
     
Under it add :

Code (php) Select
if ($submitme != 'X')
    stderr('Ha Ha', 'You Missed, You plonker !');