Fullsize access plugin for cpg1.5.x - Page 3 Fullsize access plugin for cpg1.5.x - Page 3
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Fullsize access plugin for cpg1.5.x

Started by Αndré, May 04, 2012, 03:05:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MG

Quote from: Αndré on June 27, 2012, 10:52:34 AM
Try
<?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

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

Αndré

#41
Try
<?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);
}
}
?>

MG

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

<?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);
    }
}
?>



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

Αndré

Sorry, missing bracket. This should work:
<?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.

MG

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

JohannM

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

Αndré

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

Αndré