• Resolved manlok1992

    (@manlok1992)


    Hi all, this is a great plugin. But I need to insert the google ads or insert custom ads into the lightbox. I would like to insert an ads for each 5 item.
    So can I do this?
    Thanks a lot.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    This is not possible. PhotoSwipe will only display linked images in various formats (including SVG).

    If you need such a feature, this needs to be added to the code of PhotoSwipe itself which is out of scope for this plugin.

    Thread Starter manlok1992

    (@manlok1992)

    So can I implement this feature on this plugin by myself?

    • This reply was modified 2 years, 7 months ago by manlok1992.
    Plugin Author Arno Welzel

    (@awelzel)

    If you know how to do this – sure. The code is open source and published under the GPL:

    https://github.com/arnowelzel/lightbox-photoswipe

    Just keep in mind, that any changes need to be published as source code again. So either you create pull request to get your modifications integrated to this plugin when finished or if you publish your own version you need to keep a reference to the original source code of the plugin in the “Info” section and “readme” text.

    The frontend scripts (assets/scripts.js) need to be merged in compressed based on the source from src/lib/photoswipe.js, src/lib/photoswipe-ui-default.js and src/js/frontend.js – there is no build script yet to do this automatically.

    Thread Starter manlok1992

    (@manlok1992)

    I tried to revise the photoswipe.js. I found the setContent method is used to set image to the html. So I changed something to make it different. I refresh my web and see what different but nothing to be changed. Even I comment all of the code in setContent is still no changes.

    • This reply was modified 2 years, 7 months ago by manlok1992.
    Plugin Author Arno Welzel

    (@awelzel)

    src/lib/photoswipe.js is not used directly by the plugin. You have to create a new version of assets/scripts.js which is the combined and minified version of src/lib/photoswipe.js, src/lib/photoswipe-ui-default.js and src/js/frontend.js.

    During development you can also enable the WordPress debug mode (SCRIPT_DEBUG) – in this case the src folder is used and not the minified script in assets/script.js.

    Also make sure that you clear the cache of the browser before you reload the page.

    • This reply was modified 2 years, 7 months ago by Arno Welzel.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘insert ads or insert somethings manullay’ is closed to new replies.