Image for Anti-Spam Verification Questions

Started by GL700Wing, January 08, 2021, 09:30:46 PM

Previous topic - Next topic

Shades.

Here's one I made free to anyone that wants to use it! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Dave J

Quote from: Shades. on March 22, 2022, 12:13:39 AMAnd another! ;)

Shades,

As was pointed out to me, the images using colours are not friendly to colour-blind people, that's why I added the names of the colours to my boxes.

DenDen60

#43
I use a verification questions image URL. In the image, I ask people to add the numbers in an image, but one person told me he was color blind. Hence I added the colors name in the image.

GL700Wing

Version 1.4 - 22-Apr-22
o Added support from SMF 2.1
o Removed support from SMF 2.1 RC4
o Included sample images in ./Themes/default/images/VerificationImages
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Dave J

#45
For some reason after upgrading today to V1.4 (I did uninstall the previous version) I'm now getting this error

Undefined variable: _SESSION in /****/****/public_html/Themes/default/languages/Modifications.english.php on line 111
This is the code it's referring to

// Image for Anti-Spam Verification Questions Mod
global $modSettings, $sourcedir, $scripturl, $webmaster_email;
unset($_SESSION['hide_verification']);
if (file_exists($sourcedir . '/contactHooks.php') && file_exists($sourcedir . '/Contact2.php') && !empty($modSettings['smfcontactpage_email']) && allowedTo('view_contact'))
{
$_SESSION['hide_verification'] = true;
$image_help_href = $scripturl . '?action=contact';
}
else
$image_help_href = 'mailto:' . $webmaster_email;
$txt['verification_image_help'] = '<a href="' . $image_help_href . '"><strong class="alert" style="font-size: 120%;">Help - I can\'t see the verification image!</strong></a>';

Any ideas GL?

I should add that it's from the root log not the SMF log and I'm using SMF2.1.2

Sir Osis of Liver

unset($_SESSION['hide_verification']);

If the variable has not been defined, unset may cause the error.  You can check that by defining the variable before the unset statement -

if (!isset($_SESSION['hide_verification']))
    $_SESSION['hide_verification'] = null;
unset($_SESSION['hide_verification']);

Or you can not worry about it if the mod works.
When in Emor, do as the Snamors.
                              - D. Lister

GL700Wing

Version 1.5 - 07-Jul-22
o Added support from SMF 2.1.2
o Fixed bug reported by Dave J.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Dave J

Quote from: GL700Wing on July 07, 2022, 12:08:10 AMVersion 1.5 - 07-Jul-22
o Added support from SMF 2.1.2
o Fixed bug reported by Dave J.

Thanks GL

Westwegoman

Installed on 2.1.2 but get the following on the registration page when trying to register.

I have it installed on several 2.0.19 forums and it works great there. Not sure what happened.


Fatal error: Uncaught ValueError: Unknown format specifier ";" in /homepages/13/xxxxxxxxx/htdocs/bps/Themes/default/GenericControls.template.php:269 Stack trace: #0 /homepages/13/xxxxxxxxxx/htdocs/bps/Themes/default/GenericControls.template.php(269): sprintf('<a href="%1$s">...', 'mailto:webmaste...') #1 /homepages/13/xxxxxxxxx/htdocs/bps/Themes/default/Register.template.php(301): template_control_verification('register', 'all') #2 /homepages/13/xxxxxxxxxxx/htdocs/bps/Sources/Load.php(2760): template_registration_form() #3 /homepages/13/xxxxxxxxxxx/htdocs/bps/Sources/Subs.php(4155): loadSubTemplate('registration_fo...') #4 /homepages/13/xxxxxxxxxx/htdocs/bps/index.php(194): obExit(NULL, true, true) #5 {main} thrown in /homepages/13/xxxxxxxx/htdocs/bps/Themes/default/GenericControls.template.php on line 269

GL700Wing

#50
Version 1.6 - 06-Sep-22
o Fixed PHP 8.x bug reported by Westwegoman.



Quote from: Westwegoman on September 05, 2022, 01:08:23 AMInstalled on 2.1.2 but get the following on the registration page when trying to register.

