I'm not finding any function that generates this, but I'm needing to create a full image link URL as in
http://mywebsite.domain/zenphoto/sample/img_4448.jpg.php and not just
/zenphoto/sample/img_4448.jpg.php.
My first thought was to use `echo getMainSiteURL() . $_zp_current_image->getImageLink();`, but there's multiple issues with this:
- If the user fills in Website URL with a trailing slash, then there will be two trailing slashes between the URL and image link. This is easily fixed using the `trim()` function in PHP.
- The main issue is with the URL example I used above, where the gallery is installed in a sub-directory. If I fill in Website URL with http://mywebsite.domain/zenphoto/, when I call those two functions, it will output http://mywebsite.domain/zenphoto//zenphoto/sample/img_4448.jpg.php, which means I'd need to write a function that tests for the sub-directory, etc.
So I'm hoping there's an easier way to do this ....
Comments
We have a function for the full image link named `getFullImageURL()` (there is also a protected version). There is of course also a image class method `getFullImage()` for this.
Besides that kagutsuchi is right, but all of these functions should use that interally (if I recall right).