Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   New class (http://www.bvlist.com/showthread.php?t=5221)


replace the UC_MODERATOR with you new class ex: UC_MOD
Enjoy :ok:
sagap 22nd August 2010 00:35

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) { ?>
Port

sagap 22nd August 2010 22:58

=tkx i finished. i have 12 classes now

Timisoreanul 22nd August 2010 23:12

Glad that you sorted out. :drink:

sagap 24th August 2010 14:43

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?

Timisoreanul 24th August 2010 15:31

http://bvlist.com/8060-post4.html

sagap 24th August 2010 22:40

Quote:

Originally Posted by Timisoreanul (Post 24118)

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





with

Code:

if (get_user_class() <>= UC_UPLOADER?>




daffy 24th August 2010 22:46

replace

Code:

= UC_UPLOADER) { ?>
with
Code:

UC_UPLOADER) { ?>
or try
replace
Code:

if (get_user_class() >= UC_UPLOADER) { ?>

sagap 26th August 2010 18:32

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.

daffy 17th October 2011 01:14

2 Attachment(s)
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);


DAKz 17th October 2011 01:18

what about the class eel-smoker
 
Code:

define ('UC_PEASANT', 0);

mmmwwwhahahahah :lol:


All times are GMT +2. The time now is 06:59.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.