CB goes Captcha!

12 years 11 months ago #33361 by bugnotme
since nobody help me i found another solution for all of those who cant or dont want to use captcha

i installed this code a couple of days ago and all the darn crap stopped!!!:)

so that's the deal:

you have to add this code in your comprofiler.html.php

<form method="POST" action="list.php" name="list">
<input type="hidden" name="submitted" value="submitted">
<div class="form_01">
<label for="first_name">First name:</label>
<input title="Visually impaired users: do not enter anything in this box" type="text" name="first_name" id="first_name" value="" onKeyUp=" val = this.value; if (val.length > 0) { alert('Please place your cursor in ‘Name’ box to start your message'); this.value = val.substring(0,0); emailform.focus() } this.form.count.value=0-parseInt(this.value.length); ">
</div>
example

.....
.....
echo _REGISTER_UNAME; ?>" size="40" value="<?php if (isset($row->username)) echo htmlspecialchars($row->username);?>" class="inputbox" /><?php

echo getFieldIcons(1,true,($ueConfig!=1), sprintf( _VALID_AZ09, _UE_UNAME, 2 ), _REGISTER_UNAME); ?></td>

</tr>

<tr>

<td class="titleCell"><?php echo _REGISTER_EMAIL; ?></td>

<td class="fieldCell"><input type="text" name="email" mosReq="1" mosLabel="<?php

echo _REGISTER_EMAIL; ?>" size="40" value="<?php if (isset($row->email)) echo htmlspecialchars($row->email);?>" class="inputbox" /><?php

echo getFieldIcons(1,true,($ueConfig==1 || $ueConfig==2), _REGWARN_MAIL, _REGISTER_EMAIL); ?>


<form method="POST" action="list.php" name="list">
<input type="hidden" name="submitted" value="submitted">
<div class="form_01">
<label for="first_name">Protector</label>
<input title="Visually impaired users: do not enter anything in this box" type="text" name="first_name" id="first_name" value="" onKeyUp=" val = this.value; if (val.length > 0) { alert('Please place your cursor in ‘Password’ box to continue'); this.value = val.substring(0,0); emailform.focus() } this.form.count.value=0-parseInt(this.value.length); ">
</div>


</td>

</tr>



<?php if ($emailpass=="0" || isset($mosConfig_useractivation)) { ?>



<tr>

<td class="titleCell"><?php echo _REGISTER_PASS; ?></td>





this add a field. this field must not contain any character if not the subscription process can not go on.

now we have to hide this field to users

go to your template (/public_html/components/com_comprofiler/plugin/templates)

and choose the template you have (mine is default)
i opened template.css and i add this piece of code:

.form_01 {
visibility: hidden;
display: none;
}

DONE!!! from now on just stupid spambot will try to fill in the invisible field with the result of not being able to finish the subscription process...humans who dont see the hidden field will be able to subsribe.
i tried this on my MAMBO site( i know you people hate this word but well...MAMBO MAMBO MAMBO MAMBO MAMBO MAMBO MAMBO MAMBO :laugh: :laugh: :laugh: :laugh: ) and it works like a charm

please give ME some feedback ( possibly positive feedback :P )
enjoy and peace!
Francesco from Italy ---Pisa

Post edited by: bugnotme, at: 2007/03/13 22:38

Post edited by: bugnotme, at: 2007/03/13 22:41
12 years 11 months ago #33362 by StealthMicro
I am having the no image issue too. I have checked the language files and the template files.

When I go to the link:

someurl.com/index2.php?option=com_comprofiler&task=tabclass&Itemid=1&tab=getcaptchatab&no_html=1

I get:

Fatal error: Call to undefined function: imagettfbbox() in /home/blah/public_html/components/com_comprofiler/plugin/user/plug_cbcaptcha/captchasecurityimages.php on line 141

I have contacted the hosting service to see if they can link GD with the TrueType fonts is this the correct course of action? Or is there something I can do? I do have ssh access to the server just not root.

Post edited by: StealthMicro, at: 2007/03/13 23:04
12 years 11 months ago #33692 by Shrill
Hi Beat.

I am having the same problem (image not showing up).

I've just checked with my host and Freetype is installed. How do I check into the second issue? ie. which files do I check for spaces and can you recommend a good program to do this in windows (can I do it through file manager on my CPanel?)

Cheers,

Shrill
12 years 11 months ago #33703 by nant
StealthMicro wrote:

I am having the no image issue too. I have checked the language files and the template files.

When I go to the link:

someurl.com/index2.php?option=com_comprofiler&task=tabclass&Itemid=1&tab=getcaptchatab&no_html=1

I get:

Fatal error: Call to undefined function: imagettfbbox() in /home/blah/public_html/components/com_comprofiler/plugin/user/plug_cbcaptcha/captchasecurityimages.php on line 141

I have contacted the hosting service to see if they can link GD with the TrueType fonts is this the correct course of action? Or is there something I can do? I do have ssh access to the server just not root.

Post edited by: StealthMicro, at: 2007/03/13 23:04


yes, this is the correct approach.
GD with freetype support is a prerequisite (as stated earlier in this thread).
12 years 11 months ago #33743 by GrandmasterB
I didn't have Freetype on my server. Downloaded and installed it. One thing that you should do is make sure it's enabled in /scripts/easyapache.

The hardest part was waiting for apache to recompile the changes. It works like a charm now.

thanks community!
12 years 11 months ago #33778 by Shrill
Hi again...

Okay, so after reading through the thread, I realized that the extra space issue is with Joomfish, which I don't have installed.

So as mentioned above, Freetype is installed but I am not getting the image.

I did notice that GD1 is not installed: does that matter?

So further info:
All directory permissions are green
PHP Version 4.4.4


Configure Command './configure' '--enable-pic' '--with-libdir=lib64' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pdflib' '--with-pear' '--with-pgsql=/usr' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zlib'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.zlib

gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

I am on Mambo 4.6.1

Components installed:
Bookmarks
Events
Graphical YANC
Mamboboard Forum
uddeIM

When I go to someurl.com/index2.php?option=com_comprofiler&task=tabclass&Itemid=1&tab=getcaptchatab&no_html=1%3Cbr%20/%3E I get:
You are not authorized to view this resource.
You need to login.

Thanks for any help you can provide!

Cheers,

Shrill
Moderators: beatnantkrileon
Time to create page: 0.458 seconds