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

Error come — 2021-11-03 21:52:13 in v3 Support
did this error appear recently ?

do you get same error with news comments - check if this is correct link when updating, so we know where to look
comments.php?type=torrent&edit=1

check admincp logs - does it say spirtblue has edited comment: ID:xx two times

has sql version or mod been added that could effect it

Seed Bonus [TTv3] — 2021-10-31 18:36:37 in v3 Mods Completed
edit seedbonus in account details https://torrenttrader.uk/topic?topicid=10359&page=p#post70649

admin modtasks.php
Find
$email = $_POST["email"];


Add below
$seedbonus = $_POST["seedbonus"];


Then in this line
SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', signature=$signature, avatar=$avatar, ip=$ip, donated=$donated, forumbanned=$forumbanned, warned=$warned, modcomment=$modcomment, enabled=$enabled, invites=$invites WHERE id=$userid");


Add before WHERE
, seedbonus=$seedbonus


in account-details.php find
print("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");


add below
print("<tr><td>Seed Bonus</td><td align='left'><input type='text' size='4' name='seedbonus' value='".$user["seedbonus"]."' /></td></tr>\n");

Strange torrents problem — 2021-10-31 16:44:24 in v3 Support
yes micromonkey is correct &hit=1 should always be used - i am going through my code adding it. its missing in the most active torrents block for example - everything should be &hit=1 except on torrents-details and maybe not comments.

can not understand why its not redirecting - leaving the die uncommented will work it will just add another view if page is refreshed but for curiosity  

cut and remove
   if ($_GET["hit"]) {
      SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");

      header("Location: torrents-details.php?id=$id");
      die;
  }


add it below
$id = (int) $_GET["id"];


so
$id = (int) $_GET["id"];
  if ($_GET["hit"]) {
      SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");

      header("Location: torrents-details.php?id=$id");
      die;
  }
seed bonus — 2021-10-31 12:01:47 in v3 Support
You can try this In admin modtasks.php
Find
$email = $_POST["email"];


Add below
$seedbonus = $_POST["seedbonus"];


Then in this line
SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', signature=$signature, avatar=$avatar, ip=$ip, donated=$donated, forumbanned=$forumbanned, warned=$warned, modcomment=$modcomment, enabled=$enabled, invites=$invites WHERE id=$userid");


Add before where - I assume column in user dbtable is seedbonus
, seedbonus=$seedbonus


This looks like it's missing in the v3 mod post
Strange torrents problem — 2021-10-31 06:08:14 in v3 Support
had another look at this and the $curuser does not make sense. If $curuser  - hit - blah blah - die() when you use die it stops the script so the trackerviews code wont work not sure why its not redirecting though odd  :zpo
//torrent is availiable so do some stuff
if ($CURUSER) {
   if ($_GET["hit"]) {
       SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");

       header("Location: torrents-details.php?id=$id");
       die;
   }
/////////////////// //=== BigMax ===//
   $query = (mysqli_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `trackerviews` WHERE `viewer` = " . $CURUSER["id"] . " AND `subject` = '$id' AND `type` = 'torrent'")));
   if ($query[0] == 0) {
       SQL_Query_exec("INSERT INTO `trackerviews` (`subject`, `viewer`, `count`, `type`)
VALUES (" . $id . ", " . $CURUSER["id"] . ", '1', 'torrent')");
   } else {
       SQL_Query_exec("UPDATE `trackerviews` SET `count` = `count` + '1' WHERE `subject` = '$id' AND `viewer` = " . $CURUSER["id"] . " AND `type` = 'torrent'");
   }
///////////////////
}


you need to move hit above $curuser
    if ($_GET["hit"]) {
       SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");

       header("Location: torrents-details.php?id=$id");
       die;
   }
if ($CURUSER) {


ps - i noticed die should have die(); not sure that would make a difference though
Strange torrents problem — 2021-10-30 19:08:08 in v3 Support
Seems to work if &hit=1 is removed that will be in torrenttable function

I'll have to look at this I don't really know where hit is, I think it is for the download url eg when you download it adds 1 hit but I might be wrong

update
had a look at hit and its used in download for torrent hit column
SQL_Query_exec("UPDATE torrents SET hits = hits + 1 WHERE id = $id");

&
it should be used on all torrent-details links for torrents views column
if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
}


post your torrent-details page - your torrent-details page does not seem to be redirected with the code above
this is what i have and it seems to work on my version

	$announce = $TorrentInfo[0];
$infohash = $TorrentInfo[1];
$creationdate = $TorrentInfo[2];
$internalname = $TorrentInfo[3];
$torrentsize = $TorrentInfo[4];
$filecount = $TorrentInfo[5];
$annlist = $TorrentInfo[6];
$comment = $TorrentInfo[7];
$filelist = $TorrentInfo[8];


then further down find
            if ($anonyupload == "yes") {
               $anon = "yes";
           } else {
               $anon = "no";
           }


below add filecounts as int
            $filecounts = (int) $filecount;


now in the insert query just below find $filecount var and change to
$filecounts


so like this for v3 but do not use this because your code will be modded

$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecounts."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."')");
Testing Announce — 2021-10-19 15:31:58 in M-BiTsy Support
thanks guys the test have been very helpful the announce stills need some fine tuning but i am getting there  :zpo

one thing i noticed with the announce is if you download twice you get a error on the complete event because of the database keys, the torrent and id can only be added once so heres a fix for that query just add duplicate not sure if quotes are needed on v3
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."') ON DUPLICATE KEY UPDATE date = ".get_date_time()."");


thanks to the tests the snatched and hit and run mods are working great and all of the little bits like cleanup and completed etc are all finished just this god damn announce so so close - ill work on announce and try test at end of week
Testing Announce — 2021-10-17 06:40:34 in M-BiTsy Support
Hi guys looking to test some stuff ive been working on, on the torrent side.

I have added two torrents - both episodes of the flash - if you can download would be very appreciated there is a few pages that are all connected and i want to check how clients work with them. Some areas of the torrents - search, top 10 etc will be shown for a week while i test and members are welcome to look around and make suggestions or report anything.

firstly the announce you should be using utf8mb4 on database but this caused errors with inputting  client peer_id so that is now hex2bin then we return a 40 character string, this caused some confusion because the torrent specification says 20 but its 20 bytes not characters so a 40 character length binary string is 20 bytes

ive got a announce which ill update for v3 so people who are interested can play around with it there is not much detail online on how the bittorrent specification works so ive added loads of comments here is example client $_GET response (i added a debug function for announce :glasses)
{"info_hash":"ba82ce499378a34841d707b1618daba9b03689d8","peer_id":"2d7142343335302d5a325a47345f6a29624c5157","port":"51492","uploaded":"0","downloaded":"0","left":"0","event":"stopped","no_peer_id":"1","compact":"1","numwant":"0","corrupt":"0","key":"9F15FCC2","ip":"66.28.208.92"}


ive also been working on the snatched mod - which includes hit and run so if you download please once completed - delete torrent from client and torrent folder - i will be resetting bits, logging and testing all week so download again another day if possible.
the cleanup, announce, hitnrun, snatch, torrentscompleted are all interlinked so the more test the better

you can see the test torrents here https://torrenttrader.uk/search and you can post here any findings here . After this week members will not be able to see torrent side once test are complete

thank you
vip access — 2021-10-17 05:27:37 in v3 Support
happy to help - puzzles are fun  :grin

im not sure how your mod works but i still think putting in config is best solution, you can also use in download.php

config.php
$site_config['vip_cats'] = array('22', '28');


then replace in torrentdetails now we added torrents.category, to query
$mycats = $site_config['vip_cats'];
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
    autolink('index.php', 'Error For VIP');
}


in download.php add  torrents.category, to query
$res = SQL_Query_exec("SELECT torrents.category, filename, banned, external, announce FROM torrents WHERE id =".intval($id));
$row = mysqli_fetch_assoc($res)


then below
$mycats = $site_config['vip_cats'];
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
    autolink('index.php', 'Error For VIP');
}
vip access — 2021-10-16 18:20:14 in v3 Support
cat_parent is the name the id doesn't seem to be in the query return

got it

in the torrent details
find
$res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
$row = mysqli_fetch_assoc($res);


replace with  = add category to front of $res
$res = SQL_Query_exec("SELECT  torrents.category, torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
$row = mysqli_fetch_assoc($res);


then under add
		$mycats = array(22, 28);
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
     autolink('index.php', 'Error For VIP');
}
vip access — 2021-10-16 15:48:32 in v3 Support
Forgot to add categorie row
Updated post see of it works now
vip access — 2021-10-16 15:15:01 in v3 Support
could also be in config.php  :unsure  

$site_config['vip_cats] = array(22, 28);


so it would look like
$mycats = $site_config['vip_cats'];
vip access — 2021-10-16 15:11:07 in v3 Support
try this it will save you time writing for each cat id  :thumb

$mycats = array(22, 28);
if ($CURUSER['class'] <3 && in_array($row['category'], $mycats)) {
      autolink('index.php', 'Error For VIP');
}
Try on the if

if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {


The code needs to be below the $row =
signup error — 2021-10-06 06:26:22 in v3 Support
there are two ways

1) the EASY set the sql mode in phpmyadmin - i link image
if you export db it will say which sql modes are set at top of sql file

first you can check sql mode and make a note of the result
SHOW VARIABLES LIKE 'sql_mode';


then you can set with allowed invalid dates included
SET sql_mode='ALLOW_INVALID_DATES';




2) the BEST fix database error - everyone should do this sql mode should always be empty

first make 2 sql backups call one master and put somewhere save (just in case)
the other backup make these edits in editor

in backup.sql (make mass edits exactly as below)
search
datetime NOT NULL DEFAULT '0000-00-00 00:00:00'

replace with
datetime DEFAULT NULL


search
'0000-00-00 00:00:00'

replace with
NULL
Try get_row_count
Find
$fn = "$torrent_dir/$id.torrent";


Under add
$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");
if ($commented == 0) {      // or try if (!$commented ) {  
   show_error_msg("Error", "You must add a comment before download.",1);
}


See if that works then we can add if owner
SQL Error — 2021-10-03 17:07:46 in v3 Support
Just added this to my version to help identify sql mode issues tried converting for v3

First in check.php find
$r = mysqli_query($link, "SHOW TABLES");


Above add
$stmt = mysqli_query($link, "SHOW VARIABLES LIKE 'sql_mode'")->fetch_row();
   if (!$stmt) {
       echo "<font color='#ff0000'><b>Error Getting SQL Mode:</b></font><br><br>";
   } else {
echo "<font color='#00cc00'><b>SQL Mode:</b></font><br>";
       echo var_dump($stmt[1])."<br><br>";
}


Then on sql file set the sql mode at the very top
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


I'm sure v3 needs zero dates as well if anyone uses the check code please post what sql modes are enabled
Replace thisEach function — 2021-10-02 16:00:32 in v3 Support
Try this replace
list(, $val) = thisEach($this->params);

With
 $val = current($this->params);
next($this->params);
Think I found a way to hyperlink to direct forum post testing here with the littler anchor icon in each post

This should point to post not topic or lastpost
https://torrenttrader.uk/topic?topicid=10061&page=p#post70320
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