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

Daily Login Bonus — 2022-07-29 15:19:21 in v3 Mods Completed
find
  $ddel = SQL_Query_exec("DELETE FROM dailys WHERE userid='$userid'");
 $dup = SQL_Query_exec("UPDATE users SET daily='no' WHERE id='$userid'");


below add
$msg_shout = "daily login to ".$CURUSER["username"]." ";
SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(".$userid.", NOW(), ".$CURUSER["username"]." ,".$msg_shout.")");


that should work if i read the code correct.
Error sql — 2022-07-28 16:38:03 in v3 Support
Database Error in announce.php on line 303: Unknown column '2896' in 'where clause'. Query was: UPDATE `users` SET `uploaded` = `uploaded` + `327680`, `downloaded` = `downloaded` + `0` WHERE id=`2896`.


This query looks fine, it's just not recognising ID value you could always try to escape

id=".sqlesc($userid)."
ratio moves more — 2022-07-12 18:03:08 in v3 Support
strange
if it was sql you should get error in admincp log
have you updated utorrent or the announce code recently

have you changed server or vpn recently - in case its port issue
ratio moves more — 2022-07-10 05:29:52 in v3 Support
this is for ratio in announce - maybe you made change and only just notice
debugging announce is at times tricky - might be worth posting your section of code from announce

================================================================

c'est pour le rapport dans l'annonce - peut-être que vous avez fait des changements et que vous remarquez juste
le débogage de l'annonce est parfois délicat - cela vaut peut-être la peine de publier votre section de code à partir de l'annonce

    $upthis = max(0, $uploaded - $self["uploaded"]);
   $downthis = max(0, $downloaded - $self["downloaded"]);

   if (($upthis > 0 || $downthis > 0) && is_valid_id($userid)){ // LIVE STATS!)
if ($torrent["freeleech"] == 1){
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
}else{
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
}
   }
I added  error to the parse.php because i don't allow hybrid but this will show error to user on upload might be worth adding to v3

$info = $array["info"];
       if (isset($info["file tree"])) {
           autolink('upload.php', 'We do not allow hybrid or v2 torrents check your clients create torrent settings');
       }


I just think admins will get loads of members asking about this parsing error because it only throws that general error, I only know from experience of updating to v2.
This should of been done early like you say when torrinting was more popular- but now qbit is not plug and download you have to check setting, next utorrent which seems simple but you will have to explain to users many times
and for what the only benefit I notice is the hash, a bit more secure and won't duplicate as much but I've never had duplicate hash error unless it's the same torrent of course
looks great im having same issue of not seeing the bell also missing - on one of the lines
$read > execute();
go to create torrent on qibittorrent is it set to v2 torrents, it must be v1 for torrent trader
vip — 2022-06-18 05:09:51 in v3 Mods Requests
thanks for offer mate and ill keep you posted still tinkering about with db a little while im trying to slim code code down. The install/migration should be easy to write but size could be a issue going through some steps may be best lets say for peers table, users table etc then if theres a exception you could roll back transaction.

Lets look at a popular cms that is as old as TT and has been extended & extended phpbb (what a mess)  https://github.com/phpbb/phpbb-app
Thats what happens when you keep patching cracks and forum side its not that advanced but people like what there know.

