I have written a plugin that works by replacing all of the URL's in a Coppermine so that the files are loaded through a PHP script. I realize other mods exist for this but my plugin is the only one that takes the form of a plugin. The kicker is that it requires a Mod to get it to work. You can view my plugin at this post: http://forum.coppermine-gallery.net/index.php?topic=32348.0
What it boils down to is there is no hook that lets you really control the output of the function get_pic_url
. While there is a hook near the end of the function it only applies to thumbnail pictures. Additionally, I found that attempting to modify the URLs through already existing hooks simply results missed links. I have identified that both the editOnePic.php and slide show function simply do not obtain their URL anyplace except the get_pic_url
function. By this I mean that the other hooks that can manipulate the URLs are just not called.
In my case I want ALL files to load through a PHP script and this function is the clear target for manipulating this type of data.
What I have done is added the line:$pic_row = CPGPluginAPI::filter('picture_url',$pic_row);
just before the return statement.
While I realize that only the value of the url in the array is going to be of any consequence the other values in the array $pic_row are useful in constructing a plugin especially if the PID needs to be identified. Other information in this array include file type which could be used to selectively change the URL.
While I understand this hook would not make it into Coppermine version 1.4.x it would be a much welcome addition to version 1.5.x because of the possibility of manupulating the URLs of every file in Coppermine with simplicity and guarenteed accuracy.
Thank you very much for the consideration.