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

0 Members and 1 Guest are viewing this topic.

treehstn

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 106
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: 15764
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 frequent poster
  • ***
  • Offline Offline
  • Posts: 106
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: 15764
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 frequent poster
  • ***
  • Offline Offline
  • Posts: 106
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: 15764
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 frequent poster
  • ***
  • Offline Offline
  • Posts: 106
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: 15764
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

Timmy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Turn off some of the file information items
« Reply #8 on: August 15, 2019, 02:01:52 pm »

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

Logged

treehstn

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 106
Re: Turn off some of the file information items
« Reply #9 on: May 20, 2022, 07:28:18 am »

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

Page created in 0.025 seconds with 19 queries.