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

you using gmail or local?

and common sense lol change email@website to well your email you want to rec the emails at:)

edit: to me i would rather change

$contact_email = ('Write your <b>contact_email</b> in <b>contact.php</b>'); # Email address at to be receive messages
to
$contact_email = $site_config['SITEEMAIL']; # Email address at to be receive messages


and add an little logging to it lol but oh well!
.. something tells me this will error out really..

$insertusers = mysql_query("INSERT INTO punbb_users (id, group_id, username, realname, password, email, registration_ip) SELECT id, username, username, password, email, ip, class FROM `users`") or die(mysql_error());



i dont use it but this looks like it might work..



$insertusers = mysql_query("INSERT INTO punbb_users (id, group_id, username, realname, password, email, registration_ip) SELECT id, class, username, username, password, email, ip FROM `users`") or die(mysql_error());
you might have free leech turned on and you prob give 2GB free to new users or something lol.. Or they might have people that never downloaded an thing and you had 2GB free to new users.
well if using under 2.08.. good luck anyway, 256 mb ram is barely enough for the os LOL...

My guess your site lags the most during cleanup aka you have toooooooo many auto scripts running multi db querys at once... oh well have fun!!
ty, i been debating an idea of not having the medals shown on parts of my site.. To me looks kind of spamy LOL if say used in the last 24 display and have like 2k of people in it!!
blah an minor miss calc in the way it gets the medals.. 1st post will updated soon!
This is an Medal system someone requested and an updated class_user function from [url="https://www.torrenttrader.pw/topic/17452-class-colors-function-for-208"]https://www.torrentt...unction-for-208[/url]


1st the sql:

ALTER TABLE `groups` ADD `Color` VARCHAR( 7 ) NOT NULL DEFAULT '#000000' AFTER `level` ;
UPDATE `groups` SET `Color` = '#BD8B00' where group_id = 2;
UPDATE `groups` SET `Color` = '#7FB600' where group_id = 3;
UPDATE `groups` SET `Color` = '#00A49E' where group_id = 4;
UPDATE `groups` SET `Color` = '#007F00' where group_id = 5;
UPDATE `groups` SET `Color` = '#00C000' where group_id = 6;
UPDATE `groups` SET `Color` = '#009AFF' where group_id = 7;


People might ask why move colors into the db... Well it keeps the colors of your site for classes looking the same if you use the new class_user function to display the username instead of having multi color arrays or ifs in different pages just to display the color!

next add the following functions in backend/functions.php
replacing your current class_user function if you have 1
if you dont have an class_user function then add before the very last

?>


function class_user($name)
{
global $site_config;
$a = "SELECT u.class, u.donated, u.warned, g.Color, g.level, u.uploaded, u.downloaded FROM `users` `u` INNER JOIN `groups` `g` ON g.group_id=u.class WHERE username ='" . $name . "'";
// echo "Query a".$a."<br />";
$res = SQL_Query_exec($a);
$classy = @mysql_fetch_array($res);
$gcolor = $classy['Color'];
if ($classy['donated'] > 0) {
$star = "<img src='" . $site_config[SITEURL] . "/images/icons/star.gif' alt='donated' border='0'>";
} else {
$star = "";
}
if ($classy['warned'] == "yes") {
$warn = "<img src='" . $site_config[SITEURL] . "/images/icons/warn.gif' alt='warned' border='0'>";
} else {
$warn = "";
}
$rang = auto_rank_icon($classy['uploaded'], $classy['downloaded'], $classy['level']);
return unesc("<font color='" . $gcolor . "'>" . $name . "" . $star . "" . $warn . "" . $rang . "</font>");
}


Fixed Function Below!!

// Auto Uploader rank function (Author: ArcticWolf)
function auto_rank_icon($uploaded, $downloaded, $level)
{
$tb = 1024 * 1024 * 1024 * 1024;
// Config
$minup0 = .5 * $tb;
$minup1 = 1 * $tb;
$minup2 = 2 * $tb;
$minup3 = 3.5 * $tb;
$minup4 = 5.5 * $tb;
$minup5 = 8 * $tb;
$minup6 = 15 * $tb;
// Config End
$icon1 = "legend_stjarna_brons.png";
$icon2 = "legend_stjarna_silver.png";
$icon3 = "legend_stjarna_guld.png";
$icon4 = "krona_brons.png";
$icon5 = "krona_silver.png";
$icon6 = "krona_guld.png";
$icon7 = "diamant.png";

if ($uploaded >= $minup6 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon7 . "" alt='$icon7' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup5 && $uploaded < $minup6 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon6 . "" alt='$icon6' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup4 && $uploaded < $minup5 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon5 . "" alt='$icon5' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup3 && $uploaded < $minup4 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon4 . "" alt='$icon4' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup2 && $uploaded < $minup3 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon3 . "" alt='$icon3' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup1 && $uploaded < $minup2 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon2 . "" alt='$icon2' border=\"0\"/>";
       return $uprankr;
} elseif ($uploaded >= $minup0 && $uploaded >= $downloaded) {
   $uprankr = "<img src='/images/icons/' . $icon1 . "" alt='$icon1' border=\"0\"/>";
       return $uprankr;
}
       return "";
}







