Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Tue Sep 18, 2007 8:04 am Reply with quote

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&amp;op=gfx&amp;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 
View user's profile Send private message Visit poster's website
Turk1sh
Newbie
Newbie



Joined: Sep 19, 2007
Posts: 6

PostPosted: Wed Sep 19, 2007 6:38 am Reply with quote

this did not work for me mate. all i get is a blank page after installing this codes.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Wed Sep 19, 2007 8:04 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Turk1sh
Newbie
Newbie



Joined: Sep 19, 2007
Posts: 6

PostPosted: Wed Sep 19, 2007 8:30 am Reply with quote

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...
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Wed Sep 19, 2007 8:58 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Turk1sh
Newbie
Newbie



Joined: Sep 19, 2007
Posts: 6

PostPosted: Wed Sep 19, 2007 9:46 pm Reply with quote

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!!!
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Thu Sep 20, 2007 9:19 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Testy1
Newbie
Newbie



Joined: Jan 06, 2009
Posts: 17

PostPosted: Tue Mar 10, 2009 1:55 am Reply with quote

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
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Tue Mar 10, 2009 7:59 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Testy1
Newbie
Newbie



Joined: Jan 06, 2009
Posts: 17

PostPosted: Tue Mar 10, 2009 5:30 pm Reply with quote

in config downloads is set to 3
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Wed Mar 11, 2009 6:36 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Testy1
Newbie
Newbie



Joined: Jan 06, 2009
Posts: 17

PostPosted: Wed Mar 11, 2009 8:34 am Reply with quote

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 Embarassed

I was hoping you forgot lol
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Wed Mar 11, 2009 9:06 am Reply with quote

Laughing

I have a mind like a steal trap, the problem is getting anything out of it! Shocked
 
View user's profile Send private message Visit poster's website
Testy1
Newbie
Newbie



Joined: Jan 06, 2009
Posts: 17

PostPosted: Wed Mar 11, 2009 6:10 pm Reply with quote

Laughing
 
View user's profile Send private message
nextgen
Newbie
Newbie



Joined: Jan 09, 2007
Posts: 16

PostPosted: Sat Jun 27, 2009 4:26 pm Reply with quote

This worked perfect friends, Thanks so much for this and the NS GRDownloads.
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch
linear-bunch
linear-bunch