Plugin

Community
Support

Berry Timmermans does not actively monitor this forum
(but you can still get help from other EE users).

EE 1
EE 2
HJ Social Bookmarks

Back to this add-on's main page
View Other Add-ons From Berry Timmermans

     

You must be logged in to post.

Adding Pinterest to the list

General

Chris Arnold
Chris Arnold

I’m tackling adding Pinterest to this addon and am 75% there. Pinterest requires both the URL (typical) and a specific image link (not typical) to be “pinned” into a user’s account.

What might be the best way to go about defining an $imageLink variable? It’s not as smart as Facebook in that it lets the user choose from all images on the page. That would’ve been too easy.

Thanks!

Chris Arnold
# 1
Chris Arnold

With some help from the developer, here is the solution:

(1) Open the plugin file and create a variable around line 64:
$image = $this->EE->TMPL->fetch_param(‘image’);

(2) Then append the variable to the new Pinterest url, e.g.:
http://pinterest.com/pin/create/button/?url=’ . $permalink . ‘&media=’ . $image

(3) Then in the template for your page, add the new variable to the tag. In my case a matrix row:
{exp:hj_social_bookmarks sites=“Pinterest” entry_id=”{entry_id}” image=”{photos limit=“1”}{image}{/photos}”}

You’ll obviously also need to create your own Pinterest image, etc following suite from the other HJ Bookmarks. Thanks to Berry!

Berry Timmermans
# 2
Developer
Berry Timmermans

0.9.6.7 Added Pinterest