"pin it" button for Zenphoto

kilroy Member
I could not find any mention of Pinterest on the forum or user guide, so I supposed there was no "pin it" button for Zenphoto and embarked into making one.

Here is what I have done so far:

`
<?php
function getFullPageURL() {
$pageURL = 'http://' . $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
return $pageURL;
}
?>

<?php
function getWebsiteRootURL() {
$rootURL = 'http://' . $_SERVER["SERVER_NAME"];
return $rootURL;
}
?>

&media=<?php echo urlencode(getWebsiteRootURL()); echo urlencode(getFullImageURL( )); ?>&description=<?php printImageTitle(); ?>" class="pin-it-button" count-layout="horizontal">image
`
I created a custom function to return the full URL of the current page and another one to return the website root URL as I found no equivalents in Zenphoto.
Do they exist?

I still have a little problem:

I would like to mention the author in the description. As I found no author field for an image, I planned to use the copyright metadata.
Unfortunately the getCopyright() function returns an error when used on an image page.
How can I display the contents of this field?

Thanks in advance for any hints.

Comments

Sign In or Register to comment.