Joined: Mar 01, 2007 Posts: 11 Location: Yorkshire
Posted:
Thu Jul 26, 2007 11:01 pm
As usual found out myself as help on these forums comes very slow and note cos I did not use code tags the number eight comes up as the cool emotion so where ever you see the cool emotion just put the number eight and ); next to it..
This guide will show you in a very simple way how to change the PHPNUKE captcha from 6 to 8 digits.
1) Make sure that your $gfx_chk in the config.php is set to other than 0, normally it is 7 .if you want to use captcha everywhere on all login options.
2) Fire up your mainfile.php in your text editor such as notepad.
Make a search with your text editor to find function loginbox() - it is around line 950 (it might differs from one to another depending on the version of your phpnuke and whether this file has been modified before or not).
Look at the original codings:
function loginbox() {
global $user, $sitekey, $gfx_chk;
3) Now go to module/Your_Account and open the index.php found in the module in your Text editor.
There are quite a number of lines to be changed here, however it is not a so difficult task.
All what you have to do is to change
$code = substr($rcode, 2, 6);
to
$code = substr($rcode, 2, ;
There are 2 places need to be changed in this file (unless you are using a customized or a different set of Your Acount module) (there was three instances in mine so look hard or it will not work) namely at
a) function confirmNewUser($username, $user_email, $user_password, $user_password2, $random_num, $gfx_check)
b) function finishNewUser($username, $user_email, $user_password, $random_num, $gfx_check)
Don't touch any line yet except changing
$code = substr($rcode, 2, 6);
to
$code = substr($rcode, 2, ;
NOW, we have to give an extra 2 spaces in the box for users to write the Security Code.
They are located at 2 places
function main($user) and
function new_user()
4) If you are using a userinfo block or login block where a login is enabled from the block then open your block-Userinfo.php (or whatever the file name which you used for user login) in nuke/blocks.
Thats all folks.
While under no circu mtances that I guarantee this changes will resist against any automated actions 100%, however it can minimize them as you are now using a non-standard PHPNUKE captcha which is is using 6 digits.
Yours is 8!
LATEST
If the captcha is difficult to read i.e. the number does not appear correctly at the center of the image that resulted in an unreadable last figure, then open up your mainfile.php,
at case "gfx" find for this line:
Joined: Feb 06, 2006 Posts: 1840 Location: United Kingdom
Posted:
Fri Jul 27, 2007 2:01 am
Firstly thank you for posting your detailed explanation, I'm sure people will find it extremely useful.
godfather wrote:
As usual found out myself as help on these forums comes very slow and note cos I did not use code tags the number eight comes up as the cool emotion so where ever you see the cool emotion just put the number eight and ); next to it
The RN team try to respond to posts ASAP, but unfortunately everybody does this in their spare time and occasionally it may take a little bit longer for a reply. There is less than 12 hours difference between your first post and your next reply, please be patient. ;o)
Also why not use the code tags? They help to make the posts more readable and also makes it easier to cut and paste the code.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum