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

Not heard of this before so i had a quick look

Looks like it's based on windows, using xaml and has a extension for vscode.
So I assume it's for localhost and then you build up, looking at documentation it looks like a big task, but someone may have experience with it
Do you wish to use this for a specific reason
another small fix for upload page for bootstrap the bbcodehelper.php has been updated  :D pics of small & medium screens
for the text bar on torrentupload.php find print ("<tr><td align='right'>" . T_("TORRENT_NAME") . ": </td><td align='left'><input type='text' name='name' size='60'
change 60 to 40 and that now seems to all line up


[ATTACH alt="Untitledmedium.png"]5562[/ATTACH][ATTACH alt="Untitledmobile.png"]5563[/ATTACH]
A white page could help, put this in functions.php at top under <?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

This is for testing and should be removed after or changed to

ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
// error_reporting(E_ALL);

This should make the error show on white page

You can also try look at cpanel
You host control panel where you edit files on server it should have a search bar type in error and see if anything comes up
exceptions are tricky and pdo should have a simple method instead of try & catch everywhere thats why i use this its got backtrace function easy to understand and very detailed

quick fix for usercp https://github.com/M-jay84/Torrent-Trader-MVC-PDO-OOP/commit/8bcebcf136e9df6bb0baa0b517f329fb9bfaebf2

The shoutbox css has been added to custom.css and the shoutbox php has been updated

for all fixes download from master
customstyle.css
usercp.php
shoutbox.php
english.php (line 688 $LANG["HTML_NOT_ALLOWED"] = "(HTML is not allowed.)";)

just testing hitnrun at minute then that will be added its got switch in config until then vip & hnr will not work in seedbonus the option is there for admin but it is still been fine tuned :p
Long Load time — 2020-05-25 21:42:51 in M-BiTsy Support
I'm on shared hosting
the last error looks like error reporting is still on
top of  init.php add
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
//error_reporting(E_ALL);

for the nfo try download the theme and see if the error still happens the theme is changing often, theme is getting there but now the shoutbox displays funny lol
out of curiosity have you tried another browser i cant see this error
Seed Bonus [TTv3] — 2020-05-24 14:29:02 in v3 Mods Completed
happy to share, surprised i never noticed too lol not been able to test on v3 so this may cause issue
$ts = $row['last_time']; // $row['0'] returned null i use objects though

maybe worth var_dump() to make sure its a int string
Seed Bonus [TTv3] — 2020-05-24 09:16:13 in v3 Mods Completed
noticed a error with this mod when updating

in config we use

$site_config['autoclean_interval'] = 600; // time to cleanup (10 minutes)


we need new config time

$site_config['add_bonus'] = 3600; // time to add bonus (1 hour)


so bonus is not correct its more like this
You recieve X points per 10 minutes the system registers you as a seeder by torrent.

so in mybonus change

floor($site_config['autoclean_interval'] / 10),


to [color=rgb(250, 197, 28)]should be 60 for seconds[/color]


floor($site_config['add_bonus'] / 60),


then we put new condition on cleanup - the auto cleanup 10 minutes the seedbonus 1 hour

// Seedbonus Mod
   $now = gmtime();
   $dobonus = 0;

   $res = SQL_Query_exec("SELECT last_time FROM tasks WHERE task='bonus'");
   while ( $row = mysqli_fetch_object($res) )

   if (!$row) {
       SQL_Query_exec("INSERT INTO tasks (task, last_time) VALUES ('bonus',$now)");
       // write_log("theres was no row silly we need one to start");
   }

   $ts = $row['last_time']; // $row['0'] returned null

   if ($ts + $site_config['add_bonus'] < $now){

   $qry = "SELECT DISTINCT userid as peer, (
   SELECT DISTINCT COUNT( torrent )
   FROM peers
   WHERE seeder = 'yes'  AND userid = peer) AS count
   FROM peers WHERE seeder = 'yes'";

   $res1 = SQL_Query_exec($qry);
   while ( $row = mysqli_fetch_object($res) )
   {
       SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "'");
       SQL_Query_exec("UPDATE tasks SET last_time=$now WHERE task='bonus'");
       // write_log("bonus and task inserted every hour");
   }
   }
   // End


use the writelog function to log cleanups to makes sure its correct
// write_log("bonus and task inserted every hour");
Try
$filecounts = (int)$filecount;
$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, imdb) 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()."', '".$imdb."')");

Your query may be different just change filecount to filecounts
Updating the theme has thrown a few little things out but this is been looked at. There is no style just bootstrap so these little things will be inline css
its just a case of fixing these as we notice them

here is a example - the seedbonus template with no css ( this mod is finished just doing hitnrun )
  <center>
 This page displays the options that you can redeem accumulated points against depending on the share of torrents. <font color=yellow><b><?php echo $data['usersbonus']; ?></font></b>
 </center>
 <br />
 <div class='table-responsive'> <table class='table table-striped'><thead><tr>
     <th>Option</th>
     <th>What is it?</th>
     <th>Points</th>
     <th>Exchange</th>
 </tr></thead>
 <?php foreach ($data['bonus'] as $row): ?>
 <form method="post" action="<?php echo TTURL; ?>/bonus">
 <input type="hidden" name="id" value="<?php echo $row['id']; ?>" />
 <tbody><tr>
     <td><?php echo htmlspecialchars($row['title']); ?></td>
     <td><?php echo htmlspecialchars($row['descr']); ?></td>
     <td><?php echo $row['cost']; ?></td>
     <td><input type="submit" value="Exchange"></td>
 </tr></tbody>
 </form>
 <?php endforeach; ?>
 </table>
 <ul>
    <li>You recieve <font color=red><?php echo $data['configbonuspertime']; ?></font> points per <?php echo $data['configautoclean_interval']; ?> minutes the system registers you as a seeder by torrent.</li>
 </ul>
 <ul>
    <li><a href=<?php echo TTURL; ?>/usercp>Return to profile</a></li>
 </ul>
 </div>
— 2020-05-23 07:20:26 in
https://bootstrap.build/app if anyone wants to build a theme you can custom this page and export the sass/css
i recommend exporting both, it allows importing sass which i discovered after i downloaded in css lol
This is a good way to learn or if your experienced give me a hand  ?

you export and do one of the following
custom.css to replace custom.css
custom.sass to replace custom.css (change link in header)
bootstrap.min to replace bootstrap.min.css

no additional files just like for like see images for before and after
yes this is a prepared statement all values are escaped as there are used with place holders ? or you can use :var

the way you use pdo is through a connection
connect->prepare->bind->execute    this is perfectly fine and is the common way

its used this way because people wrap pdo with a class like the old TT mysql where you have a count function (rowCount) a query function (prepare) a insert function all sorts of functions to do what pdo does any way.
this can be a pain because its harder to write i think its easier just to chain everything and keep it simple this was a life saver when updating

Now knowing the above we write one simple function that is the same for everything so we have a pdo wrapper but it just says the way id like to format my queries passing them as arguments
    public function run($sql, $args = NULL)
   {
       if (!$args)
       {
           return $this->pdo->query($sql);
       }
       $stmt = $this->pdo->prepare($sql);
       $stmt->execute($args);
       return $stmt;
   }


i do not use prepare, excecute anywhere in my code except this function
from this excellent guide https://phpdelusions.net/pdo/pdo_wrapper

ill remove this in few days cause codes off topic but heres the seedbonus with this class ichavent used prepared statements yet

$userid   = $CURUSER['id'];
$tid      = $_POST["torrentid"];
$uid      = $CURUSER["class"] == "1" ? (int) $_POST["userid"] : (int) $CURUSER["id"];
$retrieve = DB::run("SELECT * FROM bonus");
$usertable = DB::run("SELECT * FROM users");
if (is_valid_id($_POST['id'])) {
   if (!$row || $CURUSER['seedbonus'] < $row->cost) {
       autolink("bonus.php", "Demand not valid.");
   }
   $updateuser = DB::run("UPDATE users SET seedbonus = seedbonus - '$row->cost' WHERE id = $userid");
   $row = $retrieve->fetch(PDO::FETCH_OBJ);
   switch ($row->type) {
       case 'invite':
           DB::run("UPDATE users SET invites = invites + '$row->value' WHERE id = $userid");
           break;
       case 'traffic':
           DB::run("UPDATE users SET uploaded = uploaded + '$row->value'  WHERE id = $userid");
           break;
       case 'HnR':
           if (empty($tid))
               autolink("bonus.php", "You must fill the box with the id of the torrent.");
           if (isset($uid) && isset($tid)) {
               $res = DB::run("SELECT * FROM snatched WHERE tid = $userid AND uid = $uid AND hnr = 'yes'");
               if ($res->rowCount() < 0)
                   autolink("mybonus.php", "No HnR found with this information.");
               $res1 = DB::run("SELECT username, class FROM users WHERE id = $uid");
               $row1 = $res1->fetch(PDO::FETCH_OBJ);
               $res2 = DB::run("SELECT name FROM torrents WHERE id = $tid");
               $row2           = $res2->fetch(PDO::FETCH_OBJ);
               $username       = htmlspecialchars($row1->username);
               $torname        = htmlspecialchars($row2->name);
               $new_modcomment = gmdate("M d Y H:i:s") . " - ";
               if ($uid == $CURUSER["id"])
                   $new_modcomment .= "H&R on the torrent " . htmlspecialchars($row2->name) . " cleared against " . $row->cost . " points \n";
               else
                   $new_modcomment .= "H&R on the torrent " . $row2->name . " cleared by " . $row1->username . " \n";
               $modcom = sqlesc($new_modcomment);
               DB::run("UPDATE users SET modcomment = CONCAT($modcom,modcomment) WHERE id = :uid");
               DB::run("UPDATE snatched SET ltime = '129600', hnr = 'no' WHERE tid = $userid AND uid = $uid");
           }
break;
       case 'other':
           break;
       case 'VIP':
           $days     = $row->value;
           $class    = $row1->class;
           $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"];
           $stmt->prepare("UPDATE users SET class = $class, oldclass = $oldclass, vipuntil = $vipuntil WHERE id = $userid");
           break;
}
}
while ($row = $retrieve->fetch(PDO::FETCH_OBJ)) {
   echo '<class="card">';
   echo '<form method="post" action="/bonus.php">';
   echo '<input type="hidden" name="id" value="' . $row->id . '" />';
   echo '<div class="card-action ng-scope" style="font-size:22px">';
   echo "<span style=\"font-size:27px;font-weight:400;padding: 7px 5px 5px 10px;border-radius:7px;background:#C0C0C0;text-align:center;color:#FFF;box-shadow: inset 1px 5px 7px -6px #000000;margin-right:15px\">" . str_replace('Uploaded', '', $row->title) . "</span>";
   echo $row->descr;
   $disabled = '';
   $inputmsg = 'Exchange';
   if ($CURUSER['seedbonus'] < $row->cost) {
       $inputmsg = 'Not Enough';
       $disabled = 'disabled';
   }
   echo '<span>';
   echo "<button class=\"btn btn-danger\" onclick=\"this.form.submit();\" style=\"font-size:15px\" $disabled>$inputmsg</button></span>";
   echo '</div></form></article>';
}
?>
<div>
You receive
<?php echo $site_config['bonuspertime']; ?>
points per
<?php echo floor($site_config['autoclean_interval'] / 10); ?>
minutes the system registers you as a seeder by torrent.
</div>


