[TYPO3] Tutorial: tipafriend and sr_freecap

Fabian Koenig koenig at bluhouse.de
Thu Apr 26 19:20:34 CEST 2007


I still have after posting it here ;-)
(I'm not good in using a wiki, so I don't know how to add it to the
extensions-category).

look here:
http://wiki.typo3.org/index.php/Tipafriend_and_freecap

I hope, someone add it to the extensions-category @wiki.
I'm to stupid ;-)


Gideon So schrieb:
> Hi Fabian,
> 
> 	It's great. Whu don't you put this into the wiki??
> 
> Gideon
> 
> Fabian Koenig ´£¨ì:
>> I've written a small "ToDo"-List for using "sr_freecap" 
>> (captcha-extension) with "tipafriend", because I can't find any HowTo.
>> (my english is bad, sorry..)
>>
>>
>>
>>
>> ===class.tx_tipafriend.php===
>> 1. Insert following directly under "function 
>> main_tipafriend($content,$conf){":
>> 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');
>> }
>> (line ~60)
>>
>>
>>
>> 2. Replace "$markerArray['###CAPTCHA_HTML###']=$captchaHTMLoutput;" with:
>>             if (is_object($this->freeCap)) {
>>                 $markerArray = array_merge($markerArray, 
>> $this->freeCap->makeCaptcha());
>>             } else {
>>                 $subpartArray['###CAPTCHA_INSERT###'] = '';
>>             }
>> (line ~210)
>>
>>
>>
>> 3. Replace "($captchaStr===-1 || ($captchaStr && 
>> $tipData['captchaResponse']===$captchaStr))" with:
>>             $this->freeCap->checkWord($tipData['captchaResponse'])
>> (line ~275)
>>
>>
>>
>> ===tipafriend_template.tmpl===
>> 1. Replace "###CAPTCHA_HTML###<input type="text" size=30 
>> name="TIPFORM[captchaResponse]" value="">" with:
>>             <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="TIPFORM[captchaResponse]" name="TIPFORM[captchaResponse]" 
>> title="###SR_FREECAP_NOTICE###" value="">
>>                 ###SR_FREECAP_IMAGE###
>>             </div>
>>
>>
>>
>>
>>
>> Hope it helps..
>> Fabian


More information about the TYPO3-english mailing list