Thank you pbottcher for trying to help. Over the last couple of days I have tried many things and learned some things. I am using Appgini Pro Edition, version 5.97, revision 1142 to create my webapp.
In this version of Appgini, the path for the images folder in pulled from the config.php file, specifically the property (?) 'baseUploadPath'. I know this because I manually edited the value of 'baseUploadPath' and it changed where the images were saved to.
I tried the following to determine when the config.php file was read: I opened the config.php file in Notepad++, then opened my webapp and started the process of uploading a new image. At the point where you select the image and click the OPEN button, I changed the config.php to show a different path than the one the webapp opended with and the image was saved to the new location, once I clicked the OPEN button. So it appears the config.php file is read as part of the INSERT event.
I have tried adding this to the /hooks/header-extrs.php file:
Code: Select all
<?php
$adminConfig['baseUploadPath'] = './images/gallery/duck-season-2015';
?>
Didn't work.
Next I tried adding the same thing to the /hooks/duck-season-2015.php in the INIT section and then in the BEFORE INSERT event section:
Code: Select all
<?php
$adminConfig['baseUploadPath'] = './images/gallery/duck-season-2015';
?>
Didn't work.
The only thing that half way worked was I created the file adsisc.php:
Code: Select all
<?php
global $fdr;
$fdr = './images/gallery/';
?>
Then I added this code at the end of config.php:
Code: Select all
include_once "adsisc.php";
$adminConfig['baseUploadPath'] = $fdr;
This worked but what I really would like is to set the value of $fdr in the BEFORE INSERT event in the /hooks/duck-season-2015.php file. I tried doing this:
Code: Select all
function duck_season_2015_init(&$options, $memberInfo, &$args) {
include_once 'adsisc.php';
return TRUE;
}
and
Code: Select all
function duck_season_2015_before_insert(&$data, $memberInfo, &$args) {
$fdr = './images/gallery';
return TRUE;
}
and finally modifiy adsisc.php:
Did not work, seems the value of $fdr never makes the trip to config.php via adsisc.php.
So, I am sure I have missed something and I am hoping you guys can help me figure this out'
TD