ZenphotoCMS Forum
Ajax called PHP file SCOPE - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: Ajax called PHP file SCOPE (/thread-8664.html)



Ajax called PHP file SCOPE - whancock - 2011-05-27

Hi, I'm trying to develop an AJAX theme, and was wondering if someone could answer a question for me. I call a PHP file from jquery after the page loads. Inside of this PHP file, I would like to call some system methods... E.G. query(), but they are not visible.

Any help would be appreciated on how to work around this. Thanks in advance!




Ajax called PHP file SCOPE - acrylian - 2011-05-27

You have to call that page as a custom theme page to have the theme context available. See the theming tutorial on that.




Ajax called PHP file SCOPE - whancock - 2011-05-27

Great, thanks for the quick reply! It all makes sense now.