coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Dr Preacox on May 27, 2006, 09:34:47 AM

Title: member list
Post by: Dr Preacox on May 27, 2006, 09:34:47 AM
Heres an easy one I hope, trying to make the Memberlist public so all can view, because on my website DC-6.com i have an artists page which is essentially a list of my artists, and its becoming a pain, it would be easier if I could like directly to http://www.dc-6.com/gallery/usermgr.php and make it so anyone can view it
Title: Re: member list
Post by: Joachim Müller on May 27, 2006, 09:37:14 AM
Allow logged in users to view memberlist (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_user_memberlist)
Title: Re: member list
Post by: Dr Preacox on May 27, 2006, 10:40:41 AM
yes but i want non users ie guests to be able to view it,
Title: Re: member list
Post by: Stramm on May 27, 2006, 11:00:26 AM
copy over function theme_main_menu ftom themes/sample/theme.php to the theme.php you're actually using.
In that function you just copied find

    if (!USER_ID || !$CONFIG['allow_memberlist']) {
        template_extract_block($template_sys_menu, 'allow_memberlist');
    }

and replace with

    if (!$CONFIG['allow_memberlist']) {
        template_extract_block($template_sys_menu, 'allow_memberlist');
    }


now open usermgr.php and find
else {
$lim_user = 3;
cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}

and replace with
elseif ($CONFIG['allow_memberlist']) {
  $lim_user = 1;
  $number_of_columns = 7;
  show_memberlist;
}
else {
  $lim_user = 2;
  cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}


should work but I haven't tried. You should be able to turn on/ off displaying the memberlist with the entry in config
Title: Re: member list
Post by: Dr Preacox on May 27, 2006, 12:43:10 PM
Damn your good, how you can remember this amount of stuff is beyond me, anyway worked first time, thanxs heaps