forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: shaddy on December 11, 2005, 12:42:52 am

Title: certain group to see file info box
Post by: shaddy on December 11, 2005, 12:42:52 am
I want only the group that I have made called FileInfo to see the file information.  I'm just not sure where to put the code.  I came up with

Code: [Select]
if (USER_GROUP == "FileInfo") {
$groupvariable = 1;
} else {
$groupvariable = 0;
}
and that does give the results I want.

and I discovered "display_pic_info" is the variable set in the Config menu.  And in theme.php,  I found
Code: [Select]
    $picinfo = isset($HTTP_COOKIE_VARS['picinfo']) ? $HTTP_COOKIE_VARS['picinfo'] : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo "<div id=\"picinfo\" style=\"display: $picinfo;\">\n";
    starttable();
    echo $pic_info;
    endtable();
    echo "</div>\n";

But replacing $CONFIG['display_pic_info']  with  $groupvariable didn't work.  What and where would I replace with $groupvariable?

EDIT: I obviously hadn't looked up what ISSET meant, but I solved my issue, see below post...

I tried searching here, and I tried to do it myself, but I'm just missing something.  Any hints?  I'm using 1.3.3

Shaddy

Title: Re: certain group to see file info box
Post by: shaddy on December 11, 2005, 02:41:51 am
My searches were for "file info" but while just browsing down the page I saw a similar Q for "image info".  I used the wrong search data I guess.

But I was able to edit displayimage.php  by looking for this
Code: [Select]
$pic_info = html_picinfo();and replacing it with
Code: [Select]
    if (USER_GROUP == "FileInfo") {
    $pic_info = html_picinfo();
} else {
    $pic_info = '';
}
so basically no one sees it except for the FileInfo group.  Thanks GauGau for posting in that other thread http://forum.coppermine-gallery.net/index.php?topic=23304.0 (http://forum.coppermine-gallery.net/index.php?topic=23304.0).  I just tweaked it to fit my needs. 

Sorry to ask then answer my own Q, thanks.
Shaddy
Title: Re: certain group to see file info box
Post by: Tranz on December 11, 2005, 03:46:43 am
Hey, we appreciate it when people come back to answer the question. :) Not only does it show you tried to help yourself but you shared the solution to help others.