Anti-Bot Registration Puzzles v1.2.0.1 (Updated for SMF 2.0 RC2)

Started by Marcus Forsberg, January 28, 2008, 07:52:11 PM

Previous topic - Next topic

xrunner

Quote from: karlbenson on May 15, 2008, 05:31:49 PM
You'll have to uninstall in descending order that you installed them. (most recent first).

For me it uninstalls, installs perfectly everytime, the only thing i can think is that another mod has modified the same file afterwards.

Just tried that - no go.
How can I fix this manually so I can get the latest ones installed?

karlbenson

You would have to manually uninstall them.

Note, I have actually used both of them mods recently on two of my forums, and uninstalled, reinstalled both without an issue.
So its strange that your getting an issue.

xrunner

Quote from: karlbenson on May 15, 2008, 05:41:49 PM
You would have to manually uninstall them.

Note, I have actually used both of them mods recently on two of my forums, and uninstalled, reinstalled both without an issue.
So its strange that your getting an issue.
Where can I find that procedure for your mods?

karlbenson

Put the mod package (the version you've got in the packages folder on your site) through a package parser
http://www.adrevenueshare.com/parser

xrunner

#44
Quote from: karlbenson on May 15, 2008, 06:00:21 PM
Put the mod package (the version you've got in the packages folder on your site) through a package parser
http://www.adrevenueshare.com/parser
Oh, never seen that tool. I'll try it thanks a lot!

Could I also just replace those files (register.template.php, etc.) with pristene ones if no other mods have modded them?

karlbenson

possibly.

But i'd recommend backing up both files and database before undertaking it.

xrunner

Quote from: karlbenson on May 15, 2008, 06:00:21 PM
Put the mod package (the version you've got in the packages folder on your site) through a package parser
http://www.adrevenueshare.com/parser

I fixed all the problems manually with the aid of the parser. I also learned a lot from doing the manual process.
Thanks for the link, it's a lifesaver.

Night09

#47
Firstly running 1.1.4 with my own theme.

On install it shows that it is sucessfull as follows

QuoteInstalling this package will perform the following actions:
1. Execute Modification    .Sources/Register.php  Test successful
2. Execute Modification   .Themesdefault/Register.template.php Test successful
3. Execute Modification   .Themesdefault/languages/Modifications.english.php Test successful
4. Execute Modification   .Themesdefault/languages/Modifications.english-utf8.php Skipping file
5. Execute Modification .Themesdefault/languages/Modifications.english_british.php Skipping file
6.Execute Modification  .Themesdefault/languages/Modifications.english_british-utf8.php  Skipping file                     
                     
                     
                                                           
                     
                     
                     

But after install on the top of each page I get this showing

Quote$txt['puzzle_colors'] = 'Which word is the same as its color'; $txt['puzzle_math'] = 'What is the sum of (as a number)'; $txt['puzzle_shapes'] = 'How many %s does a %s have?'; $txt['puzzle_shapes2'] = 'How many %s does an %s have?'; $txt['puzzle_sides'] = 'sides'; $txt['puzzle_corners'] = 'corners'; $txt['puzzle_incomplete'] = 'You did not complete the anti-bot puzzle. Please try again.'; $txt['puzzle_incorrect'] = 'You incorrectly answered the anti-bot puzzle. Please try again.'; $txt['puzzle_antibot'] = 'Anti-bot measure'; $txt['puzzle_red'] = 'Red'; $txt['puzzle_orange'] = 'Orange'; $txt['puzzle_yellow'] = 'Yellow'; $txt['puzzle_green'] = 'Green'; $txt['puzzle_blue'] = 'Blue'; $txt['puzzle_purple'] = 'Purple'; $txt['puzzle_pink'] = 'Pink'; $txt['puzzle_black'] = 'Black'; $txt['puzzle_grey'] = 'Grey'; $txt['puzzle_triange'] = 'Triangle'; $txt['puzzle_square'] = 'Square'; $txt['puzzle_rectangle'] = 'Rectangle'; $txt['puzzle_pentagon'] = 'Pentagon'; $txt['puzzle_hexagon'] = 'Hexagon'; $txt['puzzle_heptagon'] = 'Heptagon'; $txt['puzzle_octagon'] = 'Octagon'; $txt['puzzle_1'] = 'ONE'; $txt['puzzle_2'] = 'TWO'; $txt['puzzle_3'] = 'THREE'; $txt['puzzle_4'] = 'FOUR'; $txt['puzzle_5'] = 'FIVE'; $txt['puzzle_6'] = 'SIX'; $txt['puzzle_7'] = 'SEVEN'; $txt['puzzle_8'] = 'EIGHT'; $txt['puzzle_9'] = 'NINE'; $txt['puzzle_10'] = 'TEN'; $txt['puzzle_11'] = 'ELEVEN'; $txt['puzzle_12'] = 'TWELVE'; $txt['puzzle_13'] = 'THIRTEEN'; $txt['puzzle_14'] = 'FOURTEEN'; $txt['puzzle_15'] = 'FIFTEEN'; $txt['puzzle_16'] = 'SIXTEEN'; $txt['puzzle_17'] = 'SEVENTEEN'; $txt['puzzle_18'] = 'EIGHTEEN'; $txt['puzzle_19'] = 'NINETEEN';

It also makes the forum look like it has been zoomed into as if I am running at 800x600.

The only language file in my custom themes folder is Settings.english.php and as far as I can tell from the instructions its not the file needed to be edited.

Have I overlooked something maybe ?

karlbenson

Edit

Themes/default/Modifications.english.php
(if you use utf8 language files, this file aswell)
Themes/default/Modifications.english-utf8.php

FIND
?>

MOVE it right to the very bottom of the file and on a new line.

Night09

Sorted it now, it was the closer as you say had been left in the wrong place in the file.

Just for info it was caused by Arcade being present in the file and the closer was attached to the end of an arcade line.

Cheers Karl ;)

ddarrell

I finally decided to register and thank those whose mods I have used.

This installed flawlessly, and works correctly.

Thanks.

darrell
i know just enough to really screw up ;D

genieuk

#51
HI,

I just installed and only thing i got missing is the actual calculation

for example 7 +2 =

see screen shot attached.

What have I done wrong?

I am using a custom theme but my custom theme does not use it's own Register.template.php so i skipped the first bit below and done the rest. Please help.

A Manual edit will be required for ALL themes (other than SMF Default Core Theme) which have a custom Register.template.php
If you don't perform the manual edit, nobody will be able to register using those themes.

OPEN Register.template.php (in each folder Themes/{themename/ )
FIND
   // Are there age restrictions in place?
   if (!empty($modSettings['coppaAge']))ADD BEFORE
Code: [Select]
// Start of Anti-bot Registration Puzzles Mod
   echo '<tr valign="top">
            <td width="40%" valign="top">
               <b>'.$txt['puzzle_'.$context['puzzle'][0]].'</b><br />
               '.$txt['puzzle_antibot'].'
            </td>
            <td>
               '. ( empty($context['puzzle'][1]) ? '' : $context['puzzle'][1].'<br />' ) .'
               <input type="text" name="'.$context['puzzle'][2].'" size="30" value="" tabindex="', $context['tabindex']++, '" />
            </td>
      </tr>';
   // End of Anti-bot Registration Puzzles Mod


If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if your using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

Thank you,
Mathew

karlbenson

Genie.
There are different puzzles.  The one on that page is "How many sides to a pentagon" rather than a math calculation.
If you refresh you should get a different puzzle.

genieuk

I really think this is a great mod but have removed it.

You may think i am thick but pentagon, hectagon cant remember exactly what they called, i did not know what they was myself lol.

So to be on safe side i removed it, would be better i think if it was just simple calculations like 7 + 8 = or 9 - 7 etc.

Did you say it was keystage 2 primary education?

Ifso i did not learn them when i was in school.

Please do not think i am critising as it still a fantastic mod but just not for me.

Regards,
Mathew

Sabre™

hahaaa..
Dont feel bad mate, I guarantee you arent the only one to have problems with some of the puzzles.       *whistles
Adding a note reminding your users that if they refresh the page, another puzzle they may be familiar with will appear, usually helps.
Thats what   <cough> I </cough>  did  ;)
Dagnabit!  I left my schoolin at school ok!!?? lol
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


genieuk

Quote from: Sabre™ on October 05, 2008, 05:25:12 PM
hahaaa..
Dont feel bad mate, I guarantee you arent the only one to have problems with some of the puzzles.       *whistles
Adding a note reminding your users that if they refresh the page, another puzzle they may be familiar with will appear, usually helps.
Thats what   <cough> I </cough>  did  ;)
Dagnabit!  I left my schoolin at school ok!!?? lol

I left my Schoolin at school aswell, lol


karlbenson

LOL.

If necessary you could always remove the puzzles that you don't want by removing it in the code.

Sources/Register.php
find and remove
'shapes' => create_function('', '
$a = array(0 => "sides", 1 => "corners");
$b = rand(0,1);
$c = array(\'square\' => 4, \'rectangle\' => 4, \'pentagon\' => 5,
\'hexagon\' => 6, \'heptagon\' => 7, \'octagon\' => 8);

$d = array_rand($c); // randomly select a shape
$e = $c[$d]; // the answer
global $txt;
$txt[\'puzzle_shapes\'] = sprintf(($d == \'octagon\' ? $txt[\'puzzle_shapes2\'] : $txt[\'puzzle_shapes\']), $txt[\'puzzle_\'.$a[$b]], $txt[\'puzzle_\'.$d]);
return array(\'shapes\', \'\', md5($e));
'),

genieuk

mmmmm, i thought i read somewhere it is hard coded so cant be done?

Mat

karlbenson

If you remove that. That puzzle can't be randomly chosen.

Leaving the two math puzzles, and the color puzzle.

sunita

Hi - It is a very nice mod.

I have a small problem after installation. Puzzle is being asked twice, not sure why?

Forum page hxxp:ping4help.com/index.php?action=register [nonactive]

Advertisement: