Support » Plugin: WP Photo Album Plus » Download button problems, viewcount inside albums

  • Resolved xPLd

    (@xpld)


    1. Download image file button in wppa lightbox not working in standard IOS Safari browser. I’ve checked it on 5 different phones with different Safari versions. Nothing happens when you click.

    2. Is there any chance and code, even disappearing after update, to show total album viewcount inside of an album?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    2. Table II-E9: Viewcount on cover

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    1. I just verified that it works on chrome on an android phone. There is no longer a safari browser available for windows, so i can not verify if it is a safari or an ios problem. In any case it is not a wppa issue.

    I can record a video with problem. I have 70% visitors with ios and they are angry 🙂

    II-E9 it’s on cover in album list, not inside an album. For example – Inside album above thumbs shows total counts.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I have no ios device available so i can not test it. Can you give me an example of an image download point on a wp page that does work on ios? Then i might find a solution.

    I can add a keyword to be used in album descriptions for the total fs views. Then display the album description on the thumbnail area (do not know setting, on my phone currently)

    About download:
    I found a temporary solution. Safari settings for default disables new window pop-ups. If switch off this function – download button will work. But it is impossible to tell this for all users. Maybe problem with target? “_Self” targets blocked by default in Safari.

    About views
    Something like that will be great: https://cloud.sib.one/6lTdnpVE1n.png
    I mean example of “Total views” function inside an album.

    • This reply was modified 2 years, 7 months ago by  xPLd.
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    1. _blank is the default. the code used is:
    (wppa-ajax-front.js line 859)

    
    // Publish result
    if ( wppaArtMonkyLink == 'file' ) window.open( ArrValues[2] );
    if ( wppaArtMonkyLink == 'zip' ) document.location = ArrValues[2];
    

    Your setting is ‘file’ i assume?
    If you want to edit the file to test, delete wppa-ajax-front.min.js Then the un-minified i.e. the edited version will be loaded.
    You could try:

    
    if ( wppaArtMonkyLink == 'file' ) window.open( ArrValues[2], '_blank' );
    

    or

    
    if ( wppaArtMonkyLink == 'file' ) window.open( ArrValues[2], 'peter' );
    

    2. Views. From the readme of 6.6.13:

    New album description keyword w#fsviews used to display the total number of fullsize views of photos in the album.

    Yu can test it on a test site with dev version 6.6.13.Beta.003
    See this documentation page on how to install.

    See Table II-D16 for how to put the album description on the thumbnail area.

    Total counts works! Thank you very much!

    About Safari. I found an answer. But don’t know how to apply to wppa.
    P.S. Safari in MacOS 10.12 have same problem

    To use window.open() in safari you must put it in an element’s onclick event attribute.

    For example: <div class=’btn’ onclick=’window.open(“https://www.google.com”, “_blank”);’>Open google search</div>

    From: http://stackoverflow.com/questions/20696041/window-openurl-blank-not-working-on-imac-safari

    • This reply was modified 2 years, 7 months ago by  xPLd.
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I will get into this, but i think we have a problem here.
    The onclick currently sends an ajax request to the server to fetch the file (which may be a zip that is created at that moment). When the ajax request comes back, the window is opened with the result from the ajax reauest.
    That result is not available at the moment od the click. If i would fake it, it will return a 404 (not found)

    Instead of the download button/link try using the permalink ( if you have the source files available ). Put in the description the keyword w#pl for the source file (un-downsized) or w#url for the file at display resolution. These urls are automaticly made clickable.

    Pls try this, if not suitable, i will se if i can change it to direct onclick=”window.open();” in the case of non-zipfile.

    For this moment i have 147 albums and 20141 photos in the system. So keywords it’s a bad idea for manual adding in each description 🙂

    What about that?

    The solution that I found to this problem is to call window.open before making an asnyc call and set the location when the promise resolves.

    var windowReference = window.open();

    myService.getUrl().then(function(url) {
    windowReference.location = url;
    });

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Look at Table VIII-B5 and 6

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    This will work”:

    
    <input type="button" onclick="window.open('w#hrurl');" value="Download Me" />
    
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    var windowReference = window.open();

    myService.getUrl().then(function(url) {
    windowReference.location = url;
    });

    I will see if i get this working.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Please try http://beta.opajaap.nl/nl/gewone-post/
    The image with the watermark SPECIMEN links to ligtbox with the file downloadable by a button, implemented according to your procrdure.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Fixed 6.6.13

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Download button problems, viewcount inside albums’ is closed to new replies.