I dont use any  3rd party stuff which holds me back a little but this is so its drop on server and run but we dont hear much about server side improvements ngix, opcache and again thats just because its unfamiliar to people.
vip — 2022-06-17 19:38:27 in v3 Mods Requests
earliest source i have is 2006 for v2 (this is 2007 https://sourceforge.net/projects/torrenttrader/) so pretty old and v1 is older and pretty much the same in a lot of ways. Its just been extended and extended and you see this with the code and the mods everything is interlinked when its not needed - nowadays there's much simpler methods.

Some of the most popular trackers are on old procedural code and getting updated to php8 is easier enough so i don't think people would be that eager to update and lose their hard work and v3 works very well.

Thats why i renamed mine because its total different now every line has been re written but migration from any version or other tracker should be easy enough

vip — 2022-06-14 14:46:09 in v3 Mods Requests
I can't test v3 but the steps I would follow are

Go to phpmyadmin change user vipuntil to today and give that user enough bonus for vip until

Then on bonus page select vip option

Go back to phpmyadmin and check the users vipuntil date

This will give you idea if it's the bonus code or the cleanup code
i would go down a oop way and put any changes in a class

(notice i use self:: in last function)
<?php

class U2
{

   // Default Header
   public static function header($title = "")
   {
       if (!isset($_SESSION['loggedin'])) {
           Guests::guestadd();
       }
       if ($title == "") {
           $title = Config::get('SITENAME');
       } else {
           $title = Config::get('SITENAME') . " : " . htmlspecialchars($title);
       }
       require_once "assets/themes/" . (Users::get('stylesheet') ?: Config::get('DEFAULTTHEME')) . "/header.php";
   }
   
   // Default Footer
   public static function footer()
   {
       require_once "assets/themes/" . (Users::get('stylesheet') ?: Config::get('DEFAULTTHEME')) . "/footer.php";
   }
   
   // Default Block Header
   public static function begin($caption = "-")
   {
       $blockId = 'f-' . sha1($caption);
       ?>
       <div class="card">
           <div class="card-header text-center frame-header">
               <?php echo $caption ?>
               <a data-toggle="collapse" href="#" class="showHide" id="<?php echo $blockId; ?>" style="float: right;"></a>
           </div>
           <div class="card-body frame-body slidingDiv<?php echo $blockId; ?>">
       <?php
   }
   
   // Default Block Footer
   public static function end()
   {
       ?>
           </div>
       </div>
       <div class="block-footer"></div>
       <?php
   }

   public static function render($file, $data = [], $page = false)
   {
       // Start With No Error
       $error = 0;

       // Debug
       $GLOBALS['debugviewdata'] = debugviewdata($data);

       if ($page == 'utorrents') {
           // Does User View Exist
           if (file_exists('../app/views/user/' . $file . '.php')) {
               self::header($data['title']);
               self::begin($data['title']);
               require_once "../app/views/user/" . $file . ".php";
               self::end();
               self::footer();
               return;
           } else {
               $error = 1;
           }
       }

       // The View Isnt There !
       if ($error === 1) {
           Redirect::autolink(URLROOT, "View $file does not exist");
       }
   }

}


this way on home for example you can use U2::header & in other controllers U2::render('page',$data,'u2torrent);
now lets say you update in a year & only have changed 50% of views - with controllers just mass edit view::render to u2::render and drop your template folder in job done.

or another example of the last function where instead we add condition on url if you have seperate style for login, signup etc
    public static function render($file, $data = [], $page = false)
   {
       // Start With No Error
       $error = 0;

       // Debug
       $GLOBALS['debugviewdata'] = debugviewdata($data);

           // Does User View Exist
$url = $_GET['url'] ?? '';
if ($url == 'signup' || $url == 'recover') {
           if (file_exists('../app/views/u2torrent/' . $file . '.php')) {
               self::signupheader($data['title']);
               self::begin($data['title']);
               require_once "../app/views/u2torrent/" . $file . ".php";
               self::end();
               self::signupfooter();
               return;
           } else {
               $error = 1;
           }
} elseif ($url == 'login') {
           if (file_exists('../app/views/u2torrent/' . $file . '.php')) {
               self::header($data['title']);
               self::loginbegin($data['title']);
               require_once "../app/views/u2torrent/" . $file . ".php";
               self::end();
               self::loginfooter();
               return;
           } else {
               $error = 1;
           }
} else {
           if (file_exists('../app/views/user/' . $file . '.php')) {
               self::header($data['title']);
               self::begin($data['title']);
               require_once "../app/views/user/" . $file . ".php";
               self::end();
               self::footer();
               return;
           } else {
               $error = 1;
           }
}
       }

       // The View Isnt There !
       if ($error === 1) {
           Redirect::autolink(URLROOT, "View $file does not exist");
       }
   

}


the last option it good because if url is not listed you could fall back on default so updating would be put controllers in notepad mass edit View::render('signup/index', $data, 'user'); to U2::render('signup/index', $data, 'user');
in last option i removed         if ($page == 'utorrents') {  so you could keep as 'user' notice the require_once the url should be able to cover all changes

update - lets make it so you only edit one file you could replace the View class with something like this
this means you wouldnt have to change to u2torrents from user View::render('signup/index', $data, 'user');
<?php

class View
{
   
   // Default Header
   public static function u2header($title = "")
   {
       if (!isset($_SESSION['loggedin'])) {
           Guests::guestadd();
       }
       if ($title == "") {
           $title = Config::get('SITENAME');
       } else {
           $title = Config::get('SITENAME') . " : " . htmlspecialchars($title);
       }
       require_once "assets/themes/" . (Users::get('stylesheet') ?: Config::get('DEFAULTTHEME')) . "/header.php";
   }
   
   // Default Footer
   public static function u2footer()
   {
       require_once "assets/themes/" . (Users::get('stylesheet') ?: Config::get('DEFAULTTHEME')) . "/footer.php";
   }
   
   // Default Block Header
   public static function u2begin($caption = "-")
   {
       $blockId = 'f-' . sha1($caption);
       ?>
       <div class="card">
           <div class="card-header text-center frame-header">
               <?php echo $caption ?>
               <a data-toggle="collapse" href="#" class="showHide" id="<?php echo $blockId; ?>" style="float: right;"></a>
           </div>
           <div class="card-body frame-body slidingDiv<?php echo $blockId; ?>">
       <?php
   }
   
   // Default Block Footer
   public static function u2end()
   {
       ?>
           </div>
       </div>
       <div class="block-footer"></div>
       <?php
   }

   // Return View Template
   public static function render($file, $data = [], $page = false)
   {
       // Start With No Error
       $error = 0;

       // Debug
       $GLOBALS['debugviewdata'] = debugviewdata($data);

       if ($page == 'user') {

           // GET URL
           $url = $_GET['url'] ?? '';
           if ($url == 'signup' || $url == 'recover') {
               if (file_exists('../app/views/u2torrent/' . $file . '.php')) {
                   self::u2header($data['title']);
                   self::u2begin($data['title']);
                   require_once "../app/views/u2torrent/" . $file . ".php";
                   self::u2end();
                   self::u2footer();
                   return;
               } else {
                   $error = 1;
               }
           } elseif ($url == 'login') {
               if (file_exists('../app/views/u2torrent/' . $file . '.php')) {
                   self::u2header($data['title']);
                   self::u2begin($data['title']);
                   require_once "../app/views/u2torrent/" . $file . ".php";
                   self::u2end();
                   self::u2footer();
                   return;
               } else {
                   $error = 1;
               }
           } else  {
               if (file_exists('../app/views/user/' . $file . '.php')) {
                   Style::header($data['title']);
                   Style::begin($data['title']);
                   require_once "../app/views/user/" . $file . ".php";
                   Style::end();
                   Style::footer();
                   return;
               } else {
                   $error = 1;
               }
           }

       } elseif ($page == 'admin') {

           // Does Admin View Exist
           if (file_exists('../app/views/admin/' . $file . '.php')) {
               Style::adminheader('Staff Panel');
               Style::adminnavmenu();
               Style::begin($data['title']);
               require_once "../app/views/admin/" . $file . ".php";
               Style::end();
               Style::adminfooter();
               return;
           } else {
               $error = 1;
           }

       } else {

           // Does Requalar View Exist
           if (file_exists('../app/views/user/' . $file . '.php')) {
               require_once "../app/views/user/" . $file . ".php";
               return;
           } else {
               $error = 1;
           }
           
       }
       // The View Isnt There !
       if ($error === 1) {
           Redirect::autolink(URLROOT, "View $file does not exist");
       }
   }

}
vip — 2022-06-11 14:09:13 in v3 Mods Requests
In cleanup should be old class
SQL_Query_exec("UPDATE users SET class ='$oldclass', oldclass='1', vipuntil = '0000-00-00 00:00:00' WHERE vipuntil < $timenow AND vipuntil <> '0000-00-00 00:00:00'");


And I see I may have mistake on my value. Value is days value should be 1
My mistake says 3000 days lol
https://torrenttrader.uk/adminbonus

Or for test in mybonus.php change $days = 1;
vip — 2022-06-11 08:38:42 in v3 Mods Requests
should be
UPDATE users SET class ='1', oldclass='3',


in bonus page we set class vip and old class value
in cleanup we change back if time passed
the controllers need to go in the user folder replacing existing ones

controllers are done automatic by url so need to be in same place . a example of the controller

// Get Data
$sql = array('some sql query');
$id = $_GET['id'];

// Set Data
$data = [
   'id' => $id,
   'sql' => $sql
]

// Send Data
View::render('signup/index', $data, 'u2torrents');


for style everything is in views folder and your view class is set correctly, so two ways
move controllers to user folder or in any controller change View::render to u2torrents View::render('folder/anyview', $data, 'u2torrents');
vip — 2022-06-10 20:17:20 in v3 Mods Requests
86400 seconds is 1 day so for 1 month 30*86400

You need to add vip to select like this is admincp
array('invite', 'traffic'


array('invite', 'traffic','vip'
vip — 2022-06-10 04:30:05 in v3 Mods Requests
this is what i had on v3

in mybonus.php add new case
            case 'VIP':
               $days = $row->value;
               $vipuntil = ( $CURUSER["vipuntil"] > "0000-00-00 00:00:00" ) ? $vipuntil = get_date_time( strtotime( $CURUSER["vipuntil"] ) + ( $days*86400 ) ) : $vipuntil = get_date_time( gmtime() + ( $days*86400 ) );
               $oldclass = ( $CURUSER["vipuntil"] > "0000-00-00 00:00:00" ) ? $oldclass = $CURUSER["oldclass"] : $oldclass = $CURUSER["class"];
               SQL_Query_exec("UPDATE `users` SET `class` = '4', `oldclass`='$oldclass', `vipuntil` = '$vipuntil' WHERE `id` = '$CURUSER[id]'");
               break;


add sql
 ALTER TABLE users  ADD `vipuntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE users  ADD `oldclass` int(10) UNSIGNED NOT NULL DEFAULT '0';


then finally cleanup.php (to demote automatic)
    $timenow = sqlesc(get_date_time());
   $subject = sqlesc("Your VIP class stay has just expired");
   $msg = sqlesc("Your VIP class stay has just expired. \nYour status is back to baseline. \nYou can now redeem crazy bonus points for a new VIP class stay. \nYou can also donate if you wish to obtain a longer stay.\n");
   $resv = SQL_Query_exec("SELECT id, oldclass FROM users WHERE vipuntil < $timenow AND vipuntil <> '0000-00-00 00:00:00'");
if (mysqli_num_rows($resv)){
   $rowv = mysqli_fetch_object($resv);
   $id = $rowv->id;
   $oldclass = $rowv->oldclass;
   SQL_Query_exec("UPDATE users SET class = '.$oldclass.', oldclass='1', vipuntil = '0000-00-00 00:00:00' WHERE vipuntil < $timenow AND vipuntil <> '0000-00-00 00:00:00'");
   SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES(0, '.$id.', $timenow, $subject, $msg, 0)");
}
Announce Class — 2022-05-31 13:57:16 in Downloads & Updates
I always see the debate about speed and overhead and while it matters overall - in regards to classes, using interfaces and functions etc it doesn't matter.

While there is the slightest of increases its so small (tiny fraction of millisecond) you should pick read ability every time it helps you maintaining and others to understand.

Querys and logic that speed matters but how it's delivered not so much.
Announce Class — 2022-05-30 20:03:42 in Downloads & Updates
Just noticed response looks like object announce->bencodeoutput function is echo - shot in dark but might print out Array instead of string

I thought about saving data and torrent files as cache files so you just call the cache which you can delete, update when needed
Blank coment — 2022-05-30 17:43:51 in v3 Support
Happy to help, empty would work but a comment like ? or p would still be inserted if your happy for a comment just with a smiley strlen < 2 would allow that in v3 I believe
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