$modx= new modX(); $modx->initialize('web'); $modx->addPackage('captcha',$captcha_core_path.'model/'); $modx->loadClass('captcha.VeriWord',$captcha_core_path.'model/',true,true); $modx->lexicon->load('captcha:default');
$modx= new modX(); if (! $modx) { echo "\nNo MODX"; } $modx->initialize('web'); $success = $modx->addPackage('captcha',$captcha_core_path.'model/'); if (! $success) { echo "\nCould not load Captcha class"; } $success = $modx->loadClass('captcha.VeriWord',$captcha_core_path.'model/',true,true); if (! $success) { echo "\ncould not load Veriword class"; } $modx->lexicon->load('captcha:default');
There are 2 php modules required for this. One good way to test this is to log into the manager, and see how the login page is affected in a second browser. See the wiki for info/troubleshooting:
http://wiki.modxcms.com/index.php/CAPTCHA#Server_support
<img src="[+verimageurl+]" alt="verification code" border="0"/>
<div id="commentsAnchor"> <p><strong>Below you can write a review or comment for this listing.</strong><br />For more detailed York discussions with visitors & residents please see our <a href="http://www.insideyorkshire.uk/forum" target="_blank" title="Yorkshire Chat Forum">Yorkshire Talk forum.</p> [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`4` &badwords=`dotNet` &captcha=`1` &moderated=`1` ¬ify=`2` &canmoderate=`Administrator` !] </div> You can also rate this restaurant, place or attraction by awarding it stars below: [!star_rating? &useSession=1 &onevote=1!] [+starRating+] [+totalVotes+]