| Author |
Message |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Tue Sep 18, 2007 8:04 am |
|
Yes, it is true, the new captcha that was added as a part of RavenNuke version 2.10.00 causes the NSN GR Download captcha to not work properly. This is actually a good thing, because the older Download captcha is not as strong a captcha any longer. This is what I did to get the NSN GR Downloads to use the new captcha:
=== OPEN FILE ===
modules/Downloads/public/getit.php
=== FIND CODE ===
| Code: |
if ($dl_config['usegfxcheck'] == 1) {
if (extension_loaded("gd")) {
echo "<tr><td><b>"._DL_YOURPASS.":</b></td><td><img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' height='20' width='80' border='0' alt='"._DL_YOURPASS."' title='"._DL_YOURPASS."'></td></tr>";
echo "<tr><td><b>"._DL_TYPEPASS.":</b></td><td><input type='text' name='passcode' size='10' maxlength='10'></td></tr>";
echo "<input type='hidden' NAME='checkpass' value='$random_num'>";
} else {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 8);
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/downloads/code_bg.png")) {
$imgpath = "themes/$ThemeSel/images";
} else {
$imgpath = "images";
}
echo "<tr><td><b>"._DL_YOURPASS.":</b></td><td height='20' width='80' background='$imgpath/code_bg.png' class='storytitle' align='center'><b>$code</b></td></tr>";
echo "<tr><td><b>"._DL_TYPEPASS.":</b></td><td><input type='text' name='passcode' size='10' maxlength='10'></td></tr>";
echo "<input type='hidden' name='checkpass' value='$code'>";
}
}
|
=== REPLACE WITH ===
| Code: |
if ($dl_config['usegfxcheck'] == 1) {
/*****[BEGIN]******************************************
[ Base: GFX Code v1.0.0 ]
******************************************************/
global $modGFXChk, $module_name;
echo security_code($modGFXChk[$module_name], 'stacked');
/*****[END]********************************************
[ Base: GFX Code v1.0.0 ]
******************************************************/
}
|
=== OPEN FILE ===
modules/Downloads/public/go.php
=== FIND CODE ===
| Code: |
if ((extension_loaded("gd") AND $code != $passcode) AND $dl_config['usegfxcheck'] == 1) {
@include("header.php");
title(_DL_PASSERR);
OpenTable();
echo "<center>"._DL_INVALIDPASS."</center><br>\n";
echo "<center>"._GOBACK."</center>\n";
CloseTable();
@include("footer.php");
die();
} elseif ((!extension_loaded("gd") AND $checkpass != $passcode) AND $dl_config['usegfxcheck'] == 1) {
@include("header.php");
title(_DL_PASSERR);
OpenTable();
echo "<center>"._DL_INVALIDPASS."</center><br>\n";
echo "<center>"._GOBACK."</center>\n";
CloseTable();
@include("footer.php");
|
=== REPLACE WITH ===
| Code: |
/*****[BEGIN]******************************************
[ Base: GFX Code v1.0.0 ]
******************************************************/
global $modGFXChk, $module_name;
if (isset($_POST['gfx_check'])) $gfx_check = $_POST['gfx_check']; else $gfx_check = '';
if (!security_code_check($gfx_check, $modGFXChk[$module_name])) {
/*****[END]********************************************
[ Base: GFX Code v1.0.0 ]
******************************************************/
@include("header.php");
title(_DL_PASSERR);
OpenTable();
echo "<center>"._DL_INVALIDPASS."</center><br />\n";
echo "<center>"._GOBACK."</center>\n";
CloseTable();
@include("footer.php");
die();
|
=== DONE ===
Enjoy! |
Last edited by montego on Wed Sep 19, 2007 8:57 am; edited 1 time in total |
|
|
 |
Turk1sh
Newbie


Joined: Sep 19, 2007
Posts: 6
|
Posted:
Wed Sep 19, 2007 6:38 am |
|
this did not work for me mate. all i get is a blank page after installing this codes. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Wed Sep 19, 2007 8:04 am |
|
You must get them exactly right and in the right place. For example, if you accidentally replace too much code, it can do this.
A blank page is PHP parse error (at least in most cases, and definitely in this case). So, maybe a missing { or }?
Also, I only have the code for the latest version which is 1.0.3, so hopefully that is what you have?
If you still cannot get it to work, send both files to me at montego {{AT}} montegoscripts __DOT__ com. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Turk1sh
Newbie


Joined: Sep 19, 2007
Posts: 6
|
Posted:
Wed Sep 19, 2007 8:30 am |
|
well thank you very much, i send you the files to your email. i dont know what i did wrong, i tried like 3 times got the same problem. Thanks for your help... |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Wed Sep 19, 2007 8:58 am |
|
You are right! My bad! Sorry about that. I should know better than to re-code something on the fly. I had it right in my original code the first time.
I have corrected the code above for modules/Downloads/public/go.php.
Please try again. Again, my sincerest apologies,
montego |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Turk1sh
Newbie


Joined: Sep 19, 2007
Posts: 6
|
Posted:
Wed Sep 19, 2007 9:46 pm |
|
Mate your my hero. i thank you very much for all the help. It works perfect, this is just what i`ve been looking for since i installed ravenuke thank again. I`m running a soccer web site with over 4000 visitors daily and i`m putting your link to my Special Thanks List... http://www.goaltube.org if there is anything else i can do for you let me know... Thanks again. Cheers!!! |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Thu Sep 20, 2007 9:19 am |
|
No problem. My pleasure. Nice site, btw, and thanks for the link back. Very much appreciated. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Tue Mar 10, 2009 1:55 am |
|
Would this have changed under RN 2.3.01.As I made the changes but nothing happens.Everything works just no captcha shows up
EDIT: I have double checked and captcha is set to 7
EDIT2: and Use Security Code is on in downloads admin |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Tue Mar 10, 2009 7:59 am |
|
Check also in rnconfig.php that the captcha is enabled for the Download module.
No, nothing should have changed in 2.3.1 as that is what I am also running on this site (well, mostly). |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Tue Mar 10, 2009 5:30 pm |
|
in config downloads is set to 3 |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Wed Mar 11, 2009 6:36 am |
|
Uuggghh, sorry, I forgot to mention that if you are logged in as Admin, you will not see the captcha. That is actually a convenience thing. "Why does an admin ever need to be bothered by a captcha?" was the thinking.
So, may need to check that, because otherwise, this is working fine for me on RN 2.3.1. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Wed Mar 11, 2009 8:34 am |
|
Figured it out this afternoon lol
Could not understand why it worked in chrome and not FF.......................... untill I realised I was logged in as admin
I was hoping you forgot lol |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1139
|
Posted:
Wed Mar 11, 2009 9:06 am |
|
I have a mind like a steal trap, the problem is getting anything out of it!  |
| |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Wed Mar 11, 2009 6:10 pm |
|
|
|
 |
nextgen
Newbie


Joined: Jan 09, 2007
Posts: 14
|
Posted:
Sat Jun 27, 2009 4:26 pm |
|
This worked perfect friends, Thanks so much for this and the NS GRDownloads. |
| |
|
|
 |
|
|