To make prepared
$updateuser = DB::run("UPDATE users SET seedbonus = seedbonus - '$row->cost' WHERE id = $userid");
To
$updateuser = DB::run("UPDATE users SET seedbonus = seedbonus - '$row->cost' WHERE id = ?", [$userid]);
it seems to be when there is no image :unsure: found a quick fix - not sure why that stopped working lol ill see how that goes

controllers/torrentsupload.php find
    }else{
       $anon = "no";
   }


replace query below
 $inames = '';
$filecounts = (int)$filecount;
   $ret = DB::run("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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
   [$fname, $CURUSER['id'], $name, $descr, $inames[0], $inames[1], $catid, get_date_time(), $infohash, $torrentsize, $filecounts, $fname, $announce, $external, $nfo, $langid, $anon, get_date_time()]);
nice  (y) seedbonus has been on my todo list so ill follow post :D

on v3 i had it linked to everything lol comments, upload, posts, hitnrun, vip - all through config ill start digging all little bits out

trying to pick out all the whiles and replace with foreach to update code heres one in cleanup for seedbonus
// Seedbonus
$res = DB::run("SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes'  AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'")->fetch();

foreach ( $res as $row )
{
DB::run("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "'");
}
Enchanced Requests — 2020-05-20 17:21:40 in v3 Mods Completed
php tags may need to be different try change this part of code above for index or post your index

///////LATEST REQUESTS//////
if ($site_config['REQUESTSON']){
begin_frame("Latest Requests");
?>
<?php
$categ = (int)$_GET["category"];


with
///////LATEST REQUESTS//////
if ($site_config['REQUESTSON']){
begin_frame("Latest Requests");
$categ = (int)$_GET["category"];


if that does not do it this part might be causing it so you can try switch it about
?>
</td><td width=100% align=right valign=bottom>
<?


[color=rgb(247, 218, 100)]?> OR TRY <?php[/color]
</td><td width=100% align=right valign=bottom>
[color=rgb(247, 218, 100)]?> OR TRY <?php[/color]
slot peer class — 2020-05-20 17:01:05 in v3 Mods in Progress
its in mods in progress so i believe this is the full mod it can be moved to complete if the edits have worked
Nice mod m8, some would advise to escape but at a glance I dont think its necessary.
You should be able to trust the bots input it's just collecting data from cleanup
slot peer class — 2020-05-13 05:57:13 in v3 Mods in Progress
Does not look like it needs a lot just sqli

In announce it's this line

$query = @mysqli_fetch_row(@SQL_Query_exec("SELECT COUNT(DISTINCT torrent) FROM `peers` WHERE `userid` = '$userid' AND `seeder`='no'"));

$queries = SQL_Query_exec("SELECT `maxslots` FROM `groups` WHERE `group_id` = $user[class]");
$row = mysqli_fetch_array($queries);

In login block this line

@mysqli_fetch_row(@SQL_Query_exec("SELECT COUNT(DISTINCT torrent) FROM peers WHERE userid = $CURUSER[id] AND seeder='no'"));
   $slots = number_format($CURUSER["maxslots"])
Long Load time — 2020-05-12 15:18:13 in M-BiTsy Support
On quick google page test, the test site scores high with 97%, looking deeper with devtools theres a few improvements that could be made where it scored 70% these only little things like image sizing, loading

Just thought its mvc so all pages are index so everything is loaded the same I'll look at the home  controller and see if I can narrow it down its worth finding in case its query or something,  the forum is about same as index as well that's pretty congested though

If your using default theme from github in header you can edit out the old theme.css it's got a comment there it's not really needed see if that helps I just kept it there till I finish the custom.css off you need to clear cache to see my difference
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