WordPress.org

Ready to get started?Download WordPress

Forums

Pinterest Pin It Button For Images
Doesn't show on other templates or Fancybox (11 posts)

  1. danetidwell
    Member
    Posted 1 year ago #

    My theme includes a specific template for image galleries - The Pinterest icon shows up on both posts and pages correctly, but it doesn't show up at all with WordPress generated galleries with the gallery template.

    Blog (works): http://chicagophoenix.com/2012/04/21/low-numbers-hinder-chicago-delegation-of-simultaneous-worldwide-lgbt-marches/

    Page (works): http://chicagophoenix.com/galleries/

    WordPress Gallery in Gallery Template (doesn't work): http://chicagophoenix.com/galleries/gallery-freedom-to-marry-reception/

    It also doesn't seem to work on the Fancybox popup (click on one of the images from the link above). As these are the large images, it'd be ideal for it to appear on those photos and not the smaller ones in the articles.

    http://wordpress.org/extend/plugins/pinterest-pin-it-button-for-images/

  2. Canha
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Indeed, there is a slight problem with the Fancybox plugin - I'm still working on a solution. The gallery is a bit harder to get done - the plugin gallery usually uses a shortcode to generate it, which might make it a bit harder to solve.
    Regarding linking the larger image (instead of the smaller one), thanks for the heads-up! I'll probably include this in the next release.

    Cheers.

  3. danetidwell
    Member
    Posted 1 year ago #

    I can give you admin access if you'd like to see how it is configured with gallery templates, but if you can get it to work in a Fancybox popup, then I don't see a need for it to work in the gallery template - also, I made the Pinterest window open in a new window rather than the current window, as the Pinterest "create pin" window doesn't give an easy way to get back to the originating site.

    Changed this: $pinfinish = '" class="xc_pin">';
    To this: $pinfinish = '" class="xc_pin" target="_blank">';

    I think a modal box (Fancybox, for instance) would look better, but thats above my know-how.

    With all those, I really think this is already an amazing plugin with a lot of potential.

  4. scottgale
    Member
    Posted 1 year ago #

    This is how I used Pinterest with Fancybox: http://scottgale.com/blog/using-pinterest-with-fancybox/2012/08/15/

    I used a callback function. Check it out and see if that makes sense for you.

  5. fungoody.com
    Member
    Posted 1 year ago #

    Where does one put that code? Can something like it be accomplished for Lightbox Plus galleries?

  6. scottgale
    Member
    Posted 1 year ago #

    Are you thinking this one? http://wordpress.org/extend/plugins/lightbox-plus/

    I could take a look. Link me to the one you like to use and I'll see how to modify.

  7. fungoody.com
    Member
    Posted 1 year ago #

    Yes, that's the plugin I'm using. Thank you.

    I tried adding class to html like:
    [gallery class="pinthis" link="file" order="DESC" columns="6" orderby="post_date"]

    That didn't work. So I tried renaming every instance of pinthis to cboxPhoto in ppibfi_pinterest.php and ppibfi_admin.php but no luck there either.

  8. Sean
    Member
    Plugin Contributor

    Posted 1 year ago #

    The plugin also works without the class="pinthis". Or at least it should.

    @amazemedia - Renaming the instance won't help. I assume "cboxPhoto" is the name of the class images have when inserted thru this gallery. In this case, open the file ppibfi_pinterest.php and search for the following line:
    preg_match( '/class=[\'"](.*)?' . trim( $pinthis ) . '(.*)?[\'"]/i', $tag, $matches );

    Change it to:
    preg_match( '/class=[\'"](.*)?cboxPhoto(.*)?[\'"]/i', $tag, $matches );

    This should work (I haven't tested it). Maybe next version I should enable a way for the user to easily change the class that will have the button.

    Let me know if this works.

  9. fungoody.com
    Member
    Posted 1 year ago #

    No luck. Does still work on thumbnails. I do appreciate your help.

  10. Sean
    Member
    Plugin Contributor

    Posted 1 year ago #

    Can you link the post with the problem, so I can check it out?

  11. fungoody.com
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic