Social Bookmarking on Exhibit pages

Hi helpful crew,

I am wondering if anyone has gotten the social bookmarking plugin to work on pages other than the items and collections. Our exhibits have a lot of straight-up exhibit pages with text which we would love to encourage people to share. Is the plugin really only customized for sharing items and collections, or would it be relatively simple to make the links/icons appear at the bottom of other pages?

Thanks for any pointers!

As it currently stands, it's only built to work with collections and items, but it looks like a customization to the exhibit page in your theme could conceivably build it in.

The example code to look at is in SocialBookmarking.php, in the hookPublicItemsShow() method toward the end. It uses a hook to add content at the end of the items show page. I don't think that that hook is there for exhibit pages. If you override the exhibit builder's show.php file, though, you could probably insert similar content.

You would just have to dig up the url, title, and description of the exhibit page, then pass them into the same social_bookmarking_toolbar function that you see in that method.

At least that's the first approach I'd try. Hope that helps.

Thanks so much! We did get this working, both for normal exhibit pages and for our Neatline exhibits, which are our main feature.

We probably did it in a messy and unprofessional way (still learning!), but in case someone else is fumbling through this:

We added this to socialbookmarkingplugin.php for the Neatline pages, and did basically the same thing for Exhibits:
public function hookPublicNeatlineExhibitsShow()
if (get_option(SocialBookmarkingPlugin::ADD_TO_NEATLINE_EXHIBITS_OPTION) == '1') {
$neatlineexhibit = get_current_neatlineexhibit('neatlineexhibit');
$url = record_url($neatlineexhibit, 'show', true);
$title = strip_formatting(metadata($neatlineexhibit, array('Dublin Core', 'Title')));
$description = strip_formatting(metadata($neatlineexhibit, array('Dublin Core', 'Description')));
echo '<h2>' . __('Social Bookmarking') . '</h2>';
echo social_bookmarking_toolbar($url, $title, $description);

Then we put this in the show.php for our exhibits (and in the footer.php for our neatline exhibits):

<div id="social-bookmarking-toolbar">
<?php echo social_bookmarking_toolbar(); ?>