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
User Posts

Go to Profile

"cooly, post: 63492":
Ok I have seen that users have been using the sql calls in alot of files just to collect class colors and when they have to change something it means having to go through all the different files to add new classes into it so it matches. So i made a function from the code you have all been using so it can be called from any file then theres only functions.php to change anytime u add something new.
Updated with star and warned icon!

In functions.php add... note to change to match your current classes

:)





more examples login block....

function class_user($name)

{

global $site_config;

$a ="SELECT class, donated, warned FROM `users` WHERE username ='".$name."'";

$res = mysql_query($a);

$classy = @mysql_fetch_row($res);

switch ($classy[0]) {

case 8: // SYS:

$col = "#15CFCD";

break;

case 7: // ADMINISTRATORSYS:

$col = "#ff0000";

break;

case 6: // Administrator

$col = "teal";

break;

case 5: // Super Moderator

$col = "#3300CC";

break;

case 4: // Moderator

$col = "#006600";

break;

case 3: // VIP

$col = "#FFFF00";

break;

case 2: // Uploader

$col = "#33FF33";

break;

default: // User

$name = $name;

}

if ($classy[1]>0){

$star="<img src='".$site_config[SITEURL]."/images/star.gif' alt='donated' border='0'>";

}else{

$star="";

}

if($classy[2]=="yes"){

$warn="<img src='".$site_config[SITEURL]."/images/warn.gif' alt='warned' border=0>";

}else{

$warn="";

}



return unesc("<font color='".$col."'>".$name."".$star."".$warn."</font>");

 

}
Now all you need to do is for any "username" code for example  $row['user'] in shoutbox would now be




'.class_user($row['user']).'





or





".class_user($row['user'])."







depending on whether ' or " starts the echo or print

begin_block("".class_user($CURUSER[username])."");







torrenttable....





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





in function,php where to add all these lines of user class colors
"XIII, post: 76872":
yes each page has queries some u may need to add more queries to get what u need, but say on account details.php you could do this....


if ($user["donated"] > 0) 

print('<img src="images/star.png" alt="" title=""/>');
on pages where its about them self like login block use




if ($CURUSER["donated"] > 0)

  print('<img src="images/star.png" alt="" title=""/>');



i try these and it works but the problem is that its only works at Members list,users torrent page where a list of user torrent visible but i need something change which is in pic look at pic

[url="http://www.pix2links.com/?v=TLGb.jpg"]http://www.pix2links.com/?v=TLGb.jpg[/url]

so i want to make a option for staff to make vip so it show at torrent page and comment section a little vip image.gif and also want to make a option for budge so if staff want to gave that budge to any member it will show at torrent page but not at comment section so can you pls help me how to do this??

Thanks

Regards

Blaz
"XIII, post: 76872":
yes each page has queries some u may need to add more queries to get what u need, but say on account details.php you could do this....


if ($user["donated"] > 0) 

print('<img src="images/star.png" alt="" title=""/>');
on pages where its about them self like login block use




if ($CURUSER["donated"] > 0)

  print('<img src="images/star.png" alt="" title=""/>');




Thanks for quick reply let me try this and if works i post here again Thanks for help
Hellow thair; first thanks you very much for gr8 script, i need little help as i didnt find about that so thats why i post here, i want to know that is it possible to add icons/budge near member name on torrent page and also want to know that how i put little gif image on Vip Members so it show on his torrent uploded page, comments and members account page pls help me to make little more fun for members

Thanks

Regards

Blaz
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728