1. No, no option or such for this as generally all plugin functions are available everywhere. So general Zenpage functions are also usable outside news.php and pages.php in case your theme uses a different structure for example. Why do you need that specifially?
I have a made a little script for my news and pages files. It's a Back to top link. It's usefull in a long thread in a blog.
My script works and i'll to give this script for the Zenphoto community. But at this time it's not a plugin, it's a hack. So i made the plugin, but the Back To Top Link it's printed on all the site.
I will think on another solution.
edit : i try this approach :
`if ($_zp_gallery_page == 'pages.php') {` my script `}` but it's doesn't seem to work
Of course it's a little "overload" but i know some photographer who don't know HTML or PHP (and they don't want to know because it's no their job) but they want more functionality like this one. So i think it's a good idea to simplify the integration of new function by making a plugin. In this way, they have just to activate or not, the plugin they want without editing the code.
The plugin will be ready this evening but i'll drop the zp_register_filter function. In this way they only have a line to cut and paste in the file.
Ok, was just asking. You should be able to test for the theme page, there are also Zenpage funcitons to check that.
i know some photographer who don't know HTML or PHP (and they don't want to know because it's no their job) but they want more functionality like this one.
Well, sometimes people should get a specialist if they need something special ;-)
Comments
2. This number determines the filter load priority:
http://www.zenphoto.org/news/zenphoto-plugin-architecture#template-plugins
I have a made a little script for my news and pages files.
It's a Back to top link. It's usefull in a long thread in a blog.
My script works and i'll to give this script for the Zenphoto community. But at this time it's not a plugin, it's a hack.
So i made the plugin, but the Back To Top Link it's printed on all the site.
I will think on another solution.
edit : i try this approach :
`if ($_zp_gallery_page == 'pages.php') {`
my script
`}`
but it's doesn't seem to work
If you check for `$_zp_gallery_page` make sure it is set to global within a function.
So i think it's a good idea to simplify the integration of new function by making a plugin. In this way, they have just to activate or not, the plugin they want without editing the code.
The plugin will be ready this evening but i'll drop the zp_register_filter function. In this way they only have a line to cut and paste in the file.