Member
Member
micheall   2010-06-04, 21:48
#1
Ok, so I'm working with the facebook Open Graph stuff working on the new plugin.

One of the things that you can pass is certain descriptive data for the like buttons etc, like page title, thumb image etc.

Running into a couple issues though. Not every page in zen uses the same identifiers etc. For instance, if I'm on a zenpage page I can use "getBarePageTitle" for the page title. If I'm on an image page, I would have to use getBarImageTitle. Is there a simple way to identify what type of page you're on?

For instance something like
if isImage then code
or
if isPage then code
Member
Member
micheall   2010-06-04, 21:53
#2
I see there is a isImagePage, but I don't see anything for pages... isMyPage if it was the users page, I guess that might work in a single-admin style environment.

Edit:
found it a bit further down the functions list. "is_Pages"
Member
Member
sbillard   2010-06-04, 22:11
#3
There is also the global `$_zp_gallery_page` which will be the script name (e.g. album.php, image.php, pages.php, etc.)

For a good example of its use, look at the `printAdminToolbox()` function.
Administrator
Administrator
acrylian   2010-06-05, 09:10
#4
We have also for Zenpage:
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_NewsArticle
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_Pages
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_NewsCategory
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_NewsArchive
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_News

You will of course have to check if the plugin is enabled by using `if(getOption('zp_plugin_zenpage') {...}`

If using CombiNews mode for hte news loop you can even differ the type of the news entry with:
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionis_GalleryNewsType
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functiongetNewsType
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.