then upload the files in the attached zip to your site into images with dir!!!!!!
[url="http://51.15.8.36/applications/core/interface/file/attachment.php?id=6479"]icons.zip[/url]

Now here comes the harder part.. displaying it... Basically any place the displays username like

$arr[username]


change to

class_user($arr[username])




like stock shoutbox.php would be change

$row['user']


to

class_user($row['user'])


and blocks/login_block.php
change

$CURUSER["username"]


to

class_user($CURUSER["username"])


Basically like any place in phps that uses

$CURUSER["username"]


change to

class_user($CURUSER["username"])




Spank-D has some others you could change listed
To help with more examples, here are the changes made in forums.php on my tracker:

".class_user($a[username])."
".class_user($arr[username])."
".class_user($arr2[username])."
".class_user($user[username])."
".class_user($lastposter)."
$postername = class_user($arr2["username"]);



there is like dozons others you could change!!! but i am not listing them all here, its not really that hard and learn to test!!!!!

If you really need help changing something post the page in question and someone might help you!!!!

An few of the other places you could change is in account-details, account.php... its not really that hard!!! learn to read, copy/paste and then test you should be OK!!
account-details.php would be change

$user["username"]


to

class_user($user["username"])


account.php would be change

<b><b><?php echo T_("USERNAME"); ?>:</b> <?php echo $CURUSER["username"]; ?><br />


to

<b><?php echo T_("USERNAME"); ?>:</b> <?php echo class_user($CURUSER["username"]); ?><br />


PROOF!!!!


[ATTACH]2066._xfImport[/ATTACH]
reading toooooo hard.. change

invites=$invites, rangclass='$rangclass', WHERE id=$userid");

to

invites=$invites, rangclass='$rangclass' WHERE id=$userid");
its the ram and/or cpu of your current vps...  Its pretty much an fact once you site starts getting bigger with torrents and/or active users you out grow you current system specs.

2.06 is an mem hog anyway!!!!! it uses alot of querys inside other querys causing more load then really needed!

More users and/or torrents you have mean more time it takes to query the database....  /me wonders if his 30,000 users and 90,000 torrents site will run on 128meg of ram!!!!!!
please make 1 for the lazy people!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
i am shocked that code worked at all.. oh well i did not design it, i just modified someone elses code to be 2.08 able..

anyway this block seems to be ok from what i can tell on my dev site.... I dont have 2300000000000000000000000000000 users on it so what ever:)

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6462"]donate_block.php[/url]

I been using an modified version of it for years on my main site so must do something!!!
something like that..

if want to use not stock classes prob be simpler to use this attached file then change 2 things!!!!





// Config

$vip_class = 3; // Change this to well your vip class...

$pu_class = 2; // Change this to well your power user class!!!!

// Config End


NEW File: [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6459"]paypal.php[/url]
if you changed the classes at all from stock then you need to modify paypal.php and the cleanup part to match!!!! common sense!!!!  Not sure why someone would have VIP above uploader LOL!!!!!!!!!
ad-block for firefox or chrome works well too:)
not 100% sure, some people might need it LOL, it looks like the stock sql from 2.08 but again not everyone that uses 2.08+ addons runs 2.08 LOL!!!
thats not good.. another reason I will never put ads on my site.. yes you might control what you put in the php but you have no control over what the remote site having the ad displays on your site..
You really should use something like this instead if want to redirect back to what ever page the person tried to visit...



if ($site_config["MEMBERSONLY"] && !$CURUSER) {

loggedinonly();

}


after stdhead(T_("HOME"));

in index.php
i dont see any ads anyplace now EVER thanks to the flash ad virus i got from someone elses site!!!!, flash, ads must shit is blocked default...
Ghrafic secction — 2013-01-08 20:44:43 in General Chat
we do have 1.. its called themes!!!
anyway.. you should not be bumping an topic just cause cant wait for someone to respond!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Someone said how to do it in another page but again would req reading...............................





 <?php if($CURUSER){?>

 <div id='navbar'>

   <div class='myTable' id='menu'>

     <div class='myTrow'>

       <ul class='jCrumbs myTcell' id='jCrumbs'>

         <li class='home'><a href='index.php' title='Home' class='top-link current'><span>Home</span></a></li>

         <li class='forums'><a href='forums.php' title='Forums' class='top-link'><span>Forums</span></a></li>

         <li class='torrents'><a href='#' title='Torrents' class='top-link'><span>Torrents</span></a>

           <ul style='visibility: hidden; display: block;'>

             <li><a href='torrents-upload.php' title='Upload'>Upload Torrent</a></li>

             <li><a href='torrents.php' title='Browse'>Browse Torrents</a></li>

             <li><a href='torrents-today.php' title='Todays'>Today's Torrents</a></li>

             <li><a href='torrents-search.php' title='Search'>Search Torrents</a></li>

             <li><a href='torrents-needseed.php' title='Need Seed'>Torrents Needing Seeds</a></li>

           </ul>

         </li>

         <li class='faq'><a href='faq.php' title='FAQ' class='top-link'><span>FAQ</span></a></li>

       </ul>

     </div>

   </div>

 </div>

<?php }?>


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