• Moderator Ipstenu (Mika Epstein)

    (@ipstenu)


    ?????? Advisor and Activist

    We’re using this on a site that uses a CDN and, overall, it works great buuuuut.

    We have to customize the URL to allow for the image to be downloaded. The tl;dr version is that if the URL for the image is cdn.example.com/ipstenu/image.jpg then the download URL is cdn.example.com/ipstenu/download/image.jpg

    If that isn’t possible to filter, would it be possible to have the image open in a new tab?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @ipstenu,

    Nice to see you here! Sorry for the late reply but I am back with the filter you have asked for. Actually, I had filters for all the fields, but not the download link! It’s done now, and if there is no link returned, the icon will not be displayed.

    This code, for example, will only display the download link to logged users:

    add_filter( 'mwl_download_link', function ( $download_link, $attachment_id, $meta ) {
    	$id = get_current_user_id();
    	if ( !empty( $id ) ) {
    	  return $download_link;
    	}
    	return null;
    }, 3, 10 );

    Please make sure you are using version 4.0.1+ and… once you have implemented the filter, absolutely Reset the cache within the Meow Lightbox Settings ?? That should work.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    @tigroumeow Looks like the 4.0.1 has a broken ‘dashboard’? wp-admin/admin.php?page=meowapps-main-menu is empty?

    Also with the download option checked, there’s no download icon showing at all, even before I add in code.

    Plugin Author Jordy Meow

    (@tigroumeow)

    @ipstenu, indeed, that Dashboard is broken ?? I will push a new release to fix it, somehow I didn’t realize it, and not many people I checking it I suppose (though I like the idea of it).

    Have you try to reset the cache? It’s in the Performance tab of the Meow Lightbox Settings. For this filter to be usable, I had to change the way the URLs were retrieved and used; unfortunately… I didn’t handle the migration properly! I should have forced-reset the cache right after the update but I didn’t. Please give it as try ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s in the Performance tab of the Meow Lightbox Settings.?

    Yep, but also….

    • Download button is enabled.
    • Cache is DISabled.

    No icon shows to download, not even on 4.0.2 ??

    I tried enabling cache and hitting the reset button, as well as on a totally separate browser without being logged in AND being logged in.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Do you mind sharing your URL with me @ipstenu? I would like to check if I see something.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Would if I could @tigroumeow – it’s behind a firewall.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Think about this again @ipstenu, are you sure it’s not a cache issue?

    Another user had the same issue here: https://www.ads-software.com/support/topic/meow-lightbox-turns-on-for-every-picture-on-website-how-can-i-turn-that-off/#post-16595344. But using the Reset button fixed it.

    Of course, if you are using another caching layer, it might be that too :

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customize Download Link?’ is closed to new replies.