Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Edit Picture information  (Read 13090 times)

0 Members and 1 Guest are viewing this topic.

holyone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Edit Picture information
« on: January 27, 2004, 07:27:32 pm »

Hello in coppermine there is an option to disaply the picture information....
I want to delete all of the opetions.
And only disalpy the fieldes that i aded to the image information.

Wating for help...
Tanks,
holyone.
Logged

Nibbler

  • Guest
Edit Picture information
« Reply #1 on: January 27, 2004, 07:49:27 pm »

in displayimage.php, search for "function html_picinfo" and comment out the lines corresponding to the info you want to remove:

$info[$lang_picinfo['Filename']]
$info[$lang_picinfo['Album name']]
$info[$lang_picinfo['Keywords']]
$info[$lang_picinfo['File Size']]
$info[$lang_picinfo['Dimensions']]
$info[$lang_picinfo['Displayed']]
$info['URL']
$info[$lang_picinfo['addFavPhrase']]
Logged

holyone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Edit Picture information
« Reply #2 on: January 27, 2004, 09:54:06 pm »

Thanks :) its all removed except 'Filename'.
Iam geting the error:
Code: [Select]

Warning: Invalid argument supplied for foreach() in c:\appserv\www\system\gallery\themes\default\theme.php on line 1469

That is the code of the line 1469 in the theme.php:
Code: [Select]

    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);

Its the default theme of coppermine...

Thanks for all the help,
holyone.
Logged

Nibbler

  • Guest
Edit Picture information
« Reply #3 on: January 27, 2004, 10:17:44 pm »

I just tested it, didnt get any errors from it.
Logged

holyone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Edit Picture information
« Reply #4 on: January 27, 2004, 11:03:10 pm »

I have install a new cpg system....
And i added a new field form the administrator panel,
And i still geting the error,
Code: [Select]

Warning: Invalid argument supplied for foreach() in c:\appserv\www\system\gallery\themes\default\theme.php on line 1476

And what i change in the file displayimage.php is like this,
The line:
Code: [Select]

$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);

I change it to:
Code: [Select]

    //  $info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);



Thanks for all the help nibbler,
Thanks,
holyone.
Logged

holyone

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Edit Picture information
« Reply #5 on: January 27, 2004, 11:08:59 pm »

I fix it.. it must to have somting in this $info... so i set:
$info = '';
And thats it.

But,
Thanks for all the help...
holyone.
Logged

boolbo

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
    • http://www.boolbo.com
If I modify the Pic Info I get a Parse Error, why?
« Reply #6 on: February 26, 2004, 03:33:06 pm »

Quote from: "Nibbler"
in displayimage.php, search for "function html_picinfo" and comment out the lines corresponding to the info you want to remove:

$info[$lang_picinfo['Filename']]
$info[$lang_picinfo['Album name']]
$info[$lang_picinfo['Keywords']]
$info[$lang_picinfo['File Size']]
$info[$lang_picinfo['Dimensions']]
$info[$lang_picinfo['Displayed']]
$info['URL']
$info[$lang_picinfo['addFavPhrase']]


Hi, I tried to comment these lines as Nibbler suggested...but I got a PHP Parse Error if I put in the code of displayimage.php the comment tag
<!-- line -->

Maybe there is a different way to comment these lines isn't it? Anyone could help me?
Thank you!
Marco
Logged
---
Boolbo.com
about photography and seeing
http://www.boolbo.com
http://www.images.boolbo.com

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Edit Picture information
« Reply #7 on: February 26, 2004, 03:50:43 pm »

in HTML, you comment stuff out like this:
Code: [Select]
<!-- stuff that is commented out -->In PHP, you comment out individual line by adding two slashes in front of it, like this
Code: [Select]
<?php
print 'Hello world';
// this line is commented out 
?>
. In PHP, you can as well comment out whole blocks (multiple lines) by putting /* at the start and */ at the end, like this
Code: [Select]
<?php
print 'Hello world';
/*
this part is commented out and will not be parsed

foo bar

print 'No matter if it's actual code or garbage';

*/
?>

This is very basic PHP know-how; before you even think about modifying php code you should get the bascis first, visit http://php.net/

GauGau
Logged

boolbo

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
    • http://www.boolbo.com
Edit Picture information
« Reply #8 on: February 26, 2004, 04:09:44 pm »

Quote from: "gaugau"
This is very basic PHP know-how; before you even think about modifying php code you should get the bascis first, visit http://php.net/


 :roll:  Thank you GauGau!! I forgot the difference for the comment line between the HTML and PHP....really thank you, now it run!  :)

Marco
Logged
---
Boolbo.com
about photography and seeing
http://www.boolbo.com
http://www.images.boolbo.com
Pages: [1]   Go Up
 

Page created in 0.038 seconds with 19 queries.