[HELP] Ubercms rank adding

Wayne_1998

Member
Aug 11, 2013
60
0
Hey again guy's am here for help again, Anywhooo, I have added a rank and checked perm_ranks and edited that too but the thing is I want the rank to show on staff page in a box, if any off you know please reply don't ignore. Thank you :p
 

Find

Posting Freak
Jun 21, 2012
597
189
Ok well go into your wwwroot/htdocs and go to the staff.php file. It will have a file name in there like comp-staff.tpl. Find that page in your inclues > tpl folder and paste it here
 

Wayne_1998

Member
Aug 11, 2013
60
0
<?php
/*=======================================================================
| UberCMS - Advanced Website and Content Management System for uberEmu
| #######################################################################
| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'
| &
| #######################################################################
| This program is free software: you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation, either version 3 of the License, or
| (at your option) any later version.
| #######################################################################
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
\======================================================================*/

define('TAB_ID', 5);
define('PAGE_ID', 16);

require_once "global.php";

$tpl->Init();

$tpl->AddGeneric('head-init');

$tpl->AddIncludeSet('generic');
$tpl->AddIncludeFile(new IncludeFile('text/css', ' ', 'stylesheet'));
$tpl->AddIncludeFile(new IncludeFile('text/javascript', '
$tpl->WriteIncludeFiles();

$tpl->AddGeneric('head-overrides-generic');
$tpl->AddGeneric('head-bottom');
$tpl->AddGeneric('generic-top');

$tpl->Write('<div id="column1" class="column">');
$tpl->AddGeneric('comp-staff');
$tpl->Write('</div>');

$tpl->Write('<div id="column2" class="column">');
$tpl->AddGeneric('comp-staff-about');
$tpl->AddGeneric('comp-vip-support');
$tpl->Write('</div>');

$tpl->AddGeneric('generic-column3');
$tpl->AddGeneric('footer');

$tpl->SetParam('page_title', 'Habbo Staff');
$tpl->SetParam('body_id', 'home');

$tpl->Output();

?>
 

Wayne_1998

Member
Aug 11, 2013
60
0
<?php

function GetDescr($level)
{
switch ($level)
{
case 7:

return 'Hotel Management & Developers';

case 6:

return 'Administrator Coordinators/Leaders';

case 5:

return 'Administrator Staff';

case 4:

return 'Moderation & Safety Staff';


case 3:

return 'Trainee Moderators';


default:

return '';
}
}

$getGroups = dbquery("SELECT id,name FROM ranks WHERE id >= 4 ORDER BY id DESC");

while ($group = mysql_fetch_assoc($getGroups))
{
echo '<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">' . clean($group['name']) . 's</span> <span style="float: right; font-weight: normal; font-size: 75%;">' . GetDescr($group['id']) . '</span></h2>';

$getMembers = dbquery("SELECT id,username,motto,look,online FROM users WHERE rank = '" . $group['id'] . "'");

echo '<div class="box-content">';

if (mysql_num_rows($getMembers) > 0)
{
$oe = 1;

while ($member = mysql_fetch_assoc($getMembers))
{
if ($oe == 2)
{
$oe = 1;
}
else
{
$oe = 2;
}

echo '<table width="107%" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';">
<tbody>
<tr>
<td valign="middle" width="25">
<img style="margin-top: -10px;" src="%www%/includes/imager.php?figure=' . $member['look'] . '&size=m">
</td>
<td valign="top">
<b style="font-size: 110%;"><a href="%www%/home/' . clean($member['username']) . '">' . clean($member['username']) . '</a></b><br />
<i>' . clean($member['motto']) . '</i><br />
<br />';

$getBadges = dbquery("SELECT * FROM user_badges WHERE user_id = '" . $member['id'] . "' AND badge_slot >= 1 ORDER BY badge_slot DESC LIMIT 5");

while ($b = mysql_fetch_assoc($getBadges))
{
echo '<img src=" ' . $b['badge_id'] . '.gif" style="float: left;">&nbsp;';
}

echo '</td>
<td valign="top" style="float: right;">
' . (($member['online'] == "1") ? '<b style="color: darkgreen;">Online</b>' : '<b style="color: darkred;">Offline</b>') . '
</td>
</tr>
</tbody>
</table>';
}
}
else
{
echo '<i>There are no users in this staff group yet.</i>';
}

echo '</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script> ';
}

?>
 

Find

Posting Freak
Jun 21, 2012
597
189
Try this, idk if it will work:
PHP:
<?php
 
function GetDescr($level)
{
switch ($level)
{
case 8:
 
return 'New Rank Title';
 
case 7:
 
return 'Hotel Management & Developers';
 
case 6:
 
return 'Administrator Coordinators/Leaders';
 
case 5:
 
return 'Administrator Staff';
 
case 4:
 
return 'Moderation & Safety Staff';
 
 
case 3:
 
return 'Trainee Moderators';
 
 
default:
 
return '';
}
}
 
$getGroups = dbquery("SELECT id,name FROM ranks WHERE id >= 4 ORDER BY id DESC");
 
while ($group = mysql_fetch_assoc($getGroups))
{
echo '<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: left;">' . clean($group['name']) . 's</span> <span style="float: right; font-weight: normal; font-size: 75%;">' . GetDescr($group['id']) . '</span></h2>';
 
$getMembers = dbquery("SELECT id,username,motto,look,online FROM users WHERE rank = '" . $group['id'] . "'");
 
echo '<div class="box-content">';
 
if (mysql_num_rows($getMembers) > 0)
{
$oe = 1;
 
while ($member = mysql_fetch_assoc($getMembers))
{
if ($oe == 2)
{
$oe = 1;
}
else
{
$oe = 2;
}
 
echo '<table width="107%" style="padding: 5px; margin-left: -15px; background-color: ' . (($oe == 2) ? '#fff' : '#E6E6E6') . ';">
<tbody>
<tr>
<td valign="middle" width="25">
<img style="margin-top: -10px;" src="%www%/includes/imager.php?figure=' . $member['look'] . '&size=m">
</td>
<td valign="top">
<b style="font-size: 110%;"><a href="%www%/home/' . clean($member['username']) . '">' . clean($member['username']) . '</a></b><br />
<i>' . clean($member['motto']) . '</i><br />
<br />';
 
$getBadges = dbquery("SELECT * FROM user_badges WHERE user_id = '" . $member['id'] . "' AND badge_slot >= 1 ORDER BY badge_slot DESC LIMIT 5");
 
while ($b = mysql_fetch_assoc($getBadges))
{
echo '<img src="http://images.habbo.com/c_images/album1584/' . $b['badge_id'] . '.gif" style="float: left;">&nbsp;';
}
 
echo '</td>
<td valign="top" style="float: right;">
' . (($member['online'] == "1") ? '<b style="color: darkgreen;">Online</b>' : '<b style="color: darkred;">Offline</b>') . '
</td>
</tr>
</tbody>
</table>';
}
}
else
{
echo '<i>There are no users in this staff group yet.</i>';
}
 
echo '</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script> ';
}
 
?>
 

Users who are viewing this thread

Top