Before you ask please READ THIS

Share buttons in the slider view

CFPCFP
in Photon Posts: 122
Hi Air,
Is it possible to turn on the sharing buttons on the top right in the slider view on each slide?
That would be awesome!

Comments

  • AirAir
    Posts: 10,970
    Hello:-)

    No it is not possible, and would require lot of custom work(not simply code but research what is possible).

    With kind regards.
  • CFPCFP
    Posts: 122
    Ok, thanks. I will try it by my own. But can you tell me where the single slide gallery php is?

    I am trying to merge the query simple gallery into your album slide view template and to get some share buttons on each image.

    So if you can tell me the php file, line and the code where I can find the one for the include query simple gallery.
  • AirAir
    Posts: 10,970
    Hello:-)

    As I said before, it is not that simple. Even if I would do this it would require lot of research how to do it. Slider is generated via JavaScript from some HTML generated in single-album.php

    What should happen when you share photo on slider? Should it generate some crazy link, that when clicked will take user to your site, and will scroll slider to proper image? Probably something like this if you want sharing buttons on each slide. This is difficult and no simple plugin will achieve this - this requires custom work.

    If however you wish only that sharing buttons will create link to your album, and clicking it will just open this single album, then you can insert any shortcode from sharing plugins into single-album.php, and then position it with CSS.

    It is important to answer such question before starting work on this :-)

    With kind regards.
  • CFPCFP
    Posts: 122
    Hmmm. I use the AddToAny plugin wich also allows to implement php code of the buttons.
    I only want on each slide (image) on the slider album a sharing option with the plugin or without.
    So that it is possible to share each image separately on social media.
  • AirAir
    Posts: 10,970
    So like I wrote above - it is not possible that way without lot of custom work. You can use bricks album for that.

    With kind regards.
  • CFPCFP
    Posts: 122
    Can you tell me where the function is for the control panels especially the "arrow down" function. So that I can do there my changes on! That would be nice!
  • AirAir
    Posts: 10,970
    Do you mean thumbnails? What you need exactly - events, HTML generating, something else? All is done in js/a13-slider.js

    With kind regards.
  • CFPCFP
    edited May 2016 Posts: 122
    I mean the arrow down button which hides the thumbnails from the slider album.

    I need the event, html generating... Want to change the way it's normally used to. I want to make the tray button clickable with a defined url based on the shown image.
    Post edited by CFP on
  • CFPCFP
    Posts: 122
    And how can I jump by click directly to one specific image in the album slides view
    This doesn't seem to work: ?gallery_item=image.jpg
  • AirAir
    Posts: 10,970
    You are asking me, things that are beyond support( http://support.apollo13.eu/discussion/12/before-you-ask-read-this-#support_not_includes ), and I am getting feeling that you are not sure what you want to do, or rather how to do it, which makes it painful for me to explain anything.

    Like I said, all code for slider is in js/a13-slider.js so using console and basic find function you should be able to pinpoint what you need.
    CFP said: And how can I jump by click directly to one specific image in the album slides view
    This doesn't seem to work: ?gallery_item=image.jpg
    This only works for bricks albums, slider album doesn't have such functionality - you have to build it.

    If you really want to add this functionality to slider you have to dig into the code, and you will be able to find what you need.

    With kind regards.
  • CFPCFP
    Posts: 122
    Ok, I tried to make share buttons on every image, but that seems to be to hard for me ;)
    So now I redesigned the attachment.php so that this fits my needs.

    Because I do not need the tray icon with the function to hide the thumbnails, I want to use that to get to the attachment.php for each image that is showing in the slider album.

    I thought the "?gallery_item=image.jpg" helps me to get back from the attachment.php to the last seen image on the slider album. So that I can implement this code to the attachment.php.
  • AirAir
    Posts: 10,970
    CFP said: Because I do not need the tray icon with the function to hide the thumbnails, I want to use that to get to the attachment.php for each image that is showing in the slider album.
    You will need to deliver array with links to attachment page to make it work. I think it would be easier to use photo description to use such links. You just could edit description for each image in Media menu.

    Anyway, search in js/a13-slider.js for tray_button and tray-button to find place where it is defined and used(down arrow).

    With kind regards.
  • CFPCFP
    edited May 2016 Posts: 122
    Thats all done. I already deliver it to get the description :) from a image in the attachment.php

    Take a look e.g.: http://bit.ly/1sGMGmD
    Post edited by CFP on
  • AirAir
    Posts: 10,970
    It doesn't look like you are shearing photos from slider, but attachment looks nice :-)
  • CFPCFP
    Posts: 122
    No, it is only the attachment. I want to jump by clicking on the tray icon to the attachment. And then (by clicking on the link "Back to ...) to the album but directly on the shown image from the attachment.

    Thank you ! :)

    I took a look to the js where the tray function is located but for sure that is way to complicated for me to figure out where I can make changes that the tray icon is clickable.....
  • AirAir
    Posts: 10,970
    tray_button.on( clickEvent, album.toggleThumbsTray ); - if you know JavaScript then this should be enough for you :-) Just add your own function that will fire on click/touch.

    With kind regards.
  • CFPCFP
    edited June 2016 Posts: 122
    Ok ;)
    So probably it is nasty for you but...
    For me it's quite difficult. HTML ok, PHP quite a bit, but JS... No! :)

    So I need advice (step by step) how to do this.
    The "tray button" I have changed to a different icon, ok. (take a look on my dev site)
    Now I need the ability that when I click on this button it will show the attachment.php of the just shown picture of the slide. Better it would be in a overlay like the simple jquery slider will do. So that it is possible just with click on the "X" to go back to the actual image in the slide.
    Post edited by CFP on
  • AirAir
    Posts: 10,970
    CFP said: Only a link to the attachment.php will be fine. But if you can send me a whole thing so that the click on the tray button reads the pic id and directs direct to the attachment.php, I will love that!
    I have checked code, and there is not enough details served to slider to achieve this. So as I said before - you would have to modify first what is served to slider in JSON, and after add whole thing in JS. This would be painful to describe in post here.

    I think I will try to make my implementation of socials on slider in next week, and maybe I will achieve something. What you think about that?

    With kind regards.
  • AirAir
    Posts: 10,970
    Update on situation: I got it partly working but it needs more work still.
    For now it slides to proper slide after clicking "on facebook". Still some problems with proper displaying of social icons on each slide. I hope to solve it next week.

    With kind regards.
  • AirAir
    Posts: 10,970
    Update is ready on ThemeForest.

    With kind regards.
  • CFPCFP
    Posts: 122
    Thank you!
    How can I remove the "+" icon on the mobile view, so that the share buttons are always on?

    And!

    The share buttons uses the exact link that I need to include in my "project" so that there is a "i" (information button) button so that if someone looks at a picture in the slide view (album), the "i" button directs him directly to the picture attachment.php.
  • AirAir
    Posts: 10,970
    CFP said: How can I remove the "+" icon on the mobile view, so that the share buttons are always on?
    http://support.apollo13.eu/discussion/4093/change-text-opener-conditions-for-appearing
    CFP said: And!
    I don't understand anything beyond this. Please start new topic with screen shots and stuff ;-)

    With kind regards.
  • CFPCFP
    Posts: 122
    Thank you and the second one see some posts above!
  • AirAir
    Posts: 10,970
    CFP said: see some posts above!
    Please link me to direct post, this topic is long(link to comment is "date")

    With kind regards.
  • AirAir
    Posts: 10,970
    OK, but where is the question in that? What you want from me here:
    CFP said: The share buttons uses the exact link that I need to include in my "project" so that there is a "i" (information button) button so that if someone looks at a picture in the slide view (album), the "i" button directs him directly to the picture attachment.php.
    Cause this looks like statement to me ;-)

    With kind regards.
  • CFPCFP
    Posts: 122
    Ok, the share buttons (addtoany) have the exact link to the image attachment. I need the same php code that gets the link to the shown image attachment to implement this in the "tray icon" which I want to change (but I can't do JS). So that when I click on the "tray icon" I go directly to the shown image attachment.
  • AirAir
    Posts: 10,970
    OK so code is get_attachment_link($id) where $id is id of media in WordPress library. Hope it will be helpful somehow to you.

    With kind regards.
  • CFPCFP
    Posts: 122
    And how can I insert this there:
    tray_button.on( clickEvent, album.toggleThumbsTray );
  • CFPCFP
    Posts: 122
    Like this?
    tray_button.on( clickEvent, get_attachment_link($id) );
  • AirAir
    Posts: 10,970
    Well you asked for PHP code, and now you are mixing it with JavaScript. Listen we are not giving lessons from coding here:-)
    This won't work what you are doing. You won't be able to get link to attachment in JavaScript without sending it in first place from PHP code in data array. I won't go in details what that mean, cause this beyond support help and it would took few hours to describe in forum post.

    You probably should give up on this modification, sorry.

    With kind regards.
  • CFPCFP
    Posts: 122
    Ok, last one.
    Is there a way that you can tell me where in a php file in your theme I can insert the same kind of button like the tray-icon? Not in the .js file. In a php file so that the button is in the same row before the skip back, forward and play button?
  • AirAir
    Posts: 10,970
    All those buttons are JS generated, so not possible with just PHP. I think it works a bit different then you imagine.

    With kind regards.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion