I have SecurityImages by Walter Cedric installed on my site (J1.0.15) (
http://www.waltercedric.com/joomla-releases-mainmenu-269.html) and am trying to get the security images to show in the tell-a-friend window.
Unfortunately I am not that familiar with coding. The information below is provided with this component and if anyone can get the security images to work in the tell-a-friend window I am sure itwould not just be a benefit for me but for most people who are using the module and are concerned about spamming from their site.
Using Security Images framework in Your code
This page is dedicated to developer of Joomla/Mambo code which want to use securityimages component in their code.
Using this framework is very simple....
In the page You send to the user...
Only 3 lines only are required
1. Include my library in page scope
if (file_exist($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php')) {
<?php include ($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php'); ?>
}
$packageName = 'securityChooseUniqueKeyName';
2. At the position where You want the Captcha image to be inserted
<?php echo insertSecurityImage($packageName); ?>
3. This insert the help text and the input box where the user will have to enter his text
<?php echo getSecurityImageText($packageName); ?>
Line at point 3. can be, in some case, depending how much space You have in the presentation HTML layer, replace with
* <?php echo getSecurityImageTextHeader(); ?> will be replace at runtime, depending on user locale with "Please Enter what You see:"
* <?php echo getSecurityImageTextHelp(); ?> will be replace at run time, depending on user locale with "If You do not see ...Hit reload"
* <?php echo getSecurityImageField($packageName); ?> will be replace at run time with the input box
The code above insert the image, and the text, You page normally submit information to the server for processing. Most of the time, the last 2 lines are inserted in a <form> </form> HTML tags
In the server code where you process the data...
Only 2 lines are required...
if (file_exist($mosConfig_absolute_path.'/administrator/components/com_securityimages/server.php')) {
include ($mosConfig_absolute_path.'/administrator/components/com_securityimages/server.php');
}
$packageName = 'securityChooseUniqueKeyName';
$security_refid = mosGetParam( $_POST, $packageName.'_refid', '' );
$security_try = mosGetParam( $_POST, $packageName.'_try', '' );
$security_reload = mosGetParam( $_POST, $packageName.'_reload', '' );
$checkSecurity = checkSecurityImage($security_refid, $security_try);
If the has entered the right text then $checkSecurity = true
Final Notes
* Securityimages component can be put in debug mode or be deactivated site wide.
* If is recommended to have a switch in your code to enable disable usage of securityimages in case the user hasn't installed it yet.