There is also this article ...
-
Qt(B5) About QString and UTF16
Summary: This time, Qt is a story about the QString. QString is a class action allows a very useful text, QWidget with a string of class inheritance, this former QChar QString QStr ...
Recently Updated Articles
Summary: Joomla! Using the mail form that are made in standard, gradually, comes an increasing number of spam. ON check function even if the session, and little by little, you will grow.
If such articles, especially overseas, is striking.
Well, if you like this, usually the mail form (contact you to search and fine) and uses the extension of this time, yvcomment Bigo Captcha extension can be captured using the default mail using the form how to use, I want to describe in concrete terms.
In fact, Bigo Captcha-mail form you can use the extension. For example, ALFcontact is. However, ALFcontact has recently found a security hole and, hey, you think want to unuse.
It also, combined, this time, I would like to add the default mail form.
Does, immediately, let's try.
Download: Bigo Captcha extension
Artikler: Joomla! To comment on the article in (yvComment try out)
Later, Bigo Captcha as being installed, and start talking.
Also, here, using Joomla! Version, 1.5.14 is.
If different versions, php source code line number, so may be different in the source code for each version, check the context, please do the work.
In, I immediately start.
Php code to change the source, the following three.
However, in the language file, and comment if you want to change to accommodate changes in files that do add the following language.
(Here is the description does not end there.
)
administrator / language / ja-JP / ja-JP.com_contact.ini
administrator / language / en-GB / en-GB.com_contact.ini
language / ja-JP / ja-JP.com_contact.ini
language / en-GB / en-GB.com_contact.ini
- administrator / components / com_contact / contact_items.xml
- At this point, you add parameters to capture whether or not to use the mail form parameters of the component.
- components / com_contact / controller.php
- Here, the image capture process to determine whether the information matches the input, add the processing to display an image capture.
- components / com_contact / views / contact / tmpl / default_form.php
- This will add to the process of capturing images to view the mail form.
87 8889 9091 9293 9495 9697 9899 100101 102103 104 | <params group="email"> <param name="show_email_form" type="radio" default="1" label="Email Form" description="Show/Hide the email to form"> <option value="0">Hide</option> <option value="1">Show</option> </param> <param name="email_description" type="text" size="30" default="" label="Description text" description="PARAMEMAILDESCTEXT" /> <param name="show_email_copy" type="radio" default="1" label="Email Copy" description="PARAMEMAILCOPY"> <option value="0">Hide</option> <option value="1">Show</option> </param> <param name="use_captcha" type="radio" default="1" label="Use Captcha" description="Enable Captcha verification"> <option value="0">No</option> <option value="1">Yes</option> </param> <param name="banned_email" type="textarea" default="" label="BANNED EMAIL LABEL" rows="3" cols="30" description="BANNED EMAIL DESC" /> <param name="banned_subject" type="textarea" default="" label="BANNED SUBJECT LABEL" rows="3" cols="30" description="BANNED SUBJECT DESC" /> <param name="banned_text" type="textarea" default="" label="BANNED TEXT LABEL" rows="3" cols="30" description="BANNED TEXT DESC" /> </params> |
Here, adding the line 97 - line up to 100.
we add a parameter called use_captcha.
When you do this change will be appended to e-mail form below.



This source code, there are two additional large place.
117 118119 120121 122123 124125 126127 128129 130131 132133 134 | if (!$email || !$body || (JMailHelper::isEmailAddress($email) == false)) { $this->setError(JText::_('CONTACT_FORM_NC')); $this->display(); return false; } /** Captcha */ if (!$this->_checkCaptcha()) { JError::raiseWarning("666","You have entered the wrong CAPTCHA sequence. Please try again."); $this->display(); return false; } // Contact plugins JPluginHelper::importPlugin( 'contact' ); $dispatcher =& JDispatcher::getInstance(); |
Here, adding the line 124 - to 131 lines.
Here is the place to check the mail form input information, and check if they match the captured image and the input information.
128 line is the error message when incorrect information was entered. If you want to change the wording is a good idea to change the string here.
396 397398 399400 401402 403404 405406 407408 409410 411412 413414 415416 417418 419420 421422 423424 425426 427428 429430 431432 433434 435436 | /** @author bigo @date januray, 2008 */ function displaycaptcha() { global $mainframe; $contactId = JRequest::getVar('contact_id', 0, '', 'int'); // load the contact details $model = &$this->getModel('contact'); $qOptions['id'] = $contactId; $contact = $model->getContact( $qOptions ); $params = new JParameter( $contact->params ); if ($params->get('use_captcha')) { $Ok = null; $mainframe->triggerEvent('onCaptcha_Display', array($Ok)); if (!$Ok) { echo "<br/>Error displaying Captcha<br/>"; } } } function _checkCaptcha() { global $mainframe; $contactId = JRequest::getVar('id', 0, '', 'int'); // load the contact details $model = &$this->getModel('contact'); $qOptions['id'] = $contactId; $contact = $model->getContact( $qOptions ); $params = new JParameter( $contact->params ); // not using captcha! if (!$params->get('use_captcha')) { return true; } $return = false; $word = JRequest::getVar('word', false, '', 'CMD'); $mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return)); if ($return) { return true; } else return false; }} |
Here, adding the line 396 - is up to 435 lines.
Here, at the end of this class, we add the two methods.
One, displaycaptcha () method to display an image is captured.
Another, _checkCaptcha () method to check if they match the captured image and the input information.
57 5859 6061 6263 6465 6667 6869 7071 | <?php if ($this->contact->params->get( 'show_email_copy' )) : ?> <br /> <input type="checkbox" name="email_copy" id="contact_email_copy" value="1" /> <label for="contact_email_copy"> <?php echo JText::_( 'EMAIL_A_COPY' ); ?> </label> <?php endif; ?> <?php if ($this->params->get('use_captcha')) { ?> <!-- Bigo Captcha --> <br clear=left /> <img src="/index.php?option=com_contact&task=displaycaptcha&contact_id=<?php echo $this->contact->id; ?>"> <br clear=left /> <?php echo JText::_( 'Verification' ); ?> : <input type="text" name="word" /> <br /> <?php } ?> |
Here, adding the line 64 - line 71 is up.
Here, we are displaying images captured mail form.
And make this change, the form below to email Bigo Captcha image appears.

Here are 69 of the first line of "Verification" the wording "Please enter the letters in the picture" and is.
Is now complete.
Also, at this time would erase all the information you entered. Whether this is good, you just a little split.
I would be good to yourself and customize things.