<Snip>
@Westwegoman - Thanks for reporting this issue.  It took me a while to work out what was - and wasn't happening - because the error messages were in the system/server logs rather than the forum logs.  Anyway, turns out it's an obscure issue related to PHP 8.x (doesn't happen with PHP 7.x) so I've fixed the problem code and confirmed that the mod is now working with PHP 8.x.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Westwegoman

Thanks! Works perfect now! I've been waiting for something like this for a while. Some time back, when I used Yabb, they had a similar mod and it worked wonders. This should help a lot when it comes to spamtards.

cjazz

I am running a SMF 2.0.19 board and lately I am having spammers registering on the forum. Previously I had the "Image for Anti-Spam Verification Questions Mod", which was very good.

I have downloaded this mod however it doesn't appear to be suitable for version 2.0.19 due to the mod scripts on two of the files are incorrect.

./Themes/default/Contact2.template.php  Doesn't exist

./Themes/default/css/index.css  Doesn't have the ?> so the file cannot be edited.

Anyone using this mod on 2.0.19? or if not is there another antispam mod that works well?

Aleksi "Lex" Kilpinen

Don't know what that Contact2.template.php is about, but I'd wager that if it doesn't exist you can ignore it (like the package manager should tell you too).

You can go ahead and install the mod, then manually add the code for index.css at the end of the file.

Just copy this


/* Image for Anti-Spam Verification Questions Mod */
input#qa_verification_image_url
{
width: calc(100% - 20px);
}

And paste it in index.css at the very end.

For any further questions about the mod, it's better to post in it's own support topic.
https://www.simplemachines.org/community/index.php?topic=576301.0
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Kindred

Also, please note for future:   questions regarding specific mods should be asked in the thread dedicated to supporting that specific mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GL700Wing

#55
Quote from: cjazz on January 07, 2025, 09:23:27 AMI am running a SMF 2.0.19 board and lately I am having spammers registering on the forum. Previously I had the "Image for Anti-Spam Verification Questions Mod", which was very good.

I have downloaded this mod however it doesn't appear to be suitable for version 2.0.19 due to the mod scripts on two of the files are incorrect.
@cjazz I am the author of the  Image for Anti-Spam Verification Questions mod and I have confirmed that the mod installs without error and correctly updates the ./Themes/default/css/index.css file on a new installation of SMF 2.0.19 (ie, without any mods).

Quote./Themes/default/Contact2.template.php  Doesn't exist
The mod installer will skip this file (it's part of the Contact Page mod) if it doesn't exist (ie, it does not generate an error message).

Quote./Themes/default/css/index.css  Doesn't have the ?> so the file cannot be edited.
CSS files do not end with ' ?> ' (those characters are found at the end of PHP script files) and even though the SMF installer incorrectly shows that it is searching for these characters the installation script itself does not search for them - it simply adds the mod code to the end of the file.

So I have a question: did the SMF installer report any errors while trying to install the mod?

Finally, please ensure you are using the latest version of the Image for Anti-Spam Verification Questions mod.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: Aleksi on January 07, 2025, 10:00:42 AMFor any further questions about the mod, it's better to post in it's own support topic.
https://www.simplemachines.org/community/index.php?topic=576301.0
Hi Aleksi,

Would you (or someone who has the correct permissions) please merge this topic with the mod's support topic (I don't have permission to do this).

Thanks.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Nodaz

Quote from: GL700Wing on January 12, 2025, 05:50:26 PM
Quote from: Nodaz on January 12, 2025, 03:30:29 PM... any other insight recommendations?
The Image for Anti-Spam Verification Questions mod with relevant questions is very effective.
I took a look at The Image for Anti-Spam Verification Questions mod and quitw honestly i dont understand what it is or how it works.
This is the extent of the description

"Custom Image for use with Anti-Spam Verification Questions

Following on from a tip shared by Sir Osis of Liver this mod has been created to enable Admins to use a custom image for the anti-spam verification questions that are created via Administration Center >> Security and Moderation >> Anti-Spam.  The custom image will be displayed everywhere verification is required (eg, registration, guest searches, guest posting, guest reporting posts, etc).

Suggestion: Save the verification image to the forum default theme images folder (eg, ./Themes/default/images).

This mod also includes some safeguards just in case the verification image cannot be accessed via the supplied URL and/or if the verification image cannot be seen on the pages on which it is displayed:
1.  A message will be displayed in the Admin Center if the verification image URL is not valid; and
2.  On the pages on which the verification image is displayed a link to contact the webmaster is provided if the verification image cannot be seen.

Also, and even though the verification image size is displayed at a maximum pixel resolution of 300x300 on the registration page, the full-sized version of the image will be displayed in a new window/tab by clicking on it.


What image am i supposed to save, and if is display what is its function?


GL700Wing

Quote from: Nodaz on January 15, 2025, 06:50:49 PMWhat image am i supposed to save ...
You can use one of the supplied images or you can use one of your own [you should save the image you want to use to the forum default theme images folder (eg, ./Themes/default/images)].


Quote... and if is display what is its function?
You enter the path to the custom image immediately below the 'Number of verification questions user must answer' field and then you create verification questions specifically related to the custom image.  Example:
You cannot view this attachment.

The custom image will be displayed above the questions everywhere verification is required (eg, registration, guest searches, guest posting, guest reporting posts, etc).
You cannot view this attachment.

Here's a custom image with some of the verification questions I use on one of my forums:
You cannot view this attachment.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: