[TYPO3-english] sr_freecap with neo_fileshare
David Martinez
perroaguacatero at gmail.com
Fri Jan 14 23:36:44 CET 2011
I'm using Typo3 4.3.8 and I'm trying to incorporate sr freecap with neo
fileshare but am not sure how to properly set it up.
I created an html file with the recommended lines:
* <!--###CAPTCHA_INSERT### this subpart is removed if CAPTCHA is not
enabled! -->
<div class="tx-your-extension-id-pi1-captcha">
<label
for="tx_your_extension_id_pi1_captcha_response">###SR_FREECAP_NOTICE###</label>
###SR_FREECAP_CANT_READ###
<br />
<input type="text" size="15"
id="tx_your_extension_id_pi1_captcha_response" name="captchafield"
title="###SR_FREECAP_NOTICE###" value="">
###SR_FREECAP_IMAGE###
</div>
<!--###CAPTCHA_INSERT###-->*
I saved this template file in my filelist and make reference to it in TS
Setup
in class.tx_neofileshare_pi1.php, in the main function I included:
*if (t3lib_extMgm::isLoaded('sr_freecap') ) {
require_once(t3lib_extMgm::extPath('sr_freecap').'pi2/class.tx_srfreecap_pi2.php');
$this->freeCap = t3lib_div::makeInstance('tx_srfreecap_pi2');
}*
in the neo_getForm function I included:
*if (is_object($this->freeCap)) {
$markerArray = array_merge($markerArray, $this->freeCap->makeCaptcha());
} else {
**$subpartArray['###CAPTCHA_INSERT###'] = '';
}*
the last requirement is what keeps me stumped. the manual directs me to add:
*if (is_object($this->freeCap) &&
!$this->freeCap->checkWord($your-form-data['captcha_response'])) {
do-something about-it
}*
instead of "*your-form-data*" I used PiVars, and for
"*do-something-about-it*" I made a reference to the ets_returnStatus
function with a false entry.
I'm sure I have the right idea on how to edit the extension, but the
syntax is killing me. any help would be appreciated.
- David
More information about the TYPO3-english
mailing list