Adding Pinterest Pin-it button to a Joomla Site

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
sd12013
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Wed Nov 29, 2006 7:07 pm

Adding Pinterest Pin-it button to a Joomla Site

Post by sd12013 » Mon Jan 09, 2012 11:02 pm

Since each page is dynamically created for a Joomla site built into a single index.php framework, and the pin-it code for each page requires a specific image url, is there even a generic string variable you can dictate in a static pin-it script that will dynamically feed the pages' image urls into the button's code?

It seems like you'd need some new fields added to the Article editor via a plugin to specify the urls of the images that could be pinned along with their respective descriptions. Or is there another way?

Pinterest seems to be all the rage these days. Does anyone know of a solution? I hoping there's something simple I'm just overlooking.

You could dynamically create the url for the button script something like this, but I don't have a clue what you would put for the [image.jpg] in the body script:

head:

Code: Select all

<script type="text/javascript">
(function() {
    window.PinIt = window.PinIt || { loaded:false };
    if (window.PinIt.loaded) return;
    window.PinIt.loaded = true;
    function async_load(){
        var s = document.createElement("script");
        s.type = "text/javascript";
        s.async = true;
        s.src = "http://assets.pinterest.com/js/pinit.js";
        var x = document.getElementsByTagName("script")[0];
        x.parentNode.insertBefore(s, x);
    }
    if (window.attachEvent)
        window.attachEvent("onload", async_load);
    else
        window.addEventListener("load", async_load, false);
})();
</script>
body:

Code: Select all

<a href="http://pinterest.com/pin/create/button/?url=<?php echo $live_site; ?>&media=[image.jpg]" class="pin-it-button" count-layout="horizontal">Pin It</a>
edit: I just found that WordPress has something similar to what I was imagining"
http://flauntyoursite.com/pin-it-on-pinterest/
Could something like this be developed for Joomla?

User avatar
chrisjclay
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Thu Sep 18, 2008 6:05 pm
Location: Vancouver Island, Canada
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by chrisjclay » Thu Jan 12, 2012 7:09 pm

I'm sure it won't be too long before someone comes up with something similar... I may give it a try myself later this week, though I'm most interested in having it incorporated into my EasyBlog posts (I just posted a request in their discussion forum.)
Clay & Co.
Web development powered by Joomla!

Web: www.clayco.ca
Twitter: http://www.twitter.com/clayco_ca

karendanaher
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon May 17, 2010 2:11 pm

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by karendanaher » Thu Feb 23, 2012 8:35 pm

I found this module to add "follow us on pinterst" to your site
http://inceptdesign.com/joomla

Hope this helps - I like it I just would like to get rid of where it reads "web design" on the button

User avatar
tamnl
I've been banned!
Posts: 237
Joined: Wed Jan 11, 2012 8:08 am
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by tamnl » Fri Feb 24, 2012 10:35 am

@Karen: yeah, I know it but it's for Joomla 1.6 :(
I want to know about this extensions too. Can you give some more recommendations?
[Free extension] Make Joomla joyful to use: http://extensions.joomla.org/extensions ... tion/20267
Start with Joomla 3.0 easily: http://www.joomlashine.com/blog/free-eb ... vices.html!

User avatar
chrisjclay
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Thu Sep 18, 2008 6:05 pm
Location: Vancouver Island, Canada
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by chrisjclay » Fri Feb 24, 2012 9:57 pm

It should also work on Joomla 1.7 and 2.5 sites. However, it only creates a "follow me on pinterest" button. I'm hoping for a plugin that will add a "pin it" button to articles and K2 items, though at least EasyBlog 3.5 will have this feature. It should be coming out soon.

Chris
Clay & Co.
Web development powered by Joomla!

Web: www.clayco.ca
Twitter: http://www.twitter.com/clayco_ca

julieo
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Dec 07, 2011 12:23 am

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by julieo » Sun Feb 26, 2012 2:36 pm

I am looing for a pin it button as well.

