Hi Walter,
thanks for pointing me to your forums

Well, the changes I have made are not big, but they should fix problems that occur when you're using a script on your Joomla! site that has started a session with a different session name than "md5($mosConfig_live_site)" before Security Images can do that (= SMF bridge, VirtueMart and many others).
The checker code is affected by such problems, not the image generation code.
So the checker code must check for an opened session with a different session name, stop that session and start a new one. EASY!
I'm using freecap, so I have changed the code in the file
/administrator/components/com_securityimages/pluginsA/freecap/1.4/checker.php,
function icheckSecurityImageFROM
session_name( md5( $mosConfig_live_site ) );
session_start();
TO
if( empty( $_SESSION )) {
session_name( md5( $mosConfig_live_site ) );
session_start();
} elseif( session_name() != md5( $mosConfig_live_site ) ) {
$old_session = session_name();
session_write_close();
session_name( md5( $mosConfig_live_site ) );
session_start();
}I have preserved the old session name in an extra variable, so we can stop the Security Images session and restart the session we had before, before returning "true" or "false".
Another small Javascript improvement can be done in the function
SecurityImagesNew, file
/components/com_securityimages/js/securityImages.js: It now needs 3 arguments (in the 3.1.x series it needed no argument). But one argument would be enough and the other 2 could be optional!
This is my changed function:
function SecurityImagesNew(packageName, packageNameTry,packageNameReload )
{
myImageGeneratorSource = getElement(packageName).src;
myImage= getElement(packageName);
if( !packageNameTry ) { // Assemble the fieldname
packageNameTry = packageName + '_try';
}
if( !packageNameReload ) {
packageNameReload = packageName + '_reload';
}
myUserInputBox= getElement(packageNameTry);
myReloadHiddenField = getElement(packageNameReload);
//reset input box
myUserInputBox.value="";
//ask server for a new picture, reload will be use to determine entry shift into DB
myImage.src = myImageGeneratorSource+"&reload="+myReloadCounter;
myImage.height = myImage.height;
myImage.width = myImage.width;
//reload counter submitted for checker
myReloadHiddenField.value=myReloadCounter;
myReloadCounter++;
myUserInputBox.focus();
}So you only need to pass one argument to the function. Example:
<script>SecurityImagesNew( 'security_vmreg' );</script>I needed to call the function directly for my ajax-based registration form for the SMF forum.
I hope this helps others as well.
ciao, Sören