Turn off some of the file information items Turn off some of the file information items
 

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

Turn off some of the file information items

Started by treehstn, April 19, 2019, 03:54:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

treehstn

1. Is it possible to turn off the following items under "file information"?  I don't want these to show in the admin area or on the image.

Album name
File size
Dimensions
Displayed
URL
Favorites

2.  Can the remaining items be re-ordered both in the admin area and where the images are displayed?

Thank you!

Αndré

Open displayimage.php and search for $info[...]

You can remove/comment out the items you don't need. You can also move them around, but you need to be careful to also move any related code accordingly. As this is a modification on a core file, this has to be re-applied after an update. Good news is: there's a plugin hook "file_info" so you can also achieve this with a custom plugin (recommended!). We can help you with this, if you give us more information which items remain and how exactly they should be sorted.

What exactly do you mean with "admin area"?

treehstn

Quote from: Αndré on May 10, 2019, 04:38:16 PM
What exactly do you mean with "admin area"?

To me the admin area is the screen that you upload photos from and fill in fields with info about the photo.  vs. the screen where someone viewing the album from the web who has no editing rights.  So I'd prefer that I could comment out or remove fields I'm not going to use. 

To be able to select which fields to show or hide using a plugin instead of changing the core files would be ideal!  It would also help a lot of there were more than 4 custom fields.  Maybe one custom plugin could accomplish both?

Thank you so much!

Αndré

#3
Quote from: treehstn on May 11, 2019, 02:40:42 AM
To me the admin area is the screen that you upload photos from and fill in fields with info about the photo.

I'm still not sure which screen(s) you mean. Please have a look at your browser's address bar. Files that came into my mind where meta data can be added:
- upload.php
- editpics.php
- edit_one_pic.php

treehstn

Here's the page where the public can see the image:  http://www.glassresearch.net/gallery/displayimage.php?album=lastup&cat=0&pid=140#top_display_media

It has the list of all the attributes, some of which I don't want displayed on this page.

What I think of as the "admin area" is the image I attached. 

I apologize.... after scrutinizing the admin page I just realized that the list of attributes that I'm talking about are not displayed on the admin page.  Only on the page that the public would see.  So it is just the public page that I'd like to turn off the display of those attributes.  I'm so sorry for not noticing that at the beginning...

If I use the instructions you posted earlier about commenting out the attributes in the displayimage.php do I need to re-edit that file every time Coppermine is updated?

Thank you!!!

Αndré

Quote from: treehstn on May 21, 2019, 04:11:55 PM
Here's the page where the public can see the image:  http://www.glassresearch.net/gallery/displayimage.php?album=lastup&cat=0&pid=140#top_display_media

It has the list of all the attributes, some of which I don't want displayed on this page.

What information do you want to hide? It currently displays:
QuoteFilename:   us0d0008465-001.jpg
Album name:   gladmin / us0d0008465
Keywords:   Pittsburg / Pennsylvania / Allegheny / T. B. Kerr / James I. Kay
Inventor's Name:   J. B. Lyon
Patent Date:   July 6, 1875
Pattern Name/Number:   Unknown
Original Manufacturer:   Unknown
Filesize:   26 KiB
Date added:   Apr 21, 2019
Dimensions:   680 x 1000 pixels
Displayed:   2 times
URL:   http://www.glassresearch.net/gallery/displayimage.php?pid=140
Favorites:   Add to Favorites


Quote from: treehstn on May 21, 2019, 04:11:55 PM
If I use the instructions you posted earlier about commenting out the attributes in the displayimage.php do I need to re-edit that file every time Coppermine is updated?
Yes.

treehstn

Quote from: Αndré on May 21, 2019, 04:51:46 PM
What information do you want to hide? It currently displays:
Yes.

Listed in the original post:

Album name
File size
Dimensions
Displayed
URL
Favorites

Αndré


Timmy

Would it be possible to do the same for these items as well please?


treehstn

Quote from: Timmy on August 15, 2019, 02:01:52 PM
Would it be possible to do the same for these items as well please?

Andre,

Just wanted to let you know that I had to drop the project I was working on because my husband was very ill.  I have a new project I'm working on and needed the same file info hidden for this new site.  I came back here and found your post about the hide_file_info.zip plugin.  I found it right where you said it was, loaded it up and it works great!  Thank you so much 3 years later! 

Cheryl