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: Turn off some of the file information items  (Read 587 times)

0 Members and 1 Guest are viewing this topic.

treehstn

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Turn off some of the file information items
« on: April 19, 2019, 03:54:53 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: Turn off some of the file information items
« Reply #1 on: May 10, 2019, 04:38:16 pm »

Open displayimage.php and search for
Code: [Select]
$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"?
Logged

treehstn

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: Turn off some of the file information items
« Reply #2 on: May 11, 2019, 02:40:42 am »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: Turn off some of the file information items
« Reply #3 on: May 21, 2019, 03:24:59 pm »

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
« Last Edit: May 21, 2019, 04:49:03 pm by Αndré »
Logged

treehstn

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: Turn off some of the file information items
« Reply #4 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 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!!!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: Turn off some of the file information items
« Reply #5 on: May 21, 2019, 04:51:46 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:
Quote
Filename:   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


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

treehstn

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: Turn off some of the file information items
« Reply #6 on: May 21, 2019, 06:59:57 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15757
Re: Turn off some of the file information items
« Reply #7 on: May 22, 2019, 04:14:55 pm »

Download hide_file_info.zip from here: https://github.com/eenemeenemuu/cpg-plugin-drafts

Then, upload and install the plugin as described in the docs: https://documentation.coppermine-gallery.net/en/plugins.htm#plugin_manager
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 21 queries.