Ok I'm sorry I'm being extremely unclear here, but I have to be as "vague" as possible as I cannot give away too much code as this is a Federal Government funded project I'm working on, thus the code is locked down, so I have to be unclear, but I'll try to open a few windows here.
In "project_globals.inc.php" you have an array that is this:
$successMsgArray = array('image' => array('add_album' => "Album: \"$album\" has been created",
'edit_album' => "Information for album \"$album\" has been changed",
'delete_album' => "Album: \"$album\", along with any metadata, has been deleted",
'upload' => 'Successful uploading of "#locationPath#/#fileName#"',
'download_image_email' => 'We have successfully emailed "#locationPath#/#image_name#" to "#download_sender_email#"',
'download_image_url' => 'The URL for "#image_name#" has been sent to "#download_sender_email#"',
'download_all' => 'All ' . ucfirst($section) . 's in "#locationPath#" have been sent as ZIP to "#download_sender_email#"',
'download_select' => 'Select ' . ucfirst($section) . 's in "#locationPath#" sent as ZIP to "#download_sender_email#"',
'resize' => 'Successful resizing of "#locationPath/#fileName#"',
'edit' => 'Information for #section#: "#fileName#" has been changed',
'remove' => 'All information for #section#: "#fileName#" has been deleted - #section# remains',
'delete_image' => 'All information for #section: "#fileName#" has been deleted - #section# also deleted',
'delete_all_images' => 'All #{section}#s in "#locationPath#" have been deleted along with any metadata',
'delete_select' => 'Select #{section}#s in "#locationPath#" have been deleted along with any metadata',
'move_images' => "All ${section}s have been moved to \"$album\"",
'move_nonimages' => 'This was a video at "#locationPath#" that has been moved to a video location'),
'video' => array(),
'person' => array(),
'keyword' => array(),
'event' => array(),
'placement' => array()
);
Now, in the "classes.inc.php", which has to be called AFTER "project_globals.inc.php", you have this method inside the class MethodGeneratorForActionPerformer:
/**
* Generate Success message, will set to global scope constructing dynamically-named variable ${$section . 'LocationPath'}
*
* @access public
* @return mixed HTML success message depending upon action
*/
function &getSuccessMsg() { // STATIC STRING METHOD
global $section, $action, ${$section . 'LocationPath'}, $successMsgArray;
if (is_array($_POST) && @sizeof($_POST) > 0) foreach ($_POST as $key => $val) if (!isset(${$key})) ${$key} = $val;
$locationPath = ($album) ? "${$section . 'LocationPath'}/$album" : ${$section . 'LocationPath'};
$this->fileName = ($image_name) ? $image_name : $this->fileName;
$fileName = $this->fileName; // FOR REASSIGNMENT INTO GLOBALIZED 2-DIM ARRAY FROM PROCEDURAL GLOBAL LIBRARY project_globals.inc.php
$msg = preg_replace('/#([^#]+)#/i', eval('\$' . '$1'), $successMsgArray[$section][$action]);
return $msg;
}
Now do you see what I mean? I have to replace #var# with $var because, in the array in project_globals.inc.php, $var does not yet exist.
I hope that helps, sorry if I'm still not clear enough.
Thanx
Phil