![]() |
|
MODx Revolution Integration Fatal Error - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: MODx Revolution Integration Fatal Error (/thread-8233.html) |
MODx Revolution Integration Fatal Error - rsgca - 11-02-2011 I'd like to access Zenphoto's template functions within a MODx snippet as per the Zenphoto as a 'plugin' user guide article. But I'm running into some trouble with [b]MODx Revolution 2.0.7-pl[/b] and [b]Zenphoto 1.4.0.2[/b] (installed in the I've attempted adding the suggested [i]constant definitions[/i] and a [i]require_once[/i] statement for the Zenphoto The chunk: The same code in a standalone PHP file returns a random image successfully. Someone found a solution for Evo back in 2008 by adding the constant definitions and require statement in the MODx Does anyone have any suggestions on how to get this working? MODx Revolution Integration Fatal Error - sbillard - 11-02-2011 Errors like this are most likely caused by the zenphoto "include" being done from within a function. This has the effect of making Zenphoto global variables become If you can figure out which varialbles this is happening to you can declare them global in your code snippit. MODx Revolution Integration Fatal Error - rsgca - 11-02-2011 Thank you for the response, sbillard, though I am uncertain how to implement your suggestion. Are the variables to which you refer located in the template-functions.php file? MODx Revolution Integration Fatal Error - sbillard - 11-02-2011 Implementing this is not an easy task because we do not know specifically what variables are impacted. I would make a guess that in this particular case it is the The best thing would be to figure out how to launch Zenphoto from not within a function call. (This is how Zenphoto does launch its plugins so that they do not suffer this issue.) MODx Revolution Integration Fatal Error - rsgca - 12-02-2011 For interested readers, I have posted the same question at the MODx forums. And for clarification to those familiar with MODx, the suggestion that I used a [i]chunk[/i] was a typo. I have in fact used a [i]snippet[/i] for the PHP code. |