Link to the mod (https://custom.simplemachines.org/index.php?mod=2182)
Avatar Verification v1.5
By Akyhne (http://custom.simplemachines.org/mods/index.php?action=profile;u=144421)
CompatibilityFor SMF 1.1.x (No new features are added)
For SMF 2.0, SMF 2.1 Alpha 1
RequirementsGD-lib 2.x
IntroductionREQUIRED: A manual edit is REQUIRED for ALL themes (other than SMF Core Default) which have a custom Register.template.php
If you don't do perform the edit, nobody will be able to register using those themes.
Featureso Adds a verification of 10 avatar images when people try to register
o Uses images from the forums avatar folders. You can control which folders to use*
o Adds bans to the ban list on failed attempts. Can be disabled in the admin center.
o Decide how long people should be banned by first hacking attempt
o Decide how long people should be banned by the following hacking attempt(s)
o Receive email on every bann attempt, only continousy ban attempts, or disable email
o If there's not enough avatars in the forum, a simple image with numbers are used
*) As standard, the standard avatar folders of SMF are used (For SMF 1 & 2.0.x Actors & Musicians, for SMF 2.1 Oxygen)
InstallationSimply install the package to install on the SMF Default Core Theme ONLY.
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.
UnistallationJust uninstall the mod as usual from the package center.
Where to change settings for the modIn SMF 1.1.x: Goto the admin center, choose registration -> Settings
In SMF 2.0 xx: Goto the admin center -> Security and Moderation -> Anti-spam
Additional NotesGD lib is required for the mod to work.
Note that GD Lib cannot create thumbs from corrupted images. That you can view images via your browser, doesn't nessescarily mean they are not corrupted. Check your avatars! You best do that by trying out the mod several times to see if some avatars are not generated.
Servers that have Sleep() disabled, will give an error in the log. I have no solution, but to enable the sleep function! Ask your host.
Supported languages(http://www.simplemachines.org/site_images/lang/danish.gif) Danish
(http://www.simplemachines.org/site_images/lang/dutch.gif) Dutch
(http://www.simplemachines.org/site_images/lang/english.gif) English
(http://www.simplemachines.org/site_images/lang/english_british.gif) English British
TranslatorsThanks to the translators who bothered making a translation:
Dutch by JulesW (http://www.simplemachines.org/community/index.php?action=profile;u=221464)
Changelog1.0 beta 1 - 18th December 2008o First beta
o SMF 2.0 support
1.0 beta 2 - 19th December 2008o Made a few functions to make the code more right
1.0 beta 2 rev. 1 - 20th December 2008Edited some texts
1.0 beta 2 rev. 2 - 05th February 2009Few edits and checked the mod to work with SMF 1.1.8 and SMF 2.0 Beta 4
1.0 beta 2 rev. 3 - 22th May 2009Checked the mod to work with SMF 1.1.8 and SMF 2.0 RC1-1
1.0 beta 2 rev. 4 - 1st June 2009When guest access was disabled, the mod didn't show the images.
1.0 beta 2 rev. 5 - 9th August 2009Corrected a few small errors when spiders checked old links
1.0 beta 2 rev. 6 - 3rd October 2009! Corrected an error that made errors in the log when the mod was disabled.
! Corrected that png files didn't work
+ Made a check for jpg, gif and png files only
+ Splitted the languages from the installation files
! Corrected a helptext in SMF that should not be there
+ Added Dutch language
1.0 beta 3 rev. 1 - 3rd October 2009+ SMF 2 RC2 support
1.0 beta 3 rev. 2 - 27th October 2009! When logged in users browsed to the register page, errors were generated in the log
1.0 beta 3 rev. 3 - 7th November 2009! Corrected an error in the Dutch language
1.0 beta 3 rev. 4 - 9th November 2009+ Added final SMF 2.0 RC2 support
! Split the language files into UTF-8 and non UTF-8 files
1.0 - 7th December 2009! Fixed .gifs could make an error and not being generated
+ Finally went out of beta :)
+ Improved stretch and rotation of images
+ Cleaned up code to use divs instead of tables (RC2 version only)
1.1 - 27th April 2010Added RC3 support
! Added a fix provided by butchs
1.2 - 24th May 2010! Fixed spiders generating errors in the error log
1.3 - 2nd November 2010+ Made an update to work with SMF2 RC4
1.4 - 14nd December 2010- Removed SMF 2 RC1.xx support
+ Added redirect to the modsettings after installation
! Fixed users without an avatar got a default avatar when saving their profile
! Fixed GD 2.0 doesn't support rotate
1.4.1 - 7nd January 2011! Changed the mod to use $modSettings['avatar_directory'] to make sure the mod works with a custom avatar folder (thanks to baggeroli for the idea).
1.4.2 - 12th february 2011+ Upgraded to SMF 2 RC5 and SMF 1.1.13
1.4.3 - 17th June 2011+ Upgraded to SMF 2.0
- Removed official support of RC's, although the mod will still work with those in an emulated enviroment
! Fixed avatars using tables in SMF 1
1.4.4 - 10th June 2012+ SMF 2.0.2 support (no changes)
1.5 - 17th November 2012+ Added SMF 2.1 (Alfa) support
! Fixed mod not working with SEF support (Tested with SimpleSEF & PortaMx SEF).
! Fixed the verification not showing up, when the registration agreemenent is not in use.
Congrats! Very good!
Congratulations on the official release!!
Today I switched from the cavecost captcha to this mod, and had several members successfully registered for the forum, and 1 one hr ban :) However later today I had a member that generated 40 pages worth of error messages in the log.
Quotehttp://www.bitethebullet.dk/index.php?PHPSESSID=f3c7d3fc10b7d95b6f0494bec300722f&action=register
8: Undefined index: member
File: /customers/bitethebullet.dk/bitethebullet.dk/httpd.www/Sources/Profile.php
Line: 3279
There was also one error in the log that is the same as the above mentioned, but in line 3260.
Any idea what's happening here?
Appreciate any input!
I can't tell you. Your file path looks very odd and my profile.php in SMF 1.1.x forums only have ~3000 lines of code and for SMF 2 ~800 lines.
You must have other mods installed that altered that file.
I do have other mods installed, and you're right. This bit of code is from the ultimate profile mod.
My apologies.
A completely unrelated question: Did you get a lot of complaints from users that didn't know how to complete the cavecost captcha? Ppl don't seem to read the instructions and just fill in the whole thing. That's one of the reasons we switched to this mod instead/
No, I never had any complains. But I think the Capthca mod is to complicated for registrants to use, hence this mod.
I'm sorry to bother you again, but I seems I've been wrong. The code that generates the error is from this mod, but the reason my profile.php is bigger is because of the ultimate profile mod. it is the
'checked' => $context['user']['is_guest'] ? '' : in_array($context['member']['avatar']['server_pic'], array('', 'blank.gif')),
and
'checked' => $context['user']['is_guest'] ? '' : $line == $context['member']['avatar']['server_pic'],
part of the code.
I would really appreciate it if you could take a look at the file and see if there's anything wrong with it.
Today there was another user that generated 80! pages of the error I mentioned above...
Today I found out what triggers the errors. Every time a user is logged in to the forum and surfs to forumurl.dk?action=register from the history, 14 pages worth of the errors are generated.
I'll take a look on it. However it's very unlikely that a user would browse that way. Sure it's not a bot?
I'm sure they're users, cuz I when browsed the same way and generated the errors. I think that if it's the first link in the browsing history people will just hit enter on the first link that takes them to a page, regardless the action at the end of the url.
Found the "bug". Will be releasing a new version soon. Thanks for the notice!
Ah great!
Can't wait for the new version. Deleted 212 pages with errors today :D
New version released.
Changelog:
1.0 beta 3 rev. 2 - 27th October 2009
! When logged in users browsed to the register page, errors were generated in the log
I got this feedback of a user:
blanc screen when using Safari
IE en FF are working ok
No issues for me with Safari for Vista.
Very nice mod mate!
I was working on a similar thing I had seen elsewhere, in which you would drag the chosen image into a box to confirm you weren't a bot.
Any how, I just installed this on my local, and I'm getting these 2 errors
2: imagecopyresampled(): supplied argument is not a valid Image resource
File: \Sources\Subs-CaptchaAvatar.php
Line: 110
2: imagedestroy(): supplied argument is not a valid Image resource
File: \Sources\Subs-CaptchaAvatar.php
Line: 111
Do you have any idea why this is?
Cheers :)
EDIT:
Just tried it online on a test site and received these, but not the above errors
2: sleep() has been disabled for security reasons
File: /Sources/Register.php
Line: 599
2: sleep() has been disabled for security reasons
File: /Sources/Register.php
Line: 714
EDITS EDIT:
Just changed the error code, as I just tried it on a fresh install.
The first error, I guess, is because some of your image files are corrupted. The second one, I'll have to look further into.
Today I had a ip that upon googling was listed as a spam server on the honeypot website, and generated errors in the log.
Quote2: Invalid argument supplied for foreach()
File: /Sources/Subs-CaptchaAvatar.php
line:16
Quote8: Undefined index: AvatarsToShow
File: /customers/bitethebullet.dk/bitethebullet.dk/httpd.www/Sources/Subs-CaptchaAvatar.php
line 8
last one is repeated for line 16
any idea why this is?
i got a error on the dutch "help.dutch.php"
Parse error: syntax error, unexpected T_STRING in /mnt/web6/40/02/51993402/htdocs/forum/Themes/default/languages/Help.dutch.php on line 499
499: $helptxt['verification_avatar_folders'] = 'Deze mod maakt gebruik van uw standaard avatar map "Actors" en "Musicians".<br />Als u plaatjes uit een andere submap in de avater map wilt gebruiken kunt u deze hier opgeven, gescheiden door komma/'s.<br /><br /><b>Nb</b>: Wees voorzichtig bij deze selectie. Er zouden prive folders bij kunnen zitten waarvan u liever niet wilt dat deze openbaar worden! Het zou kunnen voorkomen dat er identieke plaatjes in de mappen zitten. Dit maakt het onmogelijk voor gebruikers het juiste plaatje te selecteren.<br /><br />De maker van deze mod, raad u aan de mod <a href="http://custom.simplemachines.org/mods/index.php?mod=644" target="blank">Country Flags Avatars</a> te instaleren. Deze voegt 259 verschillende vlaggen toe aan uw avater folder in een submap "CountryFlags".';
500: $helptxt['verification_avatar_first_ban'] = 'De eerste keer dat een gebruiker de test niet doorstaat, wordt hij/zij geband voor het hier opgegeven aantal uren. Standaard is ingesteld op 1 uur.';
501
Does someone know the problem?
Gr
i think its something with the (') sign (don't know the word in english :-X )
Shouldn't that sign end with /' ?
Gr
Hmm, komma/'s should be komma\'s:
Quote$helptxt['verification_avatar_folders'] = 'Deze mod maakt gebruik van uw standaard avatar map "Actors" en "Musicians".<br />Als u plaatjes uit een andere submap in de avater map wilt gebruiken kunt u deze hier opgeven, gescheiden door komma\'s.<br /><br /><b>Nb</b>: Wees voorzichtig bij deze selectie. Er zouden prive folders bij kunnen zitten waarvan u liever niet wilt dat deze openbaar worden! Het zou kunnen voorkomen dat er identieke plaatjes in de mappen zitten. Dit maakt het onmogelijk voor gebruikers het juiste plaatje te selecteren.<br /><br />De maker van deze mod, raad u aan de mod <a href="http://custom.simplemachines.org/mods/index.php?mod=644" target="blank">Country Flags Avatars</a> te instaleren. Deze voegt 259 verschillende vlaggen toe aan uw avater folder in een submap "CountryFlags".';
Yes, changed it and it works!
Gr
Released a new version.
Quote from: Akyhne on November 07, 2009, 10:26:55 AM
Released a new version.
I checked for you and see it is also wrong in Help.dutch-utf8.php ;)
Gr
Thanks! Made a silent update.
Good work Author.
Nice mod. I am going to use it. I installed it on SMF 2 RC2.
During testing I was getting the following errors:
QuoteGuest
Type of error: General
index.php?action=verificationsimages&avatar=7313ed2f39f10796d1d5fc7ad0fae030&type=22: imagedestroy(): supplied argument is not a valid Image resourceFile: /bla bla.../smf/Sources/Subs-CaptchaAvatar.php
Line: 118
I notice that some of my avatar files had ".JPG" on the end so I changed them all to ".jpg". I think I fixed the error? I will find out in a day or two.
Another thing was that with my browser the images were going out the container edge for the board. I looked at converting it to div's but it looked like too much work.
So I searched in "Register.template.php"
<tr>';
foreach ($_SESSION['AvatarsToShow'] as $imgInfo)
{
echo '
<td>
<a id="vim'.$imgInfo[1].'" href="javascript:verifyImage(\'vim'.$imgInfo[1].'\', \'' . $scripturl. '?action=verifyimage&verifycode='.$imgInfo[1].'&rand=' . $_SESSION['avatar_rand'] . '\')"><img style="border:#FF0000 2px solid" src="' . $scripturl. '?action=verificationsimages&avatar='.$imgInfo[1].'&type=2" alt="" /></a>
</td>';
}
and changed it to:
<tr></tr><tr>';
$AvatarCtr = -1;
$AvatorEnd = count($_SESSION['AvatarsToShow'])/2;
foreach ($_SESSION['AvatarsToShow'] as $imgInfo)
{
// echo count($_SESSION['AvatarsToShow'])/2;
$AvatarCtr++;
if ($AvatarCtr == $AvatorEnd) {
echo ' </tr><tr>'; }
echo '
<td>
<a id="vim'.$imgInfo[1].'" href="javascript:verifyImage(\'vim'.$imgInfo[1].'\', \'' . $scripturl. '?action=verifyimage&verifycode='.$imgInfo[1].'&rand=' . $_SESSION['avatar_rand'] . '\')"><img style="border:#FF0000 2px solid" src="' . $scripturl. '?action=verificationsimages&avatar='.$imgInfo[1].'&type=2" alt="" /></a>
</td>';
}
a little hokey but it seems to work for me... :-X
It's been almost a year since I did the mod. But as I remember, if there's less than 10 avatars but more than three, it will use avatars, else it will use some simple generated images.
This means that the number of avatars can be an unequal number, like 7. So with your method, you have to use round or something to get an integer to make the new row.
AS for .JPG, it shouldn't be an issue, unless there's a bug im SMF 2. I use a function build in to SMF to find the avatars. But I'll have to check.
The hack will work for me since I have over 100 avatars for it to pick from. Good to know so I can change it when I go for SMF 2RC3.
My site is case sensitive. If the case does not match it is an error. I am still getting some errors after changing to lower case. The amount is much much less. It could be an improperly saved avatar (i.e. saved as a png but with jpg extensions). Or it could be weird characters. I Just edited them. Not sure... Since it is now only 1 in 5 or 6 refreshes I am not sure it is much of a problem to me. Just noting observations.
If you are interested, I can look at a possible starting point draft plan to go tableless since I have a little experience with that stuff.
It's actually amazing how many avatars are broken or corrupted. I figured that out during my time at Simple Machines, and since I created this mod. Maybe I should make a "check for corrupted avatars" at some point.
The mod does not use more than 10 random avatars at any given time.
Locating corrupted avatars is like finding a needle in a haystack.
Actually not. If GD can open the images, they are not corrupted.
GD Lib. I do not know much about it. Where is it? Is it part of SMF?
GD is a plugin to php that makes it possible to create, resize, crop, rotate images, as I do with this mod. Most servers supporting php, also supports GD.
The standard Captcha verification in SMF, also makes use of GD to create the verification image.
Quote from: Akyhne on October 31, 2009, 06:19:23 AM
The first error, I guess, is because some of your image files are corrupted. The second one, I'll have to look further into.
Cheers mate, I moved the extra images(corrupted) into a folder other than that which I use for this mod, and that eliminated the first error I received.
The second still persists within your updated version, just on different lines.
sleep() has been disabled for security reasons
.../Sources/Register.php
Line: 660
sleep() has been disabled for security reasons
..../Sources/Register.php
Line: 775
Quote from: Sabre™ on December 04, 2009, 04:36:09 PM
Cheers mate, I moved the extra images(corrupted) into a folder other than that which I use for this mod, and that eliminated the first error I received.
Are those avatars part of official avatar packages from the mod site? It's actually a big problem that many avatars are corupted, but it's not alway easy to discover.
Yeah mate they are from the mod site, but I couldn't tell you which packages, as I added multiple to one package.
I can however tell you that they are all from 'movie' packages, and cartoon/anime packages.
Apparently, I ran out of broken images, Sabre. Could I get you to send me the avatars on my email? I need some files to test with.
Sure mate, just pm me your email and I'll send em through :)
Ok, I finally got time to look at the mod. As for names of files, it doens't mean anything, wether the name of the file (including extension) is capitalized. The bug was due to an error with gifs in rare cases.
This also solved the bug
2: imagecopyresampled(): supplied argument is not a valid Image resourceFile: \Sources\Subs-CaptchaAvatar.phpLine: 1102: imagedestroy(): supplied argument is not a valid Image resourceFile: \Sources\Subs-CaptchaAvatar.phpLine: 111
As for the images from Sabre, none of them were corrupted, but again it was because of the gif issue. I just never discovered the error myself, as I never had any gifs as avatars.
As for
sleep() has been disabled for security reasons..../Sources/Register.phpLine: 775
it's a server issue that I can do nothing about. Some hosts seems to disable the sleep() function, although it hasn't anything to do with sequrity. Ask your host to enable it.
As requested by butchs, I made the registration verification tableless, but only for RC2 installations. This means that images will break to a new line, when there's not enough width to show the images.
There will be no more developement for earlier SMF versions, except if bugs are found.
Finally, I took the step to go out of beta, so we are now at version 1.0.
Works great. No more image errors on my system. :D
I tried to manually upgrade to version 1.0 final, and found some pieces of code twice in register.template.php, but when I deleted the double bits of code, I get a template parse error. I am unable to find the error so would you be so kind to take a look at the file and see if you can fix it?
original file is attached
Much appreciated!
edit: never mind: found the error. There was a } missing....
Could the double code in this file be the cause of the errors I've occasionally been getting before?
I guess not as a I had 5 pages worth of errors this morning.
Quote2: Invalid argument supplied for foreach()
File: /Sources/Subs-CaptchaAvatar.php
Line: 16
Quote8: Undefined index: AvatarsToShow
File: /Sources/Subs-CaptchaAvatar.php
Line: 16
and
Quote8: Undefined index: AvatarsToShow
File: /Sources/Subs-CaptchaAvatar.php
Line: 8
Any clue what I can do about it?
The old installation apparently failed. You will have to check again for code not being uninstalled properly.
I've been going through all the files modified by this mod, but no more double code exists in the files.
Edit: maybe this helps: the URL that is causing these errors is:
/index.php?action=verificationsimages&avatar=e8e07b82ad9c11809688d23377628e01&type=2
and if I click it, it generates the errors again... but with different url:
/index.php?action=verificationsimages&amp;avatar=e8e07b82ad9c11809688d23377628e01&amp;type=2
I have 2 questions:
1. It says on the installation: "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."
I'm using RC2 Curve. So.. what is this edit I'm required to do? Or do I have to figure it out by myself?
2. In the option: "Folders from which to use avatars as verification", what format should I use?
/avatars/dogs ?
avatars/dogs ?
ht*p://mysite.com/avatars/dogs ?
Right now I only have numbers in boxes, no images, but the mod looks awesome. Thanks for posting it.
QuoteI'm using RC2 Curve. So.. what is this edit I'm required to do? Or do I have to figure it out by myself?
Only when your theme has its own register.template.php you have to manually edit it. You can use a package parser to see what edits to make. (Click on manual install instructions at the download site.)
Quote2. In the option: "Folders from which to use avatars as verification", what format should I use?
dogs
Today I finally recreated the error myself. When I went to the registration page, I got the picture to match, but some of the pictures to choose from were big red crosses (screenshot: (http://img69.imageshack.us/img69/6047/screenshotks.png)), instead of the pictures to choose from. when if refreshed (F5) it gave me the normal page with 10 images, and I could proceed to the registration process.
I got a similar result(initial release) when the images were corrupt, so I only use the default avatars for this section.
I pretty sure these images are not corrupt. (I've sent them to the modmaker earlier, and he checked them)
Also as a test: I put 10 image files in the default folder, and everything worked fine, but after I restarted the browser and refreshed a few times this was the result:
(http://img13.imageshack.us/img13/4263/screenshot2rr.png)
Oh yep.
Have you tried this with only the default avatars with the same result?
Yes I have, same result (Only actors and musicians)
Sorry, atm I really don't feel like working on mods.
I guess I have to accept the errors every once in a while, or remove the mod....
FYI: The same thing happens on a freshly installed forum (2.0rc2) with ONLY this mod installed, so I guess its not an incompatibility with other mods.
I can't create that error.
http://www.worldofgt.com/index.php?action=register
http://smf.e-debatten.dk/index.php?action=register
First visit to worldofgt.com:
(http://img708.imageshack.us/img708/9641/screenshotit.png)
What browser are you using?
Epiphany
Stress tested the site with 4 browsers - Opera, Safari, Chrome and Firefox for 5 minutes. Didn't get an error once.
Weird... If it only happens with Epiphany, it does explain why it happens only sporadically. Not a lot of people will use that browser. I'll see if I can get errors with another browser.
Guess it's a bug in your browser, as the 5 browsers I use don't have the errors.
Just happened to me with chrome as well, and presumably with other peoples browsers too, as I regularly have these errors in the log of the forum.
Screenshot of chrome: (http://img6.imageshack.us/img6/9624/screenshot1kz.png)
I am getting complaints that images are x'ed out (I know one has IE8) and have several pages of the following errors in the log:
index.php?PHPSESSID=b431a0564614d0414bd57157379695fe&action=verificationsimages&avatar=f6b339aa2714e3d97416c9fc540cefc3&type=22: Invalid argument supplied for foreach()File: ...Sources/Subs-CaptchaAvatar.php
Line: 16
index.php?PHPSESSID=b431a0564614d0414bd57157379695fe&action=verificationsimages&avatar=f6b339aa2714e3d97416c9fc540cefc3&type=28: Undefined index: AvatarsToShowFile: .../Sources/Subs-CaptchaAvatar.php
Line: 16
I like this mod so much I tried to fix it. Attached is my attempt to get rid of the errors.
It does look like it is working on RC3.
:)
Thanks. Hopefully it will help people.
Finally got time to update for RC3 support. Added butchs' fix - hope it solves peoples problem as I can't generate those errors myself.
It's a visual bug => look at screenshot
Small visual error. I'll fix it soon.
I corrected the visual error and made a small update. It's not nessescary to update, unless you don't like to see the error.
After installing I noticed my error log is getting filled with this:
Quote
2: imagedestroy(): supplied argument is not a valid Image resource
File: /home/a_folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 144
Further investigating the IPs revealed its caused by search engine spiders like microsoft and google.
Any way to prevent this error from occurring?
It happens because the search engines/spiders follows old links. Because the links on the images are unique from one visit to the next, the spiders follow links that are not valid anymore.
I never really figured a way to prevent it from happening, then again it's not that often that spiders visit those links.
Quote from: Akyhne on May 06, 2010, 06:09:25 PM
I never really figured a way to prevent it from happening, then again it's not that often that spiders visit those links.
This mod causes ~3 pages of errors per day . . . spiders like my website . . .
What about "nofollow", SMF uses it for some links. I am sure you can copy it from the source. 8)
nofollow doesn't give any guaranties. So if you want the mod error free, another solution is needed.
Hang on, why is visiting old links causing imagedestroy errors exactly?
If you're attempting to load images into resources, and that fails, check for it before calling imagedestroy.
Quote from: Arantor on May 09, 2010, 05:55:21 AM
Hang on, why is visiting old links causing imagedestroy errors exactly?
If you're attempting to load images into resources, and that fails, check for it before calling imagedestroy.
If you click the register page, the mod fetches some random pictures and generates an array with the images. The array is used to decide what images are used.
If you click an old link to the verification without that array created, you get the errors.
Then surely you should be able to check whether the array is created before using it?
It's not as simple as that.
Why not?
Something like?
if (is_array($???)) // Is this an array
Quote from: societyofrobots on May 07, 2010, 11:53:13 PM
This mod causes ~3 pages of errors per day . . . spiders like my website . . .
Exactly how does the links look in the error log?
See if this helps you:
Quote from: Akyhne on May 10, 2010, 04:43:56 AM
Quote from: societyofrobots on May 07, 2010, 11:53:13 PM
This mod causes ~3 pages of errors per day . . . spiders like my website . . .
Exactly how does the links look in the error log?
http://www.my_site.com/forum/index.php?action=verificationsimages&avatar=069a30aee6b855aa044e939ba92dbb1f&type=2
The error I mentioned before was just one of them. There are others:
Quote
2: imagejpeg(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 143
8: Undefined variable: im
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 134
2: imagecopyresampled(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 133
2: imagefilledrectangle(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 87
2: imagecolorallocate(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 86
2: imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 85
2: Division by zero
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 83
2: imagesy(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 77
2: imagesx(): supplied argument is not a valid Image resource
File: /home/folder/public_html/forum/Sources/Subs-CaptchaAvatar.php
Line: 76
The file attached here (http://www.simplemachines.org/community/index.php?topic=343185.msg2621391#msg2621391) should solve it.
Hmm, why do I even bother correcting errors when no one bothers testing...
Quote from: Akyhne on May 16, 2010, 08:49:14 AM
Hmm, why do I even bother correcting errors when no one bothers testing...
You didn't make it an official release, and I don't have time to fiddle with betas ;)
That said, it seems to be working and no more errors. Thanks dood!
Quote from: h78509 on January 27, 2010, 07:52:39 AM
I have 2 questions:
1. It says on the installation: "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."
I'm using RC2 Curve. So.. what is this edit I'm required to do? Or do I have to figure it out by myself?
2. In the option: "Folders from which to use avatars as verification", what format should I use?
/avatars/dogs ?
avatars/dogs ?
ht*p://mysite.com/avatars/dogs ?
Right now I only have numbers in boxes, no images, but the mod looks awesome. Thanks for posting it.
Your second question is what I'd like an answer to. I've tried all formats and none of them works. I keep getting the same images as you, the boxes with the numbers in them. My folder is avatars/Street Signs.
Just Street Signs. However, I don't remember if spaces are supported.
EDIT: spaces in folder names are supported.
Akyhne, how should "Street Signs" be entered in the "Folders from which to use avatars as verification" box? What is the correct format? Should it just be "Street Signs" or "/Street Signs" or is the whole url required?
"Street Signs" without quotes.
And it's case sensitive.
Updated for RC4. Not really any changes, except RC4 compability.
I'm not sure what I'm doing wrong, but I get blank colored boxes with numbers in them instead of images. I figured I had the Settings wrong, and the mod could not find the avatar files. So when I went to registration Settings in Administration I saw:
(http://ushighway66.com/images/SettingsForImageVerify.jpg)
Obviously, it's kind of hard to change the settings. Any idea what is causing this? I'm using 1.1.12
This is what the initial verification page looks like:
(http://ushighway66.com/images/VerificationRegBoxes.jpg)
Note that there's no text either.
Well, if you are running English, then something went wrong during installation. Look in your error log.
Hi Akyhne,
Installed your mod (SMF 2.0 RC4) and all functions well. However, it changes all forum members who have never selected and avatar (no pic) and any new members who sign up to the Alanis morissette Avatar in the musicians sub folder - uninstalling the mod reverts these users back to no pic. Any idea how I can run you mod and still have no pic selected?
Thanks,
Russ
I'll take a look at it.
Thanks. For the record uninstalling the mod does not revert members back to no pic - I had to edit the dbase.
Solved. New version 1.4 available. The problem with Alanis morissette Avatar has been in all older versions, it seems.
Many thanks Akyhne.
Great mod by the way, which on the forum I look after has drastically cut bot/spammer registrations. They were becoming a real pain, easily getting past SMF's built in captcha.
You are welcome :)
Hi Akayhne
Testing the mod all I see is red lines and no pictures.
Any ideas?
There were no errors on installation.
Do you have GD installed on your server? What does the error log say? Is your avatar folder correctly set up/does avatars work?
The avatars are working on the forum as they should be.
:)
There is nothing in the error log.
GD?
http://www.libgd.org/Main_Page
Basically, it creates the images. ut if your error log is clean, that's not the issue.
Firefox repports about Javascript errors and IE about stack overflow on your site. Maybe something is screwed in the theme you are using or something?! Try enabling the Curve theme for guests and see if the mod works. If it doesn't, then maybe another mod is screwing things up.
Do you have other anti-spam mods installed?
There's no other anti spam installed.
May be database related as in the admin area I get
Version Information:
Forum version: SMF 2.0 RC4
Current SMF version: ??
plus the 'Live from simplemachines' is empty.
Try with the Curve theme.
Aha
The Sources/memberlist.php was in red.
Would that be the cause of most of the problems I am experiencing related to members and user info sections?
Sorry I'm taking up your mods space.
First of all: thanks for the mod Akyhne! It worked out of the box (smf 1.1.12) and it seems to do a good job defending against spambots.
In case someone uses a non-default avatar directory (like I do), you need to edit the Subs-CaptchaAvatar.php file. The avatars directory is hard-coded there on lines 65, 67 and 69.
Just put this line in after opening curly bracket of the function:
global $modSettings;
and change lines 65, 67 and 69 to:
$im = imagecreatefromjpeg($modSettings['avatar_directory'] . '/' . $TheImg);
HTH and again thanks for the mod.
Ah, never thought about that. Will implement it in the mod.
And glad the mod helps you.
how do I enable it ?
seems to installed but its not on.
It should be enabled by default. What forum version?
1.1.12...
not sure what GD is? not sure if I have it.
also, I have custom avatars... removed the actors and musicians.. I guess they are needed?
This is an excellent idea for a mod. Thanks a lot!
Edit: I have this mod running on all my forums; 1.1.13 and 2.0 RC5 and it has effectively stopped all spammers from registering. This looks like the definitive solution to stop robots from assaulting your forums!
Akyhne, you're a genius! :D
Hi Akyhne
Thanks for the mod.
I'm using SMF 1.1.13. Can you teach how to make only 8 avatars show?
My current forum width is too short to display 10 avatars in 1 row.
Thanks
Sona
I have a similar problem as sona67. In my case, the last two avatars scroll over my Simple Portal right column and blend in with the images in that column. Therefore a registrant cannot see the last two avatars clearly enough to pick them. I don't care if you can cut it down to 8 avatars or make a second row to accommodate them. If this cannot be done, your mod is useless for anyone using the right column in Simple Portal and I suspect in any popular portals for SMF.
The mod used tables in SMF 1. I've changed it to use floating divs like in the SMF 2 version.
I can't test my changes right now, as I have no SMF 1 installed anywhere. Please test the attached file.
How do you get the default avatars from not showing togheder with my own?
By deleting them.
Akyhne, will the attachment "Avatar_Verification_1.4.3.zip" work on SMF 2.0 Final as well as SMF 1.1.14? In the mod description, i see compatibility is limited to 2.0 RC5 and 1.1.13
Well that was a no brainer :P I was so focused on the code that I didn't look at the obvious :) But thx anyway ;) I blame it on lack of sleep :D
I haven't had time to check 2.0 support, but it shouldn't be a problem.
Actually added SMF 2.0 support here (http://www.simplemachines.org/community/index.php?topic=343185.msg3078648#msg3078648). I'm getting old lol
Officially updated the mod now.
Quote from: Akyhne on July 02, 2011, 08:19:01 AM
Actually added SMF 2.0 support here (http://www.simplemachines.org/community/index.php?topic=343185.msg3078648#msg3078648). I'm getting old lol
Officially updated the mod now.
Getting old with time, eh? Aren't we all? ;)
Thanks a lot for your hard work. I'm off to install this updated mod right away on my SMF 2.0 forums.
Thanks for the update
I have a problem with de MOD for 2.0
The images doesn´t appear.
I think is caused by this:
http://www.simplemachines.org/community/index.php?topic=293441.0
Read this part:
1: Move your uploaded avatars directory.
¿Can you help me with that?
Don't move your avatars then.
I move it back, but still this error.
When you are in the avatar verificacion, they are no images.
The URL of the images is index.php?action=verificationsimages&avatar=2&type=2
But i´m going to that url, and the page is in white
Are you sure the mod is proper installed? Any errors in your log?
Yes, and they are no errors
Does selection of avatars work for users?
Yes
Try clearing your browser cache, or better, try another browser.
Just download Firefox 5.0 and try again. In my experience Firefox has always had the best performance with SMF and no display issues.
I´m using FireFox ;)
Have you checked that your avatar paths are correct in the admin center?
Quote from: Diegorixo on July 02, 2011, 10:03:02 PM
I have a problem with de MOD for 2.0
The images doesn´t appear.
i have the same problem
avatars works fine in forum but dont appear in register verification
i also have the same problem with captcha thats built in smfi use 2.0
edit: FIXED
modifications.greek.php had some trash characters inside
what does the avatar size have to be if i want to add my own and how many should i add what format and where do they go
Avatar size doesn't matter for anything but layout issues and load times (the mod is pretty heavy).
Files allowed are .png, .jpg and .gif.
I don't recommend .gif, because they can't be rotated etc. That should make it harder for spam programs to recognize the correct image.
You can put the images in the default folders or a custom one, but then you have to provide the name of the folders in the settings of the mod (see snapshots on the mods site).
thanks. for spam protection i have honey pot but b4 that i have avatar verification then when they sign up they have to do the smf hard caption and after that they have to do the post caption for the first 5 post. do you think thats enough to stop spam or at least good enough
i have put my pictures in the avatar folder but they still dont show up
Have you put the images in a subfolder? They need to!
Most spammers are bots trying to register. But there are also human persons hired to register on sites. Those, you can't prevent from spamming.
yeh in the avatar folder theres actors music and i mad my folder there
And did you then add the new folder name to the mod's settings?
yeh just the name.
Then it should work. Make sure you wrote the name correct (case sensitive etc.).
i copy and pasted. is it just the name or the route to it. just to check my folder and directory are called the same thing could that stop it from working
Any plans to update this to 2.0.1?
An update to assure perfect compatibility with 1.1.15 and 2.0.1 would be great right now. :)
Er the mod works perfect on 2.0.1 already.
This may help a few people.
http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Sorry, forgot to update it. It will work with any SMF 2.0.x versions from now on.
However, the mod will soon be removed from Simple Machines and to my mod/theme site.
Check http://themes.e-debatten.dk/
OO you rotter. :o
Make sure there's an English section. ;)
English? There's nothing else there ;)
Oo ya good boy.
:)
Hey,
Wanted to say thank you for this mod, its quite effective vs robots.
I have encountered a template that gives no error log, has no custom register template yet refuses to display the avatars..
Here is what I see when I'm using the given template -> http://www.simplemachines.org/community/index.php?topic=461787.msg3224487#msg3224487
Here is the screenshot -> http://postimage.org/image/6fpur3fzp/
Any suggestions on what I can try here?
Is it only a problem with the custom theme?
Nice mod, but images are not visible.
I've deleted default avatars long ago, and I'm trying to specify a new directory in avatars folder - no luck.
Anyone?
QuoteFolders from which to use avatars as verification
(As standard we use the avatars from the standard SMF avatarfolders. If you want to provide further folders, provide them here as a commaseparated list)
So just write the name of the sub folder of Avatars in that settings field of the mod.
Example:
/Site root
/Avatars
/MyNewImages
Then just write "MyNewImages" (without the ")
So it should look like:
mydomain.com/avatars/MyNewImages
Right?
No, just MyNewImages!
The folder needs to be a sub folder of your avatar folder.
Got it, thanx. Everything is working now :)
A member just tried to register on my site and says the pictures are not working correctly this is what they see...
(http://i1262.photobucket.com/albums/ii602/welderfab/avatar.png)
Its been working fine, all my avatars are in the coorect folders and still viewable
Any ideas??
Maybe a server timeout, maybe corrupted images?
install after show wrong in SMF 2.0.2:
$txt['verification_avatar_means'] = 'Avatar Verification at Registration'; $txt['verification_avatar_means_desc'] = 'This mod enhances the sequrity of your forum by adding yet a verification at registration. The first thing people will see, is one unique image and below that 10 images where one of them is the same as the unique one. The registrant must click on the right image up to 3 times (loop) depending on your settings. If the registrant fails 3 times, he/she is banned from the forum if you have enabled "Ban the user on to many failed registrations". You also have the possability to have a mail send to the admin, every time a user is banned through this mod.'; $txt['verification_avatar_register'] = 'Enable verification images at the registration page'; $txt['verification_image_loop'] = 'Loop the verification image'; $txt['verification_image_loop_desc'] = '(How many times does the registrant have to verify an image)'; $txt['verification_image_loop_0'] = '0 - don\'t loop. Only show the images one time'; $txt['verification_image_loop_1'] = '1 - loop one time. The registrant has to verify two images'; $txt['verification_image_loop_2'] = '2 - loop two times. The registrant has to verify three images'; $txt['verification_avatar_folders'] = 'Folders from which to use avatars as verification'; $txt['verification_avatar_folders_desc'] = '(As standard we use the avatars from the standard SMF avatarfolders. If you want to provide further folders, provide them here as a commaseparated list)'; $txt['verification_avatar_ban_registrant'] = 'Ban the user on to many failed registrations'; $txt['verification_avatar_ban_registrant_desc'] = '(If you want to ban the registrant when trying to many times, enable this option)'; $txt['verification_avatar_first_ban'] = 'How many hours the user should be banned first time'; $txt['verification_avatar_first_ban_desc'] = '(If the registrant fails the avatar verification test, you can decide for how many hours the person is banned)'; $txt['verification_avatar_second_ban'] = 'How many hours the user should be banned the following times'; $txt['verification_avatar_second_ban_desc'] = '(If the registrant keeps failing the avatar verification test, you can decide for how many hours the person is banned)'; $txt['verification_avatar_send_admin_mail'] = 'Send mail to admin on hacking attempt'; $txt['verification_avatar_send_admin_mail_desc'] = '(Select wether you want a mail send to the admin mail account on banned IP\'s)'; $txt['verification_avatar_send_admin_mail_1'] = 'Disabled'; $txt['verification_avatar_send_admin_mail_2'] = 'Only send mail on repeated bannings'; $txt['verification_avatar_send_admin_mail_3'] = 'Send mail on all banned occations';
Quote from: liuxyon on October 05, 2012, 09:30:08 AM
install after show wrong in SMF 2.0.2:
Do you mean those codes are showing at the top of your forum following installation of this mod?
yes. install Complete after show wrong in forum top and I can't find show your mod any option.
Have a look at the file Login.english.php in folder default/languages
See if there's a pair of characters like ?> that are not right at the end of the file. If you find that pair of characters somewhere else (possibly right before the line that says $txt['visual_verification_avatar_headline'] or $txt['verification_avatar_means']), remove it and put it at the end of the file, on a line of its own.
Hi,
it didn't work for me too ... then I found out that "registration agreement" has to be allowed,
I had it disabled.
If you could move the procedure into some other section, it would be great (I don't plan to use that agreement)
@AliG It will be fixed in the next release.
1.5 - 17th November 2012
+ Added SMF 2.1 (Alfa) support
! Fixed mod not working with SEF support (Tested with SimpleSEF & PortaMx SEF).
! Fixed the verification not showing up, when the registration agreement is not in use.
Good Mod! :)
Quote from: punchy on September 03, 2012, 07:13:04 PM
A member just tried to register on my site and says the pictures are not working correctly this is what they see...
(http://i1262.photobucket.com/albums/ii602/welderfab/avatar.png)
Its been working fine, all my avatars are in the coorect folders and still viewable
Any ideas??
After installing 1.5 I had the same problem. It seemed to go away when I made the following changes:
file name="$sourcedir/Register.php"
replace
$_SESSION['RightAvatar'][] = array(urlencode(base64_encode($listOfAvatars[$rand_keys[$i]])), $MD)
with
$_SESSION['RightAvatar'][] = array(base64_encode($listOfAvatars[$rand_keys[$i]]), $MD)
replace
$_SESSION['RightAvatar'][] = array(urlencode(base64_encode($i)), $MD)
with
$_SESSION['RightAvatar'][] = array(base64_encode($i), $MD)
:o
Hi ahkyne.
Here is the french for your excellent mod:
http://www.simplemachines.org/community/index.php?topic=498282.0
Regards.
ps: few errors in the english (missing letters or a instead of e etc...)
Thx m8. I'll try remember adding this first time.
This mod does not work it does not show the question image
It works very well on default theme. What's yours.
Quote from: GravuTrad on April 22, 2013, 07:47:52 PM
It works very well on default theme. What's yours.
Mine is the minecraft theam you can look at www.animalcarft.cu.cc If you know what is wrong can you please help ?????
i can't see your domain. Which version?
Quote from: GravuTrad on April 23, 2013, 01:03:23 PM
i can't see your domain. Which version?
Version Information:
Forum version: SMF 2.0.2
Current SMF version: SMF 2.0.4
I will also PM u the link
Update your forum to the 2.0.4 version, and apply the changes concerned by the manual instructions (parsed on the mod page) for the mod about your version.
QuoteA 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.
Quote from: GravuTrad on April 23, 2013, 05:08:43 PM
Update your forum to the 2.0.4 version, and apply the changes concerned by the manual instructions (parsed on the mod page) for the mod about your version.
QuoteA 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.
How can I find the Register.template.php there is none in my theme file ???? and what edit is needed????
If you haven't a personalized register.template file on this theme, you are not concerned. Maybe haven't you activated it correctly in the settings? How did you set it?
Hi
Is there any similar mod updated available in the mod section?
Thanks
I'm using SMF 2.0.9 and would love to use this mod.
The note at the top of the mod's page says "This is an outdated mod that is no longer supported by its author. Use at your own risk", but at the top of the support page (this thread) it says:
Compatibility
For SMF 1.1.x (No new features are added)
For SMF 2.0, SMF 2.1 Alpha 1
So....I'm confused. Can I use this with 2.0.9? I'm using a custom theme, but it does not have a customized register.template file.
It should work fine for 2.0.x