Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
color member
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Support

2020-08-16 19:06:50
Hello, I have the function class color and I can't put the pseudo uploader, vip and other color group for lr ps the torrents page can you tell me the code to use I tried several codes and it doesn't work??

[ATTACH type="full"]5766[/ATTACH]
1597604274901.png
1597604274901.png
2020-08-16 19:10:30
This is in functions.php. Create different cases for any groups you are adding to the stock version
//start class colors function
function class_user($name) {
global $site_config;
$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";
$res = SQL_Query_exec($a);
$classy = @mysqli_fetch_row($res);
switch ($classy[0]) {
        case 8: // Site Owner
        $col = "".$site_config["siteowner_color"]."";
        break;
        case 7: // Administrator
        $col = "".$site_config["administrator_color"]."";
        break;
        case 6: // Super Moderator
        $col = "".$site_config["super_moderator_color"]."";
        break;
        case 5: // Moderator
        $col = "".$site_config["moderator_color"]."";
        break;
        case 4: // Uploader
        $col = "".$site_config["uploader_color"]."";
        break;
        case 3: // VIP
        $col = "".$site_config["vip_color"]."";
        break;
        case 2: // Power User
        $col = "".$site_config["power_user_color"]."";
        break;
        case 1: // User
        $col = "".$site_config["user_color"]."";

}if($classy[1]>0){
$star="<img src='".$site_config[SITEURL]."/images/star.png' alt='donated' border='0'>";
}else{ $star="";}
if($classy[2]=="yes"){
$warn="<img src='".$site_config[SITEURL]."/images/warned.png' alt='warned' border=0>";
}else{ $warn=""; }
if($classy[3]=="no"){
$disabled="<img src='".$site_config[SITEURL]."/images/disabled.png' alt='disabled' border=0>";
}else{ $disabled=""; }
return unesc("<font color='".$col."'>".$name."".$star."".$warn."".$disabled."</font>");
}
//end class colors function

config.php
// class colors
$site_config["CLASS_USER"] ='true'; //only used for site catalog. Leave TRUE. Does not turn off class user colors. Im just lazy as hell haha
$site_config['siteowner_color'] = '#00ffbf';  // Site Owner
$site_config['administrator_color'] = 'red';  // Administrator
$site_config['super_moderator_color'] = '#009AFF';   // Super Moderator
$site_config['moderator_color'] = 'pink';  // Moderator
$site_config['uploader_color'] = 'purple';  // Uploader
$site_config['vip_color'] = 'dimgray';  // VIP
$site_config['power_user_color'] = 'brown';  // Power User
$site_config['user_color'] = 'green';  // User

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-08-16 19:22:59
Thanks for your help, but I've got a blank slate, it's just in the page of torrent.php which does not have the color of the nickname because elsewhere on the site the color is displayed
2020-08-16 19:32:55
If function installed already try this line
echo "<a href='account-details.php?id=$row[owner]'>$row[username]</a>";

Needs to be like
echo "<a href='account-details.php?id=$row[owner]'>'.class_color($row[username]).'</a>";
2020-08-16 19:40:01
Thanks, m-jay, but take a look at his poster here. :D

the part to look for in the file is this;

<a href='account-details.php?id=$row[owner]'>$row[username]</a>
2020-08-17 18:57:03
Good evening, m-jay. I found the right code, which is...

<b><a href=account-details.php?id=" . $row["owner"] . ">".class_user($row['username'])."</a></b>
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728