| 
Welcome, Guest

TOPIC: CB goes Captcha!

Re:CB goes Captcha! 5 years, 1 month ago #35324

  • dartagnan
  • dartagnan
  • OFFLINE
  • Senior Boarder
    Senior Boarder
  • Posts: 46
  • Karma: -1
Hello,

I installed captcha with joomla 1.0.12. and CB1.0.2
No major problem except recently, one user can't see the image displayed by captcha and this on 2 computers, at work and at home, apparently using IE6.
As this is the only person with the problem I don't understand what happens. Why only her can't see this image? I'm afraid it could happen with other people... (To note this person is from China but the other users as well and have no problem)
The website is www.asian-addict.com


thanks for any help
Planet Asia Asian tradition culture and community

Re:Invalid Security Code 5 years, 1 month ago #35345

  • spacewalk
  • spacewalk
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 15
  • Karma: 2
I get the captcha image just fine. But whenever I try to register a new user for the site, I get the error "Invalid Security Code."

If I disable "registration" in the plugin back-end, I still get this error during registration.

The only fix is to unpublish the plug-in.

Do we know anything about this scenario? I'd love to use the captcha plug-in.

Re:Invalid Security Code 5 years, 1 month ago #35354

  • nant
  • nant
  • ONLINE
  • Administrator
    Administrator
  • Posts: 17323
  • Karma: 717
spacewalk wrote:
I get the captcha image just fine. But whenever I try to register a new user for the site, I get the error "Invalid Security Code."

If I disable "registration" in the plugin back-end, I still get this error during registration.

The only fix is to unpublish the plug-in.

Do we know anything about this scenario? I'd love to use the captcha plug-in.


did you read the rest of this thread ?

it mentions one known case that this happens.

Re:CB goes Captcha! 5 years, 1 month ago #35381

  • simk318
  • simk318
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 4
  • Karma: 1
i have similar type of configuration still doesn't work

Joomla! Register Globals Emulation: OFF
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF
Session save path: none
Short Open Tags: ON
Output Buffering: OFF
Open basedir: none
Display Errors: ON
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none


Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC
Apache/1.3.37 (Unix) PHP/5.1.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a


please help

Re:CB goes Captcha! 5 years, 1 month ago #35384

  • spacewalk
  • spacewalk
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 15
  • Karma: 2
Nick A. was correctly chastising me for not reading the entire thread. (I did read a lot of it, Nick. It's just a really long thread!)

Are you using the JSMF bridge for the SMF forum software? If so, you have to go into SMF admin and disable "use database for sessions."

If you're not using JSMF, I have no idea what's wrong.

As a sidenote, this issue (plus being reminded that Joomlapolis itself uses Joomlaboard) finally caused me to abandon JSMF and go with Joomlaboard for a site forum. JSMF is a heroic piece of work, but I've had it with bridges and patching core Joomla files.

I hadn't used Joomlaboard in more than a year. It's not bad at all.



simk318 wrote:
i have similar type of configuration still doesn't work

Joomla! Register Globals Emulation: OFF
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF
Session save path: none
Short Open Tags: ON
Output Buffering: OFF
Open basedir: none
Display Errors: ON
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none


Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC
Apache/1.3.37 (Unix) PHP/5.1.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a


please help

Re:CB goes Captcha! 5 years, 1 month ago #35409

  • phlux0r
  • phlux0r
  • OFFLINE
  • Fresh Boarder
    Fresh Boarder
  • Posts: 12
  • Karma: 6
Hack to use the cb Captcha on the Joomla Contact form

This worked for me, your experience may vary.

Joomla version 1.0.12
CB version: 1.0.2
CB Captcha plugin version: 1.0 (14.Feb.2007)

Files to hack:
      /components/com_comprofiler/plugin/user/plug_cbcaptcha/cb.captcha.php
      /components/com_contact/contact.html.php
      /components/com_contact/contact.php


1. cb.captcha.php
Since we're using the plugin code outside of the CB plugin framework we need to put all the $_PLUGINS->registerFunction() calls in an if statement like so:
if ($_PLUGINS) {
$_PLUGINS->registerFunction( 'onBeforeRegisterForm', 'onBeforeRegisterForm', 'getcaptchaTab' );
$_PLUGINS->registerFunction( 'onBeforeUserRegistration','onBeforeUserRegistration', 'getcaptchaTab' );
 
$_PLUGINS->registerFunction( 'onLostPassForm', 'onLostPassForm', 'getcaptchaTab' );
$_PLUGINS->registerFunction( 'onLostPassForm', 'onLostPassFormB', 'getcaptchaTab' );
$_PLUGINS->registerFunction( 'onBeforeNewPassword', 'onBeforeNewPassword', 'getcaptchaTab' );
 
$_PLUGINS->registerFunction( 'onAfterEmailUserForm', 'onAfterEmailUserForm', 'getcaptchaTab' );
$_PLUGINS->registerFunction( 'onBeforeEmailUser', 'onBeforeEmailUser', 'getcaptchaTab' );
}
 


2. contact.html.php


Around line 685 (after the contact text textarea) insert this code:
// hack - added CB captcha to the contact form
require_once($mosConfig_absolute_path.'/administrator/components/com_comprofiler/plugin.class.php');
require_once($mosConfig_absolute_path.'/components/com_comprofiler/plugin/user/plug_cbcaptcha/cb.captcha.php');
$cbCaptcha = new getcaptchaTab;
$CaptchaImage = $cbCaptcha->_getHTMLcaptcha();
echo "<br />\n" .$CaptchaImage. "<br />\n";
echo " <label for=\"security_code\">" . _UE_CAPTCHA_Label . ":</label>\n";
echo " <br /><input class=\"inputbox\" type=\"text\" name=\"".$cbCaptcha->_getPagingParamName("captcha"«»)."\" id=\"security_code\" value=\"\" size=\"20\" />\n";
// end hack
 


3. contact.php

At the top of the file, before the switch statement insert:
// hack start a session here for the security images
if ( ! session_id() ) {
session_start();
}
// end hack


Then around line 435 after:
if ( !$email || !$text || ( JosIsValidEmail( $email ) == false ) ) {
mosErrorAlert( _CONTACT_FORM_NC );
}

and before:

	$prefix = sprintf( _ENQUIRY_TEXT, $mosConfig_live_site );
 


Insert:
// RP hack captcha check
if ( ! (($_SESSION['security_code'] == mosGetParam($_REQUEST,"captcha"«»)) && (!empty($_SESSION['security_code'])) ) ) {
mosErrorAlert( "Invalid Security Code" );
}
// end hack
 


That's it - enjoy a secure contact form.

Post edited by: phlux0r, at: 2007/04/10 04:08
Time to create page: 1.37 seconds