Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: A little help  (Read 5205 times)

0 Members and 1 Guest are viewing this topic.

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
A little help
« 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:

Code: [Select]
<?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
« Last Edit: April 06, 2007, 05:41:46 pm by Sami »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: A little help
« Reply #1 on: April 06, 2007, 05:01:22 pm »

change this :
Code: [Select]
<a class="admin_menu" href="index.php?file=CPGPicdownload/picture&pid={$CURRENT_PIC_DATA['pid']}" title="Download">Download Cover</a>

With this :
Code: [Select]
<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>
Logged
‍I don't answer to PM with support question
Please post your issue to related board

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: A little help
« Reply #2 on: April 06, 2007, 05:22:38 pm »

Thanks Sami  ;D
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: A little help
« Reply #3 on: April 06, 2007, 05:49:43 pm »

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)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: A little help
« Reply #4 on: April 06, 2007, 10:41:05 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.