Ok, here's the code I came up with. It's very likely there's a better way to do it, but as can be seen above there wasn't a whole lot of help. Code below works though. If you want to see it in action, just download the attached file and install as a plugin.
<?php
/**************************************************
CPG Pluin for showing direct link under each image.
There really isn't much point in installing this plugin
since the same thing can be seen by clicking the info
button. This is more of a demo for other pugin
programmers.
*************************************************
Copyright (c) 2009 MadScout <pm me on cpg forums for info>
*************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*************************************************
Coppermine version: 1.4.9
POD Plugin version: 1.0
$Revision: 1.0 $
$Author: MadScout $
***************************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Add a filter
$thisplugin->add_filter('file_data','link_show');
function link_show($pic_data){ //$pic_data
global $CONFIG;
$address = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
//prepare address by ripping out stuff we don't need
$address = 'http://'.substr($address, 0, strpos($address, '?')+1).'pos=-'.$pic_data['pid'];
$link = '<a href='.$address.'>'.$address.'</a>';
$pic_data['html'] = $pic_data['html'].$link;
return $pic_data;
}
?>
Those two rules are pretty easy to memorize, don't you agree? And you have already been told many times over to read them, so you better read them each and every time before you start a new thread. Your next breach of board rules (even a minor one) will lead to a ban.
First off, it's hard to post a link to the gallery when it's a local server only I have access to. Why would I want to develop on a public server? If my question really required access to my gallery to answer then I'd put it up.
Ban me if you want to, but c'mon man that's ridiculous. I'm just trying to contribute to the community.