26
Here's the instructions for using with Liaise:
1/ copy files from distribution (NB on a XOOPS 2.2 installatio, copy only lines from language/lang/global.php that are required for securityimage to work: they are clear to see.)
2/ chmod the uploads/securityimage/cache directory to 0777
3/ add following line to end of root/class/xoopsformloader.php
Quote:
//added for DuGris security image
include_once XOOPS_ROOT_PATH."/class/xoopsform/securityimage.php";
4/ add following lines to root/modules/liase/index.php before the line that reads
include 'include/form_execute.php';
Quote:
// Hack for SecurityImage
include_once(XOOPS_ROOT_PATH . "/class/xoopsformloader.php");
if ( defined('SECURITYIMAGE_INCLUDED')) {
if (!SecurityImage::CheckSecurityImage() ) {
redirect_header( XOOPS_URL."/modules/liaise/index.php?form_id=".$form_id, 2, _SECURITYIMAGE_ERROR ) ;
exit();
}
} else {
die('Unable to load SecurityImage library');
}
// End Hack for SecurityImage
5/ add the following lines to root/modules/liaise/include/form_render.php after the line that reads (at about line 59)
$form_output->addElement(new XoopsFormHidden('form_id', $form->getVar('form_id')));
Quote:
// Hack for SecurityImage
if ( defined('SECURITYIMAGE_INCLUDED') ) {
$security_image = new SecurityImage( _SECURITYIMAGE_GETCODE );
if ($security_image->render()) {
$form_output->addElement($security_image, true);
}
else {
die('Unable to load SecurityImage library');
}
}
// End Hack SecurityImage
BTW, you can see this working at
xoobs.netRegards
Ashley