Problem/Motivation
The Pinterest widget allows images to be posted to pinterest.com. However, the image url needs to change on every page, and the AddThis module doesn't allow this functionality.
According to http://www.addthis.com/features/pinterest the anchor tag needs the following attribute added:
pi:init:media="http://YOUR-DOMAIN.com/IMAGE.jpg"
The full output should then be:
<a class="addthis_button_pinterest_pinit" pi:pinit:media="http://YOUR-DOMAIN.com/IMAGE.jpg" pi:pinit:layout="horizontal"></a>
This is achievable by using the "Customize Services" at admin/settings/addthis/custom (see screenshot).
However, that hard-codes the image url, and we need it dynamically generated per page.
Proposed resolution
The Service Customizations are retrieved like so:
$definitions = variable_get('addthis_service_customizations', array());
I propose adding the following after that line:
drupal_alter('addthis_service_customizations_alter', $definitions);
Then either the AddThis module can add some code to implement this hook, or break this off into another module - which may be preferable, since we need to choose which image to pin per node (the easy solution: a CCK image field; the hard solution: grab the first image that shows up in the node body).
Comments
Comment #0.0
burningdog commentedReformatted using the Issue Summary Template
Comment #0.1
burningdog commentedRemoved code tags
Comment #1
burningdog commentedI'm not convinced that this hook needs to be added in. If no information is available to pinterest, it will simply present the user with a montage of images and the user chooses which image they want.
It's a fair amount of work to isolate specifically which image you'd like to post to pinterest on the drupal side and to add configuration for that - unless you want specific image urls, this is unnecessary extra functionality. I'm choosing to instead use the generic pinterest button, and let users choose the image on pinterest.
Leaving this issue open in case someone else wants to chip in...otherwise I have no objections to the maintainer closing it.
Comment #2
burningdog commentedSetting priority to normal.
Comment #2.0
burningdog commentedRemoved the "This module is unusable" line - because it *is* usable.
Comment #3
gisleThis feature request is 4 years old and is about an outdated version of the module. In that time nobody else has wanted this feature. It is time to close.