coppermine-gallery.com/forum

Support => cpg1.6 plugins => cpg1.6.x Support => cpg1.6 plugin contributions => Topic started by: 406man on July 16, 2023, 03:34:17 PM

Title: Suppressor Plugin
Post by: 406man on July 16, 2023, 03:34:17 PM

2) The second row of menu items is known in Coppermine as the sub-menu. These menu items can be suppressed:
•   Last Uploads
•   Last comments
•   Most viewed
•   Top rated
•   My Favorites (*)
•   Search

(*)If you suppress Favorites, the main menu item "Favorites" (actually appears on what is called the sub-menu) will be removed as well as the "Add to favourites" link on the image display page.

The following items of file information always appear unless they are blank:
•   Title
•   Caption
•   Album name
•   Name of uploader
•   Optional custom fields configured in the "Custom fields for image description" section

There is a button above the image on the image display screen "Show File Information" or "Hide File Information" which toggles between displaying all the file information or none of it. What suppressor does is to prevent the selected information being shown when the "Show File Information" button is set to show all file information.

The attached screenshots demonstrate an image being displayed with and without fields being suppressed by the plugin. Note the differences in both image information and sub-menus.

I've tested the plugin with Coppermine version 1.6.22 and 1.6.25. It won't install on 1.5.x. I've also tested it with French as the main language and it works fine.

LIMITATION: With the standard Coppermine eyeball and hardwired themes the plugin cannot change the sub_menu because the themes have their own definition of the sub_menu template which lacks the plugin hook. The image display works in the normal way so the plugin can suppress file info.

Occasionally I've made a change to the configuration but it seems not to have taken effect on the web page. This was due to a caching problem, not a problem with the plugin. Deleting temporary files and reloading sorted it out.

Comments, bug reports and feedback welcome.
Title: Re: Suppressor Plugin
Post by: 406man on July 16, 2023, 03:38:09 PM
The screenshots seem not to have attached to my previous message, apologies. Trying again.
Title: Re: Suppressor Plugin
Post by: ron4mac on August 23, 2023, 01:46:49 PM
Thank you for your plugin contributions. Please replace each of the plugin zip files submitted with:
1. A zipped folder (not just the constituent files) that is named appropriately according to the documentation e.g. suppressor
2. Name the zip file according to the convention used for other plugin contributions e.g. cpg1.6.x_plugin_suppressor_v1.0.zip
Title: Re: Suppressor Plugin
Post by: 406man on June 01, 2024, 03:04:39 PM
I've updated the plugin to version 1.1 with additional functionality compared to V1.0. Existing configuration settings now suppress items in the small display that pops up when hovering the mouse pointer over the image display and thumbnails. See the screenshots. The first (standard.png) shows the display in standard Coppermine. The next (part-suppressed.png) shows the same display with suppressor set so that only dimensions are displayed. The display can be fully suppressed if the administrator wishes.

I also added a configuration setting to suppress keywords in the File Information section and when hovering the mouse pointer over the image display. Be aware that the "User settings" section of the Coppermine Config has a setting "Allow users to assign album keywords" which suppresses keywords in some parts of Coppermine.
Title: Suppressor Plugin V1.2
Post by: 406man on January 28, 2025, 12:27:26 PM
I've upgraded the Suppressor plugin with some major new features and released it as version 1.2.  In broad terms the new features allow display or suppression of various fields for a particular album. Previous versions only suppressed various fields for the whole gallery.

The first new feature involves, depending on how the gallery is configured, either display of uploader name or suppressing the display of uploader name for a particular album.

A little more explanation. One of the gallery configuration settings in the Thumbnail View section is "Display uploader name below the thumbnail". As it says, this will display the uploader name below each thumbnail  in the thumbnail display screen. The setting applies to all albums so if you, for example set the checkbox, it's not possible to have an album where the name of the uploader isn't displayed. It's either displayed on all albums or none of them. Similarly, if you don't set the checkbox it's not possible to have an album where the name of the uploader is displayed.

Suppressor Version 1.2 implements its functionality using the Keyword field for an album. If you have a gallery where uploader name is normally displayed and the keyword NOUPLOADER is included in the Keyword field the uploader name will be suppressed for that album. Similarly, if you have a gallery where uploader name is not normally displayed and the keyword UPLOADER is included in the Keyword field the uploader name will be displayed for that album. Where a gallery has multiple keywords the standard keyword separator is the ";" character. Although the gallery configuration allows this to be changed it's recommended to leave it as it is.

Note that on the image Display screen the name of the uploader is always displayed if the "File information is visible by default" configuration option has been checked in the "Image View" section of the gallery configuration. It isn't impacted by the "Display uploader name below the thumbnail" configuration setting  described above. The suppressor plugin V1.2 will suppress display of uploader name for any picture in a particular album if the NOUPLOADER album keyword is set.

The other new feature involves suppressing the display of image EXIF information. This is enabled in the Image Settings section of the gallery configuration using the "Read EXIF data from JPEG files" setting. By adding NOEXIF to the album keyword field this display can be suppressed. At the same time it will also suppress the display of the custom fields for image description. Custom Fields are configured in the "Custom fields for image description" section of the gallery configuration.