User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by dattard » Sun Mar 04, 2012 10:08 am

Hi guys and girls,

I scripted a number of modules and plugins for Pin It this week, it would be great if you could test and give me some feedback on these.

1. Simple Pin It module - just creates a Pin It button in a module
2. Pin It Module - allows you to create Pin It button, Follow me on Pinterest, or both.
3. Pin It plugin - replaces {pinit} text with a Pin It button

All can be found on my website linked below.

Would love it if you could install and give them all a test run.

Thanks in advance.

David
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!

User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by dattard » Sun Mar 04, 2012 5:11 pm

Oh and by the way, these are for 2.5. Did not notice the message was in the 1.5 forums!
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!

washirv
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Apr 17, 2012 12:41 pm

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by washirv » Tue Apr 17, 2012 1:10 pm

Hi All

I've just added a dynamic Pin It button to the product page on my store. I'm working on Joomla! 1.5.23 and Virtuemart 1.1.9. To have the url and full image path dynamically passed on to Pinterest, I had to add their variables to the template. This is done in /administrator/components/com_virtuemart/html/shop.product_details.php. You add around line 458:

Code: Select all

$self_url = $sess->url($_SERVER['PHP_SELF'] . "?page=shop.product_details&product_id=$product_id");
$self_url .= '&flypage='.$ps_product->get_flypage($product_id).'&pop='.$pop;
$tpl->set( "MY_url", $self_url );
$tpl->set( "MY_thumb", $product_thumb_image );
$thumb_imgurl = JURI::base() . "components/com_virtuemart/shop_image/product/" . $product_thumb_image;
$tpl->set( "MY_thumb_url", $thumb_imgurl);
This adds the full page URL and the thumbnail URL to the template for later use.

To pull these parameters and place the actual button: /components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php . Add around line 67 (or wherever you want the button) the code from the Pinterest site, dynamically changing the url, image and description:

Code: Select all

<a href="http://pinterest.com/pin/create/button/?url=<?PHP echo "http://www.YOUR_DOMAIN_NAME.com/".$MY_url ?>&media=<?PHP echo $MY_thumb_url ?>&description=<?PHP echo $product_name ?>" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
It works for me and looks good in Pinterest.

One issue is that clicking the picture in Pinterest doesn't lead to the product, only to the site. I think the bug is ok their side, since the code passes the correct url, and I also saw this phenomena on other Pinterest posts (not VM).

Another curious thing is that if you add the small <script> they ask for, it completely undoes everything you do on the button. I don't know why this happens, but I didn't add it and it works fine.

Good luck everyone.

Yakir.

rlmacalintal
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Apr 17, 2012 1:29 pm
Location: Singapore
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by rlmacalintal » Tue Apr 17, 2012 1:38 pm

wow..pin button on joomla site will be a gread add-ons. i'll try it on my site

SterlingOne
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri May 28, 2010 10:27 pm

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by SterlingOne » Wed Apr 25, 2012 7:22 am

Oh my god, thank you! I can't believe I just said OMG but OMG! What a great snippet of code...

saurabhshyara
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Jan 06, 2010 12:30 pm
Location: India
Contact:

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by saurabhshyara » Fri May 11, 2012 7:53 am

Hey guys want to share something with you on this pinterest module on Joomla site. I tried some Pinterest Joomla addons and code, but none of them worked or picked the image automatically from the Joomla pages. Got a link from a friend and tried them and damn, they worked SUPERB!!! I can tell, Fancy Bookmarks Plugin is the best out of them. It even lets you choose the image, which you want to pin. You can check out these guys: http://www.qubesys.com/top-pinterest-ex ... or-joomla/

Hope it helps...
https://www.isquaretechnologies.com - Joomla Web Design and Development Services

munjin
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 26, 2009 12:13 pm

Re: Adding Pinterest Pin-it button to a Joomla Site

Post by munjin » Sun May 20, 2012 9:23 pm

thanks all for this helpful discussion.


Locked

Return to “Extensions for Joomla! 1.5”