Hi
I have just upgraded to 1.4.3 and now my use of album image statistics plugin has stopped working. I have a page completely seperate from zenphoto on my site where I had the following includes of zenphoto files.
`
include DOCUMENT_ROOT.'/gallery/zp-core/template-functions.php';
include DOCUMENT_ROOT.'/gallery/zp-core/zp-extensions/image_album_statistics.php';
$latest_images = getImageStatistic(9, 'latest', '', false);
`
However, when I go to this page, I get zenphoto saying it has detected a change in myinstallation and to reupload all the setup files. I have done this twice now and still the same issue every time. Access to my gallery works perfectly fine, so this is only happening on this one page. I have commented out the last two lines so it just does an include of template-functions.php and still the error occurs.
Any ideas on why this isn't working? Is there another file I need to be including?
Comments
Is there a reason why the way the paths are worked out was changed from this:
`
dirname(dirname(__FILE__)) . '/' . DATA_FOLDER . "/zenphoto.cfg"
`
to this:
`
$const_serverpath.'/'.DATA_FOLDER."/zenphoto.cfg"
`
where $const_serverpath is worked out using the script filename, which is the filename of the script that does the include.
`
$const_serverpath = str_replace('\\','/',dirname($_SERVER['SCRIPT_FILENAME']));
`
You will have to add a define for `SERVERPATH` to your code, though. `define('SERVERPATH',DOCUMENT_ROOT.'/gallery');` should probably be correct.
`
if (defined('SERVERPATH')) {
$const_serverpath = SERVERPATH;
}
`
I also needed to define the OFFSET_PATH before doing the include as line 20 in functions_basic.php does an if (OFFSET_PATH) and this generates stuff in the error logs about undefined constant if it hasn't been defined. I set it to zero and it seems to work, but I'm not to sure what it should be.
Thanks for your help.
I guess we need to make an article about how to do this now. Maybe you could post a draft of what you needed to do?