WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Permalink per picture (2 posts)

  1. flippy146
    Member
    Posted 7 months ago #

    Hi all, I'm using WP 3.1 and NGG 1.7.4.

    What I want to achieve is social media buttons that shares an individual picture, so: the link has go to a gallery page and opens up the photo in lightbox, or the link takes the user to an individual page for the photo. So there has to be an unique url for every picture.

    I followed this tutorial:
    http://www.brettshumaker.com/nextgen-gallery-tweet-and-like-buttons/
    but what it gives me is links like: website.com/photo?pid=1232
    So I indeed have an url for every photo now, but the drama:
    Facebook shares website.com/photo, as does bit.ly for Twitter, G+ does the same plus it sees the photos of banner but not the photo I want it to share.

    And as Im no good with writing php and js, I can't really get my finger around a fitting solution.
    So if anyone can help me out on this one, that would be great, feel free to ask for some more insights.

    Thanks in advance!

    The social media buttons I want to include are Facebook, Twitter, Pinterest, Linkedin and Google+ (via addthis)

    The main thing NGG does on my website is having a portfolio with different galleries, and every gallery has a bunch of photo's that open in lightbox. (24 galleries, 921 photo's)

    A gallery: http://bit.ly/J90mjO
    The individual page I now have set up: http://bit.ly/197MSv5

    http://wordpress.org/plugins/nextgen-gallery/

  2. flippy146
    Member
    Posted 7 months ago #

    Ok, so I fixed most buttons, giving each social icon it's own url parameter. The only two that won't work along are Facebook and Linkedin.
    Facebook is the most important, but I can't get it to send out the exact link with the ?pid=0123. And linkedin for some reason won't listen to the php coded url I ask him to send out, like Ive with the twitter button, a hard-coded link does work but is not what I want.

    Any ideas?

    This is my current social set-up:

    <div class="addthis_toolbox addthis_default_style ">
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=[removedid]";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-like" data-send="false" data-layout="button_count" data-width="80" data-show-faces="false"></div>
      <a class="addthis_button_tweet" tw:url="<?php echo the_permalink();?>?pid=<?php echo $image->pid;?>" tw:text="<?php echo $image->alttext ?>"></a>
      <a class="addthis_button_pinterest" pi:pinit:description="<?php echo $image->alttext ?>" pi:pinit:url="<?php echo the_permalink();?>?pid=<?php echo $image->pid;?>"></a>
       <a class="addthis_button_google_plusone" g:plusone:size="medium" g:plusone:count="false" g:plusone:href="<?php echo the_permalink();?>?pid=<?php echo $image->pid;?>"></a>
       <a class="addthis_button_linkedin_counter" li:counter="none" li:url="//////"></a><a class="addthis_counter addthis_pill_style"></a>
    </div>

Reply

You must log in to post.

About this Plugin

About this Topic