Skynox
Authorized Bartender
I wanted to have two separated administration panels for GM/God's.
It took a while cause my knowledge of PHP are very limited. And now when
I finally made it, I want to share this with those who want
Group-based administration panels and find php coding difficult.
---------------------------------------------------------------
Example: (This is how my panels look)
God Panel ----------------------------------- Gamemaster Panel
*Administration ----------------------------- *Banishments
*Namelock Manager ------------------------ *Namelock Manager
*Report Manager --------------------------- *Report Manager
*Massmail
*Banishments
*GM Manager (Requested)
-------------------------------------------------------------------------
Add this in your config.php above $config['site']['access_admin_panel'] = 4; // access level needed to open admin panel
Find this at the bottom of your layout.php.
Replace it with this.
Edit the INSERT and LINK parts in the layout.php to costumize the links of your panels.
Remember to make a copy of your original layout.php before editing something.
I hope that someone can have any use of this.
Kind regards,
Skynox
It took a while cause my knowledge of PHP are very limited. And now when
I finally made it, I want to share this with those who want
Group-based administration panels and find php coding difficult.
---------------------------------------------------------------
Example: (This is how my panels look)
God Panel ----------------------------------- Gamemaster Panel
*Administration ----------------------------- *Banishments
*Namelock Manager ------------------------ *Namelock Manager
*Report Manager --------------------------- *Report Manager
*Massmail
*Banishments
*GM Manager (Requested)
-------------------------------------------------------------------------
Add this in your config.php above $config['site']['access_admin_panel'] = 4; // access level needed to open admin panel
Code:
$config['site']['access_gamemaster'] = 3; // access level needed to open admin panel, Gamemasters
Find this at the bottom of your layout.php.
PHP:
<?PHP
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
echo '<div id="NewcomerBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/admin/admin.png);"><div id="lool" CLASS=white>
<table><tr><td height="30"> </td><td> </td></tr>
<tr><td height="10"> </td><td><a href="?subtopic=INSERT1"><font color="white"><b>LINK1</b></font></a><br><a href="?subtopic=INSERT2"><font color="white"><b>LINK2</b></font></a><br><a href="?subtopic=INSERT3"><font color="white"><b>LINK3</b></font></a><br><a href="index.php?subtopic=INSERT4"><font color="white"><b>LINK4</b></font></a><br><a href="?subtopic=INSERT5"><font color="white"><b>LINK5</b></font></a></td></tr></table></div>
<div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
</div>';
}
?>
PHP:
<?PHP
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
echo '<div id="NewcomerBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/admin/admin.png);"><div id="lool" CLASS=white>
<table><tr><td height="30"> </td><td> </td></tr>
<tr><td height="10"> </td><td><a href="?subtopic=INSERT1"><font color="white"><b>LINK1</b></font></a><br><a href="?subtopic=INSERT2"><font color="white"><b>LINK2</b></font></a><br><a href="?subtopic=INSERT3"><font color="white"><b>LINK3</b></font></a><br><a href="index.php?subtopic=INSERT4"><font color="white"><b>LINK4</b></font></a><br><a href="?subtopic=INSERT5"><font color="white"><b>LINK5</b></font></a></td></tr></table></div>
<div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
</div>';
}
else
if($group_id_of_acc_logged >= $config['site']['access_gamemaster']) {
echo '<div id="NewcomerBox" class="Themebox" style="background-image:url('.$layout_name.'/images/themeboxes/admin/admin.png);"><div id="lool" CLASS=white>
<table><tr><td height="30"> </td><td> </td></tr>
<tr><td height="10"> </td><td><a href="?subtopic=INSERT1"><font color="white"><b>LINK1</b></font></a><br><a href="?subtopic=INSERT2"><font color="white"><b>LINK2</b></font></a><br><a href="?subtopic=INSERT3"><font color="white"><b>LINK3</b></font></a><br><a href="index.php?subtopic=INSERT4"><font color="white"><b>LINK4</b></font></a><br><a href="?subtopic=INSERT5"><font color="white"><b>LINK5</b></font></a></td></tr></table></div>
<div class="Bottom" style="background-image:url('.$layout_name.'/images/general/box-bottom.gif);"></div>
</div>';
}
?>
Remember to make a copy of your original layout.php before editing something.
I hope that someone can have any use of this.
Kind regards,
Skynox