Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Disable Captcha?  (Read 4983 times)

andrewteg

  • Newbie
  • *
  • Karma: 1
  • Posts: 6
Disable Captcha?
« on: September 20, 2007, 10:57:18 pm »

Sorry if this is a repeat but I can't find the right phrase to search for and the MU forum doesn't seem to be checked that often... Is there a way to disable Captcha? I want to use sNewsMU and only allow comments to registered users so I don't really care about the Captcha setting for now...

Thanks,
Andrew
Logged

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
Re: Disable Captcha?
« Reply #1 on: September 21, 2007, 12:50:40 am »

One question: how will you then regulate who registers... or should I say what registers?
Logged

andrewteg

  • Newbie
  • *
  • Karma: 1
  • Posts: 6
Re: Disable Captcha?
« Reply #2 on: September 21, 2007, 02:20:38 am »

Ok, yea, I guess ideally I'd like to have it on registration but not on comment posting. I guess it'll have to be an MU only mod since this possibility doesn't exist outside MU.
Logged

mike1

  • Full Member
  • ***
  • Karma: 6
  • Posts: 199
Re: Disable Captcha?
« Reply #3 on: September 21, 2007, 07:16:12 am »

UNTESTED
Note: Line references should only be used in default sNewsMU package. 

under //COMMENTS or line 1376 change
Code: [Select]
echo mathCaptcha(); to
Code: [Select]
//echo mathCaptcha();and under //COMMENTS or line 1290 change
Code: [Select]
if ($ip == $_SERVER['REMOTE_ADDR'] && (time() - $now) > 4 && $comment && $name && $post_article_id && is_numeric($_POST['calc']) && mathCaptcha($_POST['calc'], $_POST['sum']) && !isset($doublecheck)) {to
Code: [Select]
if ($ip == $_SERVER['REMOTE_ADDR'] && (time() - $now) > 4 && $comment && $name && $post_article_id && !isset($doublecheck)) {
That should disable the Comments Captcha

I haven't tested this because I don't have sNewsMU running anywhere.
Logged

Sheepdisease

  • Jr. Member
  • **
  • Karma: -1
  • Posts: 79
Re: Disable Captcha?
« Reply #4 on: March 08, 2008, 02:01:38 am »

Tried and tested, this code works.
Logged

Sheepdisease

  • Jr. Member
  • **
  • Karma: -1
  • Posts: 79
Re: Disable Captcha?
« Reply #5 on: March 08, 2008, 02:02:46 am »

Having added this code to my installation, could someone please tell me how I would change the captcha from a sum to a series of numbers which appear in an image like most other forums?
Logged

Sheepdisease

  • Jr. Member
  • **
  • Karma: -1
  • Posts: 79
Re: Disable Captcha?
« Reply #6 on: March 08, 2008, 02:06:36 am »

Also, how do I get rid of captcha from the login page?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Disable Captcha?
« Reply #7 on: March 08, 2008, 02:36:02 pm »

How would I change the captcha from a sum to a series of numbers which appear in an image like most other forums?

You could start by using the SEARCH function up in the navigation bar... searching for image captcha would lead you to several links... including this one on Images and Words Captcha.

Also, how do I get rid of captcha from the login page?

The Math captcha is generated by function mathCaptcha in the snewsMU.php file. It is called into three other functions in the snewsMU.php file with - echo mathCaptcha();.
The1st is in the // COMMENTS function.
The 2nd is in the // CONTACT FORM function.
The 3rd is in the // LOGIN function.

To disable the Math Captcha in any of the above functions, simply search the file for echo mathCaptcha(); and you will find each of them. Comment out the string you want disabled by adding a pair of foward slashes - // - to the start of it.

If you want to replace all of the Math Captchas with and Image Captcha... then you would comment out the Match Captcha function and the call-strings in the 3 functions... add in your Image Captcha and replace the function and call-strings with those for the Image Captcha function.
« Last Edit: March 08, 2008, 02:43:57 pm by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Sheepdisease

  • Jr. Member
  • **
  • Karma: -1
  • Posts: 79
Re: Disable Captcha?
« Reply #8 on: March 08, 2008, 03:33:08 pm »

Thank you very much for this information. Now it seems I have an even bigger problem.

I just noticed that if I enter the username: Administrator and do not enter a password, it logs me in regardless and also, after installing the site stats, they appear to anyone who gets an error entering the wrong username, "Current Site Stats
Now Online: 1 | Today: 1 | Yesterday: 0 | Total: 1 | IP: 193.62.51.220
Error

Incorrect username and/or password combination entered.
"
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Disable Captcha?
« Reply #9 on: March 08, 2008, 05:55:53 pm »

Thank you very much for this information. Now it seems I have an even bigger problem.
I just noticed that if I enter the username: Administrator and do not enter a password, it logs me in regardless and also, after installing the site stats, they appear to anyone who gets an error entering the wrong username, "Current Site Stats
Now Online: 1 | Today: 1 | Yesterday: 0 | Total: 1 | IP: 193.62.51.220
Error
Incorrect username and/or password combination entered."

This doesn't happen with my MU-based projects, so you have made a change that caused this to happen.
If you have kept track of what changes you made, then you should be able to trouble-shoot fairly easily. Try disabling whatever changes you made & re-enable your default (un-modded) strings... one mod at a time... until you get it working again. Whichever gets it working again is the mod with the bug in it.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU