ZenphotoCMS Forum
getBareGalleryTitle() in admin - 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: getBareGalleryTitle() in admin (/thread-7172.html)



getBareGalleryTitle() in admin - micheall - 2010-06-11

Ok, so I've run into a sort of stumbling block with some of the coding for the zenFB stuff I'm working on.

//addPluginScript('');

When using the above (uncommented) the plugin works fine on the front end. However when attempting to access the options, I receive the following fatal error.

Quote:mod_fcgid: stderr: PHP Fatal error: Call to undefined function getBareGalleryTitle() in /home/micheall/domains/michealluttrull.com/public_html/zen/plugins/zenFBLike.php on line 27
I assume it's because the admin backend isn't loading the template functions. Is there another way to add data to the meta tags other than addPluginScript()?

I thought about having it load the zenphoto template functions (like you would to integrate zp as a plugin) but that seems like a lot of extra overhead... (and a bit of a hassle for a simple plugin.)




getBareGalleryTitle() in admin - sbillard - 2010-06-11

Presumably you do not need this script on the backend. So you can put an if statement around it:

if (!OFFSET_PATH) { front end stuff }
Otherwise, the galery title is $gallery->getDesc(). Of course you will have to instantiate a gallery.