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: Hide AlbumsDownload Zip icon from non-admin users  (Read 5364 times)

0 Members and 1 Guest are viewing this topic.

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Hide AlbumsDownload Zip icon from non-admin users
« on: March 22, 2013, 09:21:41 pm »

My website URL is: http://www.victoriacameraclub.org/vcccompetitions/

Thanks to this forum, I have successfully installed the albumsdownload plugin. Works great!

My desire is to be able to hide the zip/download icon to all viewers except those with admin authority on the gallery.

Your advice on how that might be done would be appreciated.

Thank you.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hide AlbumsDownload Zip icon from non-admin users
« Reply #1 on: March 25, 2013, 12:00:36 pm »

To hide the button for non-admin users, open codebase.php, find
Code: [Select]
if ($superCage->get->getInt('album') > 0) {and replace with
Code: [Select]
if (GALLERY_ADMIN_MODE && $superCage->get->getInt('album') > 0) {
open zip.php, find
Code: [Select]
<?phpand below, add
Code: [Select]
if (!GALLERY_ADMIN_MODE) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
Logged

GarryS

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Hide AlbumsDownload Zip icon from non-admin users
« Reply #2 on: March 25, 2013, 06:33:25 pm »

Thank you very much, Andre. That works perfectly.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.