It does work both ways actually (which is odd, I done it the way I posted for a hack and it works), although the change you have made would be the correct way to do it
Sorry Boofo, its 2AM here and I'm kinda tired, I forgot those sections from the text file, the other query you need to replace is:
PHP Code:
$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,showgroup=".intval($showgroup).",cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip,cangetattachment=$cangetattachment WHERE usergroupid=$usergroupid");
With:
PHP Code:
$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,canplotip=$canplotip,showgroup=".intval($showgroup).",cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip,cangetattachment=$cangetattachment WHERE usergroupid=$usergroupid");
That's ok, I found it and put it in there. Thanks for getting me that far though. Are you ready for this? I think I found a way to fix that error everyone keeps getting with the time problem. Since I moved it to the root dir, there are no more error showing up on the page and it comes up a lot faster now. The only thing is, the background of the page is white now instead of the Admin CP default. Any way to add that back in? Or some kind of background, anyway? Also, you said to take out the cpheader and cpfooter lines right? I want to make sure there is no security risk.
Also, when I was talking about the permissions, I meant the permissions to view IPs. It is probably better this way, but can it be made to just follow the View IP addresses permissions?
Originally posted by Boofo
The only thing is, the background of the page is white now instead of the Admin CP default. Any way to add that back in?
Add some where between <head> and </head> in the HTML:
Code:
<link rel="stylesheet" href="cp.css">
That will use the ACP colours.
Quote:
Also, you said to take out the cpheader and cpfooter lines right? I want to make sure there is no security risk.
If you have the code I mentioned earlier it will work only for those users with have canplotip set to 1.
Quote:
Also, when I was talking about the permissions, I meant the permissions to view IPs. It is probably better this way, but can it be made to just follow the View IP addresses permissions?
Use this code for that:
PHP Code:
$permissions=getpermissions();
if (!$permissions[canwhosonlineip]) {
show_nopermission();
}