News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Avatar Verification

Started by Akyhne, October 18, 2009, 09:32:39 PM

Previous topic - Next topic

Akyhne

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".';

simplebeer

Sorry for my poor English, but i think it's probably better then your Dutch :)

Akyhne


simplebeer

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
Sorry for my poor English, but i think it's probably better then your Dutch :)

Akyhne


Sudhakar Arjunan

Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

butchs

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&amp;avatar=7313ed2f39f10796d1d5fc7ad0fae030&amp;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&amp;verifycode='.$imgInfo[1].'&amp;rand=' .  $_SESSION['avatar_rand'] . '\')"><img style="border:#FF0000 2px solid" src="' . $scripturl. '?action=verificationsimages&amp;avatar='.$imgInfo[1].'&amp;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&amp;verifycode='.$imgInfo[1].'&amp;rand=' .  $_SESSION['avatar_rand'] . '\')"><img style="border:#FF0000 2px solid" src="' . $scripturl. '?action=verificationsimages&amp;avatar='.$imgInfo[1].'&amp;type=2" alt="" /></a>
</td>';


}



a little hokey but it seems to work for me...   :-X
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

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.

butchs

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.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

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.

butchs

Locating corrupted avatars is like finding a needle in a haystack.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

Actually not. If GD can open the images, they are not corrupted.

butchs

GD Lib.  I do not know much about it.  Where is it?  Is it part of SMF?
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Akyhne

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.

Sabre™

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
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Akyhne

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.

Sabre™

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.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Akyhne

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.

Sabre™

Sure mate, just pm me your email and I'll send em through :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Akyhne

#39
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.

Advertisement: