A little help A little help
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

A little help

Started by will, April 06, 2007, 02:56:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

will

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

Sami

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>
‍I don't answer to PM with support question
Please post your issue to related board

will


will

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)

Joachim Müller

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.