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 2 [3]   Go Down

Author Topic: Fullsize access plugin for cpg1.5.x  (Read 51848 times)

0 Members and 1 Guest are viewing this topic.

MG

  • Contributor
  • Coppermine newbie
  • ***
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • om
Re: Re: Fullsize access plugin for cpg1.5.x
« Reply #40 on: December 17, 2018, 09:46:38 pm »

Try
Code: [Select]
<?php
function fullsize_check_user(){
global $USER_DATA;
if($USER_DATA['group_name'] == 'Testing'){
return(true);
} else{
return(false);
}
}
?>

Hi Αndré,
This code works fine, but only for one group.  Is it possible to change this option for several groups?
I would like to add full access to 12 different groups.

All the best
Mat

Logged
Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Fullsize access plugin for cpg1.5.x
« Reply #41 on: December 18, 2018, 03:41:46 pm »

Try
Code: [Select]
<?php
function fullsize_check_user(){
global $USER_DATA;
if (in_array($USER_DATA['group_name'], array('Testing''Group 2''Group 3''Group 4'))){
return(true);
} else{
return(false);
}
}
?>
« Last Edit: December 18, 2018, 05:30:37 pm by Αndré »
Logged

MG

  • Contributor
  • Coppermine newbie
  • ***
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • om
Re: Fullsize access plugin for cpg1.5.x
« Reply #42 on: December 18, 2018, 05:25:59 pm »

Thank you for the quick reply.

I have this error:
Parse error: syntax error, unexpected '{' in /home/admin/domains/domain/public_html/resources/plugins/fullsize_access/fullsize_check.php on line 4

Code: [Select]
<?php
function fullsize_check_user(){
    global 
$USER_DATA;
    if (
in_array($USER_DATA['group_name'], array('Boss''Global Mod''Mod''Cover Legend')){
        return(
true);
    } else{
        return(
false);
    }
}
?>


Logged
Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Fullsize access plugin for cpg1.5.x
« Reply #43 on: December 18, 2018, 05:30:14 pm »

Sorry, missing bracket. This should work:
Code: [Select]
<?php
function fullsize_check_user(){
    global 
$USER_DATA;
    if (
in_array($USER_DATA['group_name'], array('Boss''Global Mod''Mod''Cover Legend'))){
        return(
true);
    } else{
        return(
false);
    }
}
?>

I'll update my above code accordingly.
Logged

MG

  • Contributor
  • Coppermine newbie
  • ***
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • om
Re: Fullsize access plugin for cpg1.5.x
« Reply #44 on: December 18, 2018, 05:45:17 pm »

Now it works perfectly, thank you very much Αndré
Logged
Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0

JohannM

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 252
Re: Fullsize access plugin for cpg1.5.x
« Reply #45 on: March 20, 2019, 08:14:44 pm »

Hello Andre

Hope you are doing well.

Will it possible to adopt this plugin for cpg v1.6.05 and php 7  as I use this on a daily basis ?

Regards

Johann
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Fullsize access plugin for cpg1.5.x
« Reply #46 on: March 27, 2019, 05:14:49 pm »

I'm quite sure this is possible. I'll have a look as soon as possible.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Fullsize access plugin for cpg1.5.x
« Reply #47 on: April 04, 2019, 01:37:55 pm »

Please try this version and report if it works as expected, as I hadn't much time to test: https://github.com/coppermine-gallery/cpg1.6.x-plugins/blob/master/cpg1.6.x_plugin_fullsize_access_v1.1.zip
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.018 seconds with 22 queries.