forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: holyone on January 27, 2004, 07:27:32 pm

Title: Edit Picture information
Post by: holyone 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.
Title: Edit Picture information
Post by: Nibbler 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']]
Title: Edit Picture information
Post by: holyone 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.
Title: Edit Picture information
Post by: Nibbler on January 27, 2004, 10:17:44 pm
I just tested it, didnt get any errors from it.
Title: Edit Picture information
Post by: holyone 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.
Title: Edit Picture information
Post by: holyone 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.
Title: If I modify the Pic Info I get a Parse Error, why?
Post by: boolbo 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
Title: Edit Picture information
Post by: Joachim Müller 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
Title: Edit Picture information
Post by: boolbo 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