![]() |
|
Link to this page? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: Link to this page? (/thread-6010.html) |
Link to this page? - Ipstenu - 2009-10-18 This is weird, I know. I want to make a 'tweet this!' link on the pages, and to do that, I need to be able to self-reference the URL. `<p class="entry-meta">Tweet This ` Obviously I want to replace URLGOESHERE with ... the URL ;) So How can I extract THIS page's URL? That is if I have it on an album page, I want it to show the album URL, etc etc. Link to this page? - kagutsuchi - 2009-10-18 You should be able to do this simply through PHP using `$_SERVER['HTTP_HOST']` and `$_SERVER['REQUEST_URI']`. Link to this page? - acrylian - 2009-10-19 Or by using functions available: http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetAlbumLinkURL http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetImageLinkURL http://www.zenphoto.org/documentation/plugins/zenpage/_plugins---zenpage---zenpage-template-functions.php.html#functiongetNewsURL http://www.zenphoto.org/documentation/plugins/zenpage/_plugins---zenpage---zenpage-template-functions.php.html#functiongetPageLinkURL It helps to look at the documentation, all functions are titled quite "speaking"... Link to this page? - Ipstenu - 2009-10-19 I suspected there was a function for it, and I think my brain just glazed over at a certain point trying to find it (search only works when you know WHAT you're looking for, y'know ;) ). Also remembering that some times you need an echo. ` [url=http://twitter.com/home?status=Looking%20At:%20 <?php echo getAlbumTitle();?>:%20http://my.domain.com/ <?php echo getAlbumLinkURL(); ?>]Tweet This ` and for image.php ` [url=http://twitter.com/home?status=Looking%20At:%20 <?php echo getImageTitle();?>:%20http://my.domain.com/ <?php echo getImageLinkURL(); ?>]Tweet This ` Muchas Gracias! Link to this page? - acrylian - 2009-10-19 Yes, that is why we try hard to name our functions "speaking". Also basically every "get" function has a "print" equivalent. Link to this page? - Ipstenu - 2009-10-19 And that's why I've been recommending y'all to everyone who wants a gallery on their website right now! Well coded and helpful! |