Post by kaoruemi on Jul 29, 2013 17:06:50 GMT -8
Hello,
I've been trying to set up my board so that certain member groups will not be able to access certain areas such as the Admin panel and member list. I found a code that took away the member list button for regular users, but it appears to show up for for those in Member Groups because I guess it's treating them as staff (even though I've clicked that they aren't staff)?
I've done a lot of searching, but I just can't seem to find something that will accomplish the following:
Example: I have Member Groups id:4 and id:5 (Category B is set up so that only staff and id:5 can see it)
This is what I want to do:
- Restrict Member groups id:4 and id:5 from access to the member list (but Admin/Staff still need to have access)
- Restrict Member groups id:4 and id:5 from access to the admin panel (I don't want them to even see this on the board)
If there's a way to make the board recognize certain member groups as non-staff, that would be wonderful. I'm sorry if I missed a code that may accomplish this in the database (I did look!)
The following is one that I found that some nice, clever person made that removes menu buttons based on if the person viewing the board is staff, member or guest (but again, my issue is that those in Member Group seem to be treated the same as staff...) If there's something that's modifiable in this, that would be great.
<link rel="shortcut icon" type="icon/ico" href="http://www.picpanda.com/images/lyxc37spi0cgjy7vtd93.ico"/>
<link rel="icon" type="icon/ico" href="http://www.picpanda.com/images/lyxc37spi0cgjy7vtd93.ico"/>
<script type="text/javascript">
<!--
// Created by PopThosePringles
// Change the order here
var iStaffMenu = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var iMemberMenu = [1];
var iGuestMenu = [1];
function reorderMenu(){
var menu = new Object();
var iCount = 0, admin = false;
var iCell = document.getElementsByTagName("td");
for(c = 0; c < iCell.length; c ++){
if(iCell.item(c).className == "menubg" && iCell.item(c).firstChild){
iCell.item(c).firstChild.id = "themenu";
var cNodes = iCell.item(c).firstChild.childNodes;
for(n = 0; n < cNodes.length; n ++){
if(cNodes.item(n).nodeType == 1){
menu[++ iCount] = {
mnode: cNodes.item(n)
};
if(cNodes.item(n).href.match(/=admin/)){
admin = true;
}
cNodes.item(n).parentNode.removeChild(cNodes.item(n));
n --;
} else {
cNodes.item(n).parentNode.removeChild(cNodes.item(n));
n --;
}
}
}
}
var nOrder = (admin)? iStaffMenu : (pb_username!="Guest" ? iMemberMenu : iGuestMenu);
var theMenu = document.getElementById("themenu");
for(o = 0; o < nOrder.length; o ++){
if(menu[nOrder[o]].mnode){
theMenu.appendChild(menu[nOrder[o]].mnode);
if(o != (nOrder.length - 1)){
theMenu.appendChild(document.createTextNode(" "));
}
}
}
}
reorderMenu();
//-->
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-38784738-2', 'proboards.com');
ga('send', 'pageview');
</script>
If anyone has any insight or would be able to assist me I'd be very very grateful!
Many thanks,
KaoruEmi