forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: will on April 06, 2007, 02:56:01 pm
-
Hi all I've been trying to get support for this for 3 weeks now from cpg-contrib.org but no luck, all I want is to change the button 'Download Cover' to a picture, heres the code:
<?php
/**************************************************
Coppermine Photo Gallery 1.4.9
*************************************************
CPGPicdownload Plugin 1.0
*************************************************
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.
***************************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
if (defined('DISPLAYIMAGE_PHP')){
$thisplugin->add_filter('file_data','cpgpicdownload_file_data');
}
function cpgpicdownload_file_data($CURRENT_PIC_DATA) {
$button = <<<EOT
<a class="admin_menu" href="index.php?file=CPGPicdownload/picture&pid={$CURRENT_PIC_DATA['pid']}" title="Download">Download Cover</a>
EOT;
$CURRENT_PIC_DATA['menu'] = $button . $CURRENT_PIC_DATA['menu'];
return $CURRENT_PIC_DATA;
}
?>
Any help will be great ;D
-
change this :
<a class="admin_menu" href="index.php?file=CPGPicdownload/picture&pid={$CURRENT_PIC_DATA['pid']}" title="Download">Download Cover</a>
With this :
<a class="admin_menu" href="index.php?file=CPGPicdownload/picture&pid={$CURRENT_PIC_DATA['pid']}" title="Download"><img src="path to your image" boredr="0" alt="Download Cover"/></a>
-
Thanks Sami ;D
-
1 more question please, is there a way of adding the download pic to my file info box, at the moment its below the immediate image, thanks 8)
-
We have a strict "one question per thread" policy that you agreed to respect when signing up. Afaik you have been told so already. Locking.