Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 22nd August 2010, 00:35
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
To add, edit & delete class go to include folder ,if you use the new tbdev look at user_functions.php for older tbdev , it is in global.php. Now look for this
Code:
function get_user_class_name($class)
{
  switch ($class)
  {
    case UC_USER: return "User";

    case UC_POWER_USER: return "Power User";

    case UC_VIP: return "VIP";

    case UC_UPLOADER: return "Uploader";

    case UC_MODERATOR: return "Moderator";

    case UC_ADMINISTRATOR: return "Administrator";

    case UC_SYSOP: return "SysOp";
  }
  return "";
}
If you what to add a new class just add
Code:
case UC_Multi_USER: return "Multi User";
To edit just edit the name , ex: case UC_MODERATOR: return "Moderator"; to case UC_MOD: return "Mod";
To delete simply delete case uc_xx the whole thinq

attention

Attention

Now to work the new class you have to edit almost every php file




Ex: in userdetalis.php it is the this
Code:
if ($user["id"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR)
{
if ($user['port'] != 0) { ?>
<tr><td class=rowhead>Port</font></td><td class=tablea align=left><?=($user['port'])?></td></tr>
replace the UC_MODERATOR with you new class ex: UC_MOD
Enjoy
Reply With Quote
The Following User Says Thank You to sagap For This Useful Post:
kapel12 (23rd July 2012)
  #2  
Old 22nd August 2010, 22:58
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
=tkx i finished. i have 12 classes now
Reply With Quote
  #3  
Old 22nd August 2010, 23:12
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Glad that you sorted out.
Reply With Quote
  #4  
Old 24th August 2010, 14:43
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
i have a new problem now at the menu. I want smaller class than Uploader not see a button from menu. How to do that?
Reply With Quote
  #5  
Old 24th August 2010, 15:31
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
http://bvlist.com/8060-post4.html
Reply With Quote
  #6  
Old 24th August 2010, 22:40
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
Quote:
Originally Posted by Timisoreanul View Post
with that code doen't work because i tryed. i put the code:

PHP Code:
<!------------- MENU ------------------------------------------------------------------------>

<? $fn substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1); ?>
<tr><td class=outer align=center>
<table class=main width=700 cellspacing="0" cellpadding="5" border="0">
<tr valign=bottom>

<? if (!$CURUSER) { ?>
<td align="center" class="navigation">
<a href=/><? print("Login")?></a> / <a href=/signup.php><? print("" .SIGNUP"")?></a> / <a href=/recover.php><? print("" .RECOVER"")?></a>
<!--/ <a href="/email-gateway.php?id=1"><? print("Contact")?></a>---->
<!---- / <a href=/rules.php><? print("" .RULES"")?></a> / <a href=/faq.php><? print("" .FAQ"")?></a> ---->
</td>
<? } else { ?>
<td align="center" class="navigation"><a href=/><? print("" .HOME"")?></a></td>
<td align="center" class="navigation"><a href=/browse.php><? print("" .BROWSE"")?></a></td>
<td align="center" class="navigation"><a href=/docs.php>Docs</a><!----&nbsp;<img src=/pic/new.png /></td>---->
<td align="center" class="navigation"><a href=/donate.php>Doneaza</a></td>
<td align="center" class="navigation"><a href=/viewrequests.php><? print("" .REQUESTS"")?></a></td>
<td align="center" class="navigation"><a href=/my.php><? print("" .PROFILE"")?></a></td>
<td align="center" class="navigation"><a href=/forums.php><? print("" .FORUMS"")?></a></td>
<td align="center" class="navigation"><a href=/uploadapp.php><? print("" .UploadApp"")?></a></td>
</a></td>
<? if (get_user_class() >= UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/upload.php><? print("" .UPLOAD"")?></a></td>
<? if (get_user_class() >= UC_MODERATOR) { ?>
<td align="center" class="navigation"><a href=/topten.php><? print("" .TOP_10"")?></a></td>
<td align="center" class="navigation"><a href=/staffpanel.php><? print("" .C_PANEL"")?></a></td>
<? } if (get_user_class() >= UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/log.php><? print("" .LOG"")?></a></td>
<td align="center" class="navigation"><a href=/staff.php><? print("" .STAFF"")?></a></td>
<? } } } ?>
<td align="center" class="navigation"><a href=/faq.php><? print("" .FAQ"")?></a></td>
<td align="center" class="navigation"><a href=/rules.php><? print("" .RULES"")?></a></td>

</tr>
</table>
</td>
</tr>
<tr><td align=center class=outer style="padding-top: 20px; padding-bottom: 20px">
and i want the uploadapp.php buton to see it only < UC_Uploader or <= UC_VIP
Reply With Quote
  #7  
Old 24th August 2010, 22:46
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
replace

Code:
<?php if (get_user_class() >= UC_UPLOADER) { ?>
with
Code:
<?php if (get_user_class() <> UC_UPLOADER) { ?>
or try
replace
Code:
<?php if (get_user_class() >= UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/upload.php><? print("" .UPLOAD. "")?></a></td>


with

Code:
<?php if (get_user_class() <>= UC_UPLOADER)  ?>
<td align="center" class="navigation"><a href=/upload.php><? print("" .UPLOAD. "")?></a></td>
<?php}?>

__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #8  
Old 26th August 2010, 18:32
sagap sagap is offline
Member
 
Join Date: Aug 2010
P2P
Posts: 6
Default
i modified my menu like that:
PHP Code:
<!------------- MENU ------------------------------------------------------------------------>

<? $fn substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], "/") + 1); ?>
<tr><td class=outer align=center>
<table class=main width=700 cellspacing="0" cellpadding="5" border="0">
<tr valign=bottom>

<? if (!$CURUSER) { ?>
<td align="center" class="navigation">
<a href=/><? print("Login")?></a> / <a href=/signup.php><? print("" .SIGNUP"")?></a> / <a href=/recover.php><? print("" .RECOVER"")?></a>
<!--/ <a href="/email-gateway.php?id=1"><? print("Contact")?></a>---->
<!---- / <a href=/rules.php><? print("" .RULES"")?></a> / <a href=/faq.php><? print("" .FAQ"")?></a> ---->
</td>
<? } else { ?>
<td align="center" class="navigation"><a href=/><? print("" .HOME"")?></a></td>
<td align="center" class="navigation"><a href=/browse.php><? print("" .BROWSE"")?></a></td>
<td align="center" class="navigation"><a href=/donate.php>Doneaza</a></td>
<td align="center" class="navigation"><a href=/viewrequests.php><? print("" .REQUESTS"")?></a></td>
<td align="center" class="navigation"><a href=/my.php><? print("" .PROFILE"")?></a></td>
<td align="center" class="navigation"><a href=/forums.php><? print("" .FORUMS"")?></a></td>
<td align="center" class="navigation"><a href=/faq.php><? print("" .FAQ"")?></a></td>
<td align="center" class="navigation"><a href=/rules.php><? print("" .RULES"")?></a></td>
</a></td>
<? if (get_user_class() >= UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/upload.php><? print("" .UPLOAD"")?></a></td>
<? if (get_user_class() >= UC_MODERATOR) { ?>
<td align="center" class="navigation"><a href=/topten.php><? print("" .TOP_10"")?></a></td>
<td align="center" class="navigation"><a href=/staffpanel.php><? print("" .C_PANEL"")?></a></td>
<? } if (get_user_class() >= UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/log.php><? print("" .LOG"")?></a></td>
<td align="center" class="navigation"><a href=/staff.php><? print("" .STAFF"")?></a></td>
<? if (get_user_class() < UC_UPLOADER) { ?>
<td align="center" class="navigation"><a href=/uploadapp.php><? print("" .UploadApp"")?></a></td>
<? } } } } ?>
and this part
PHP Code:
<? if (get_user_class() < UC_UPLOADER) { ?>
<td align="center" class="navigation"><a  href=/uploadapp.php><? print("" .UploadApp.  "")?></a></td>
doesn't work.
Reply With Quote
  #9  
Old 17th October 2011, 01:14
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
add staff to root
add lang_staff to lang/en




this code its from user_functions replace with below change colors and images to your choice. change your staff class via phpmyadmin from 7 - 17 or

Code:
function get_user_class_color($class)
{
    switch ($class)
    {
        case UC_PEASANT: return "f9a200";
       case UC_USER: return "f9a200";
case UC_POWER_USER: return "f9a200";
case UC_ELITE_USER: return "f9a200";
case UC_XTREME_USER: return "f9a200";
case UC_SUPER_USER: return "f9a200";
case UC_LEGEND_USER: return "f9a200";
case UC_VIP: return "f9a200";
case UC_LEGEND_VIP: return "f9a200";
case UC_JRUPLOADER: return "f9a200";
case UC_UPLOADER: return "f9a200";
case UC_EUPLOADER: return "f9a200";
case UC_DESIGNER: return "f9a200";
case UC_MODERATOR: return "f9a200";
case UC_EMODERATOR: return "f9a200";
case UC_ADMINISTRATOR: return "f9a200";
case UC_EADMINISTRATOR: return "f9a200";
case UC_SYSOP: return "f9a200";
case UC_TECH: return "f9a200";
case UC_BOSS: return "f9a200";
case UC_SUPERVISOR: return "f9a200";
    }
    return "";
}

replace in bittorent.php
Code:
define ('UC_PEASANT', 0);
define ('UC_USER', 1);
define ('UC_POWER_USER', 2);
define ('UC_ELITE_USER', 3);
define ('UC_XTREME_USER', 4);
define ('UC_SUPER_USER', 5);
define ('UC_LEGEND_USER', 6);
define ('UC_VIP', 7);
define ('UC_LEGEND_VIP', 8);
define ('UC_JRUPLOADER', 9);
define ('UC_UPLOADER', 10);
define ('UC_EUPLOADER', 11);
define ('UC_DESIGNER', 12);
define ('UC_MODERATOR', 13);
define ('UC_EMODERATOR', 14);
define ('UC_ADMINISTRATOR', 15);
define ('UC_EADMINISTRATOR', 16);
define ('UC_SYSOP', 17);
define ('UC_TECH', 18);
define ('UC_BOSS', 19);
define ('UC_SUPERVISOR', 20);
Attached Files
File Type: php staff.php (8.5 KB, 17 views)
File Type: php lang_staff.php (1.1 KB, 16 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #10  
Old 17th October 2011, 01:18
DAKz's Avatar
DAKz DAKz is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 380
Talking what about the class eel-smoker
Code:
define ('UC_PEASANT', 0);

mmmwwwhahahahah
Reply With Quote
Reply

Tags
class

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 15:22. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.