WordPress.org

Ready to get started?Download WordPress

Forums

Lightbox Gallery
plugin image icons absolute paths (5 posts)

  1. thecoup
    Member
    Posted 3 years ago #

    hello, this plugin sets an absolute path to the images. But, if WordPress is installed in its own directly, the images break. The javascript works, but the paths to your images need to be fixed.

    site.com/wp-content/plugins/lightbox-gallery/images/lightbox-btn-close.gif

    site.com/WORDPRESS-DIRECTORY/wp-content/plugins/lightbox-gallery/lightbox-btn-close.gif

  2. CameronD
    Member
    Posted 3 years ago #

    Hmm, I have ran into the same problem. How exactly did you fix this? I can't seem to find where you change the path in the source code?

  3. thecoup
    Member
    Posted 3 years ago #

    I noticed the problem because I was developing offline using xampp. So I didn't need to solve this for my live website. Three options for you:

    1) Edit the plugin. It should be easy to find the paths and fix them. Be aware that the next time you upgrade the plugin you will need to do this again.

    2) Add an entry to your .htaccess file to redirect things to the correct location. You'll have to dig around to learn how.

    3) Get the plugin developer to fix this. It's a simple mistake with a very easy fix. Or start a fork of the plugin and maintain it yourself!!

    Good luck...

  4. CameronD
    Member
    Posted 3 years ago #

    Thanks for the pointers! Much appreciated!

  5. RandallKent
    Member
    Posted 3 years ago #

    The maintainer, Hiroaki Miyashita, can correct this by patching lightbox-gallery.php to always set the lightbox_path variable to the Site URL.

    To resolve this, I have removed the if statements around the code which defines this variable in the functions lightbox_gallery_print_path_header() & lightbox_gallery_print_path_footer() and have posted the patch to http://pastebin.com/uZzUtqv8.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic