Zum Inhalt springen

freecap : Wohin damit?

Erstellt am 5. Mai 2008 · 1 Antwort · letzte Antwort am 23. August 2008

Tags: Frage

wolkenunddreck ·

versuche für ve_guestbook freecap anzeigen zu lassen:

die folgenden Stellen im manual sind mir nicht klar:

Invoking the CAPTCHA methods
Class inclusion and instantiation
The tx_srfreecap_pi2 class may be used in any Typo3 frond end plugin.
Insert statements similar to the following in order to include it and instantiate it your script:
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');
}
Filling the CAPTCHA subpart marker
Insert statements similar to the following in order to fill the CAPTCHA subpart marker:
if (is_object($this->freeCap)) {
$markerArray = array_merge($markerArray, $this->freeCap->makeCaptcha());
} else {
$subpartArray['###CAPTCHA_INSERT###'] = '';
}

Method makeCaptcha() returns a marker array with filled in values for markers: ###SR_FREECAP_NOTICE###, ###SR_FREECAP_CANT_READ###, ###SR_FREECAP_IMAGE### and ###SR_FREECAP_ACCESSIBLE###.
Checking the input string against the CAPTCHA string
Insert statements similar to the following in order to validate the string entered by the user in the CAPTCHA input field:
if (is_object($this->freeCap) && !$this->freeCap->checkWord($your-form-data['captcha_response'])) {
do-something about-it
}

Method checkWord($string) returns true if the correct string was entered or false otherwise.

knapp gesagt: Es ist mir nicht klar, wohin mit dem code:
ins Template von ve_guestbook "guestbook_template.tmpl", und
wenn ja, wohin genau dort?

Also die Anleitung ist nicht sehr verständlich, das liegt nicht so sehr daran, dass sie in englisch verfasst ist, sondern dass sie zuviel als bekannt vorraussetzt. Mag mir mal jemand das oben genannte in Klartext übersetzen, beziehungsweise einfach sagen, wo ich das genau hinkopieren könnte? Ich wäre sehr dankbar !!!

Andrea_Herzog ·

Wenn es denn noch aktuell ist:

Du musst da nichts machen.
Gästebuch Plugin Form muss auf der Registerkarte Formular sr_freecap ausgewählt werden.
Das wars schon.

Gruß
Andrea