Share buttons on gallery

  • Posted in : Photographer
  • tanmuhittin
    Participant

    I want to put share buttons on gallery just like wordpress version of the template

    ahmetsali
    Keymaster

    Hi, share buttons on photoswipe gallery are already included in the html version as you can see it on the demo site;

    http://themes.pixelwars.org/photographer-html/gallery-single.html

    OGarcia
    Participant

    Hi !

    I want to integrate Google +, Tumblr and email sharing button on gallery PhotoSwipe, but I do not really understand the Photoswipe documentation here: http://photoswipe.com/documentation/getting-started.html on how process. Is there someone who has already made ​​these changes? And above all , how?
    Thank you in advance.

    ahmetsali
    Keymaster

    Hi @OGarcia

    I just dig into documentation and here is a solution, edit js/photo-swipe/photoswipe-ui-default.js in a text editor and find line: 79, you will see;

    shareButtons: [
    				{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
    				{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
    				{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+
    													'?url={{url}}&media={{image_url}}&description={{text}}'},
    				{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
    			],
    

    replace it with this piece of code;

    shareButtons: [
    				{id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'},
    				{id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'},
    				{id:'gplus', label:'Share on Google+', url:'https://plus.google.com/share?url={{url}}'},
    				{id:'tumblr', label:'Share on Tumblr', url:'http://tumblr.com/widgets/share/tool?canonicalUrl={{url}}'},
    				{id:'email', label:'E-mail', url:'mailto:?subject=I wanted you to see this image&body=Check out this image : {{text}} - {{url}}'},
    				{id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+
    													'?url={{url}}&media={{image_url}}&description={{text}}'},
    				{id:'download', label:'Download image', url:'{{raw_image_url}}', download:true}
    			],
    

    and finally copy all of the codes inside js/photo-swipe/photoswipe-ui-default.js into js/photo-swipe/photoswipe-ui-default.min.js file and this should do the trick for you.

    OGarcia
    Participant

    Thanks a lot ahmetsali, perfect reaction :)

    ahmetsali
    Keymaster

    @OGarcia

    you’re welcome ;) please don’t forget to rate the template on themeforest if you liked it, thanks.

    OGarcia
    Participant

    is done :)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register