News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

notCaptcha

Started by fr3aker, February 11, 2011, 12:56:08 PM

Previous topic - Next topic

fr3aker

#40
ok, i found the problem. This appears whenever you have disabled the option "Allow guests to browse the forum". Im working on a bugfix.

//edit: bugfix:
in index.php change the line
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn'))))
to
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn', 'notCaptcha'))))

this will be included in the next version

xrunner

Quote from: fr3aker on February 13, 2011, 12:38:58 PM
ok, i found the problem. This appears whenever you have disabled the option "Allow guests to browse the forum". Im working on a bugfix.

Ah! Great. I'm glad I was able to get that info to you! I look forward to trying the mod again.

aw06

Quote from: fr3aker on February 13, 2011, 12:38:58 PM
ok, i found the problem. This appears whenever you have disabled the option "Allow guests to browse the forum". Im working on a bugfix.

//edit: bugfix:
in index.php change the line
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn'))))
to
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn', 'notCaptcha'))))

this will be included in the next version

Guess i need to make those changes as well ... which index.php file is that..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

aw06

Quote from: xrunner on February 13, 2011, 12:41:24 PM
Quote from: fr3aker on February 13, 2011, 12:38:58 PM
ok, i found the problem. This appears whenever you have disabled the option "Allow guests to browse the forum". Im working on a bugfix.

Ah! Great. I'm glad I was able to get that info to you! I look forward to trying the mod again.

Did you make the change ?? still not seeing the images on your Test Forum..
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

SAW_Cracker

I was getting just a string of the picutes with no sliders so I tried to remove it and now I have an error on my registration page I cant seem to get rid of.


Fatal error: Call to undefined function notCaptcha_AddToRegisterForm() in /home/canesfor/public_html/Sources/Load.php(2172) : eval()'d code on line 378


xrunner

Quote from: aw06 on February 13, 2011, 12:49:26 PM
Did you make the change ?? still not seeing the images on your Test Forum..

I use the test forum to make sure mods work before placing them on my true forum. Since it appeared that this mod didn't work at all, I went to this thread. Now that it is known to only break when guests are not allowed to view the board (which is only set up on my test forum), I am not worried about it, and will use it on my forums.

So on my test forum I'll probably leave it as it is until the mod is updated.

aw06

:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

SAW_Cracker

Can I get some help on removing this mod? I accidently hit delete instead of uninstall and now its really broken :(

fr3aker

#48
uploaded the fixed version of this mod, v1.04

QuoteVersion 1.04 - 13.02.2011
   ! fixed no images showing when guests are not allowed to see the forum
   ? backup your notcaptcha_config.php and newly added pictures, uninstall and install the new version



@ SAW_Cracker:
sounds like the index.template.php didnt get modified (as described on the mods page)

to remove the error, search in your Register.template.php for the string "notCaptcha_AddToRegisterForm();" and remove the whole notCaptcha code block. I cannot tell you why SMF didnt roll back this action.

SMF creates a backup of your forum before installing a new mod (and even before uninstalling an existing one?). It is placed in Packages/backups. Simply restore the backup and everything should work again :)

aw06

Quote from: SAW_Cracker on February 13, 2011, 12:59:47 PM
Can I get some help on removing this mod? I accidently hit delete instead of uninstall and now its really broken :(

You will have to manually reverse all the changes the mod did ... what version of smf are you using ??
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

SAW_Cracker

Thank you so much not sure why but the mod didnt work in tinyportal SMF 2.0 RC5 all I got was a straight line of pictures. no slider

xrunner

OK, got the latest and it works! Thanks for that!

aw06

Quote from: fr3aker on February 13, 2011, 01:03:42 PM
uploaded the fixed version of this mod, v1.04

QuoteVersion 1.04 - 13.02.2011
   ! fixed no images showing when guests are not allowed to see the forum
   ? backup your notcaptcha_config.php and newly added pictures, uninstall and install the new version

Did you add the changes to the mod site ?? when i select 1.1.13 and parse,. i don't see any additional changes for index.php
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

fr3aker

this normally happens when the css/js code is not included.

there might have been a problem while modifying your index.template.php


@aw06:
check the first change of the index.php, it's a very small one ;)

aw06

I'm guessing you made the change differently form how you advised here ?

Quote from: fr3aker on February 13, 2011, 12:38:58 PM
ok, i found the problem. This appears whenever you have disabled the option "Allow guests to browse the forum". Im working on a bugfix.

//edit: bugfix:
in index.php change the line
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn'))))
to
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn', 'notCaptcha'))))

this will be included in the next version
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

fr3aker

no, its exactly the same change, but formulated more general

the parser says:
Find:
'activate', 'smstats', 'help', 'verificationcode'
Add After:
, 'notCaptcha'

(for SMF 1.1.x)

aw06

o ok, gotcha ... updated... :)
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

belzerg

"can't open file" message on white screen upon installation. It cannot create a directory somewhere or what is it related to? "test" folder is present in Packages and notCaptcha_v1.04.zip is 777

fr3aker

this error appears when the script was unable to write the config file (notcaptcha/notcaptcha_config.php), so there are permission problems with the notcaptcha folder.

To manually generate the config, ste the permissions of the notcaptcha folder at least to 775, extract the file "generate_config.php" from the zip archive, add the line "$boarddir = '.';" at the beginning of this file, upload it to your forum's root directory and run it once. Afterwards you can delete the generate_config.php.

Else you can simply upload the config file manually:
<?php
/*
* Based on myWebNotCaptcha 1.2 for Wordpress
* Created by WebJema 2009
* notcaptcha.webjema.com
*
* Simple Machines Forum(R) modification by fr3aker
*/

if (!defined('SMF'))
die('Hacking attempt...');

# gallery folder
$modSettings['notCaptcha']['notcaptcha_imgdir'] = 'notcaptcha/gallery';

# angles of images, you should not add additional angles
$modSettings['notCaptcha']['notcaptcha_angles'] = array(06090135180225270300);

# NOTCAPTCHA image size (width and height)
$modSettings['notCaptcha']['imagesize'] = 50;

# NOTCAPTCHA colors (RGB, 0-255)
$modSettings['notCaptcha']['notcaptcha_delim_color'] = array(000);

# JPEG quality of NOTCAPTCHA image (bigger is better quality, but larger file (image) size). The maximum value is 100
$modSettings['notCaptcha']['notcaptcha_jpeg_quality'] = 75;

// background color
$modSettings['notCaptcha']['nc_back_r'] = 255;
$modSettings['notCaptcha']['nc_back_g'] = 255;
$modSettings['notCaptcha']['nc_back_b'] = 255;

// add noise dots to images; can be true or false; false=disable
$modSettings['notCaptcha']['nc_addnoise'] = false;

// key to encrypt cookies with, enter something random here
$modSettings['notCaptcha']['nc_cookie_enc'] = 'Some%c0mp3lt1y r4ndom$tufF';

/* end of notcaptcha_config.php */
?>


you should only change the value of $modSettings['notCaptcha']['nc_cookie_enc'] to something unique.

labradors

Just downloaded and installed v1.04 of the mod, but with my theme (in which I only changed the colours, so I don't even have a Register.template.php file, but just let the default one be used), I get eight pictures and no sliders.  I do have a few other add-ons installed, but if I switch back to the "SMF Default Theme - Core," I get three pictures and the sliders ARE there.

For what would I need to look to find whatever is causing this problem?

Thank you.

Advertisement: