forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: treehstn on April 19, 2019, 03:54:53 pm

Title: Turn off some of the file information items
Post by: treehstn 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!
Title: Re: Turn off some of the file information items
Post by: Αndré 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"?
Title: Re: Turn off some of the file information items
Post by: treehstn 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!
Title: Re: Turn off some of the file information items
Post by: Αndré 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
Title: Re: Turn off some of the file information items
Post by: 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 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!!!
Title: Re: Turn off some of the file information items
Post by: Αndré 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.
Title: Re: Turn off some of the file information items
Post by: treehstn 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
Title: Re: Turn off some of the file information items
Post by: Αndré 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
Title: Re: Turn off some of the file information items
Post by: Timmy on August 15, 2019, 02:01:52 pm
Would it be possible to do the same for these items as well please?