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

— 2020-07-26 15:56:53 in
Hi everyone, i regret to inform you all that i am putting torrenttrader.xyz up for sale.
i know i could give it to someone but then the site could come and go in a flash, as to the reason why i am selling so i know who ever buy's it as the intention of keeping the site running..

If anyone is interested in purchasing the site then please send me a PM.
Nice mod I'd put welcome message in database then you can edit in admin panel in textvbcode function  (y) you would need to query it then pass it as a var $welcomemessage
that can be halved in pdo  (y) whats on leeching/seeding.php
My Theme in Progress — 2020-07-05 07:51:51 in M-BiTsy Support
for things like this you can remove begin_frame on login controller method so begin_frame(T_("LOGIN"));

becomes
    <div class="card">
       <div class="card-header">
           <?php echo 'Login' ?>
       </div>
       <div class="card-body newcss">


html should not be used in mass functions really but its so simple, any function can be removed on a page and then written in html/css stdhead, footer end_block begin_frame etc
All connections close when script ends on both  (y)
Looking at the code it might be links like
href="/user/?id and a few others which have been altered, open tags has been mentioned
a look at the errors log would help or display on screen if script runs - remember this is for development only

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Dont want to use 3rd party code so Was thinking of just adding a question and answer through config if post answer on login does not match config answer it's a fail
This would keep most bots and spiders out
hard to get motivated at minute but made a start on forums just need some more conditions turn on/off ive also made hide one forum were you can not see replys unless you say thanks to first posts, work in progress but nearly there

the method/page

   // Thanks on forum
   public function forum(){
   dbconn();
   global $site_config, $CURUSER;
   $topicid = (int)$_GET['id'];
   if (!is_valid_id($topicid));
   DB::run("INSERT INTO thanks (user, thanked, added, type) VALUES (?, ?, ?, ?)",[$CURUSER['id'], $topicid, get_date_time(), 'forum']);
   header("Refresh: 3;url=$site_config[SITEURL]/forum/viewtopic&topicid=$topicid");
   show_error_msg("Success", "Thanks you for you forum appreciation.",1);
   }


find in forums
//Get topic posts


add under
/* LIKE MOD */
// this will be site_config['hideforum'] we dont want to block everything
if ($forumid == 1) {
   $res = DB::run("SELECT * FROM forum_posts WHERE topicid=$topicid ORDER BY id LIMIT 1");

   // if its the forum lets see if member has thanked
   $data = DB::run("SELECT user FROM thanks WHERE thanked = ? AND type = ? AND user = ?", [$topicid, 'forum', $CURUSER['id']]);
   $like = $data->fetch(PDO::FETCH_ASSOC);
// like is not there so limit to first post
if (!$like){
   $res = DB::run("SELECT * FROM forum_posts WHERE topicid=$topicid ORDER BY id LIMIT 1");
// like is there so show all
} else {
   $res = DB::run("SELECT * FROM forum_posts WHERE topicid=$topicid ORDER BY id LIMIT $offset,$perpage");
}

// if its not the site_config['hideforum'] display as normal
} else {
   $res = DB::run("SELECT * FROM forum_posts WHERE topicid=$topicid ORDER BY id LIMIT $offset,$perpage");
}



before this line //define buttons and who can use them
    /* LIKE MOD */
   // if not post owner hide replys
   if (!$CURUSER["id"] == $posterid){
       // say thanks
       print ("<a href='$site_config[SITEURL]/likes/forum?id=$topicid'>Say Thanks</a>&nbsp;");
   }


just noticed it could be each post id instead of topic lol
— 2020-06-15 06:12:22 in
in a sense yes, mvc is a concept or approach and some compromises have to be made.

a example
the frame is pure html header/footer ( this is in views/themes more commonly views/include )
these are loaded with functions stdhd/stdft on the controller so the frame has that approach

normal you would include the head & foot on each html view but function is easier
i have php in header_topbar because i use a function for header (stdhd) i can add the controller and load the navbar as pure html

include 'core/Controller.php'
$navbar = new Controller();
   $data = [
       'url' => $site_config["SITEURL"],
       'mail' => $unreadmail,
       'usersid' => $CURUSER['id'],
     ];
$navbar->view('views/themes/default/navbar', $data)
;


Normally because im removing the style and css replacing it with bootstrap it would be one theme only and strip everything away but i think giving option of multiple themes is good
Its just finding time now in general any images/css/js should be in a assets/public folder this comes down to style like replacing images with icons/fa removing all inline css
Its a lot of work lol but im in no rush as long as works
add anything you wish  (y) been distracted with server but this can go a few places just the link to the controllermethod/page needs changing ive updated 1st post, the type in likes table need to be changed comment for comment, forum for forum etc

for comments its this line in commenttable function
print('<th align="right">' . $edit . $delete . '[<a href="$site_config[SITEURL]/report?comment=' . $row["id"] . '">Report</a>] Posted: ' . date("d-m-Y \\a\\t H:i:s", utc_to_tz_time($row["added"])) . '<a id="comment' . $row["id"] . '"></a></th>');
Announce - BIGINT Errors — 2020-06-09 09:24:25 in v3 Support
Where in torrent table do you have bigint
Size is a bigint  just wondering if you edited the structure.
I try move quick so username links like top of loginblock we do as i see or reported but the idea is done (y)
All through one function so easy to improve for now very simple
user = can see all green buttons if your account - if not your account its hidden
admin = can see green & red every account

Memberlist, accountdetails  & account all in one controller 800 lines ;) so many edits lol

Improvement example maybe we allow user to view other users  users/mytorrents if permission but until fully tested i keep it simple for security
I'll look at that, I kept usercp & accountdetails controllers separate but that is good idea.
I think maybe user class
Use?/userdetails then extend
User/torrents using view user group permission
first post updated split functions so now say thanks to download and likes/reactions are seperate
Quick replacement ive made to replace thanks mod which used concat & js and now is extended to likes for comments, torrents etc fully working
[color=rgb(247, 218, 100)]if thanks enabled you must click thanks or message pops up excludes your own torrents
if likes enabled you may like/unlike posts these can be place multiple places[/color]

ill add this to base with config option  ? its here for thoughts & suggestions & its nice to share for those on v3 to follow if you wish its just query's that vary a little
ill update this as i go if there is interest

I decided to split into 2 mods thanks & likes

sql   help [color=rgb(247, 218, 100)] type = torrent, post, comment, user [/color] id = curuserid [color=rgb(247, 218, 100)]liked = id of thing liked[/color]

CREATE TABLE `thanks` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `user` int(10) unsigned NOT NULL default '0',
 `thanked` int(10) unsigned NOT NULL default '0',
 `added` datetime NOT NULL default '0000-00-00 00:00:00',
 `type` text NOT NULL,
 PRIMARY KEY  (`id`),
 KEY `user` (`user`),
 KEY `thanked` (`thanked`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;

CREATE TABLE `likes` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `user` int(10) unsigned NOT NULL default '0',
 `liked` int(10) unsigned NOT NULL default '0',
 `added` datetime NOT NULL default '0000-00-00 00:00:00',
 `reaction` text NOT NULL,
 `type` text NOT NULL,
 PRIMARY KEY  (`id`),
 KEY `user` (`user`),
 KEY `liked` (`liked`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;


config

// likes
$site_config["forcethanks"] = true;     // force members to thanks
$site_config['allowlikes'] = true;          // allow likes/unlikes


DOWNLOAD  or we can just keep it universal with a message when trying to download

   // LIKE MOD
   if($site_config["forcethanks"]) {
   $data = DB::run("SELECT user FROM thanks WHERE thanked = ? & type = ? & user = ?", [$id, 'torrent', $CURUSER['id']]);
   $like = $data->fetch(PDO::FETCH_ASSOC);
   if(!$like){
       show_error_msg(T_("ERROR"), T_("PLEASE_THANK"), 1);
   }
   }


example torrent details hide magnet link

   // Like Mod
   if(!$site_config["forcethanks"]) {
   // Magnet
   if ($row["external"] == 'yes'){
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=udp://tracker.openbittorrent.com&tr=udp://tracker.publicbt.com\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }else{
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=".$site_config['SITEURL']."/announce.php?passkey=".$CURUSER["passkey"]."\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }
   }
   if($CURUSER["id"] != $row["owner"] && $site_config["forcethanks"]) {
   $data = DB::run("SELECT user FROM thanks WHERE thanked = ? AND type = ? AND user = ?", [$id, 'torrent', $CURUSER['id']]);
   $like = $data->fetch(PDO::FETCH_ASSOC);
   if($like){
   // Magnet
   if ($row["external"] == 'yes'){
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=udp://tracker.openbittorrent.com&tr=udp://tracker.publicbt.com\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }else{
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=".$site_config['SITEURL']."/announce.php?passkey=".$CURUSER["passkey"]."\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }
   }else {
      print("<a href='$site_config[SITEURL]/likes/details?id=$id'><button  class='btn btn-sm btn-danger'>Thanks</button></a>&nbsp;");
   }
   }else{
   if ($row["external"] == 'yes'){
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=udp://tracker.openbittorrent.com&tr=udp://tracker.publicbt.com\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }else{
   print ("<a href=\"magnet:?xt=urn:btih:".$row["info_hash"]."&dn=".$row["filename"]."&tr=".$site_config['SITEURL']."/announce.php?passkey=".$CURUSER["passkey"]."\"><button type='button' class='btn btn-sm btn-danger'>Magnet Download</button></a>");
   }
   }


example torrent table hide magnet link ( this is where i link my controller '$site_config[SITEURL]/likes/index )

               case 'magnet':
                   $magnet = $pdo->run("SELECT info_hash FROM torrents WHERE id=?", [$id])->fetch();
                   // Like Mod
                   if(!$site_config["forcethanks"]) {
                   print("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $magnet["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=" . $CURUSER['passkey'] . "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' title='Download via Magnet' /></a></td>");
                   }
                   if($CURUSER["id"] != $row["owner"] && $site_config["forcethanks"]) {
                   $data = DB::run("SELECT user FROM thanks WHERE thanked = ? AND type = ? AND user = ?", [$id, 'torrent', $CURUSER['id']]);
                   $like = $data->fetch(PDO::FETCH_ASSOC);
                   if($like){
                   print("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $magnet["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=" . $CURUSER['passkey'] . "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' title='Download via Magnet' /></a></td>");
                   }else {
                   print ("<td class='ttable_col$x' align='center'><a href='$site_config[SITEURL]/likes/index?id=$id' ><button  class='btn btn-sm btn-danger'>Thanks</button></td>");
                   }
                   }else{
                       print("<td class='ttable_col$x' align='center'><a href=\"magnet:?xt=urn:btih:" . $magnet["info_hash"] . "&dn=" . rawurlencode($row['name']) . "&tr=" . $row['announce'] . "?passkey=" . $CURUSER['passkey'] . "\"><img src='" . $site_config['SITEURL'] . "/images/magnetique.png' border='0' title='Download via Magnet' /></a></td>");
                   }
                   break;




controller  (for v3 make separate pages and change links eg $site_config[SITEURL]/likes/index )

<?php
 class Likes extends Controller {

   public function __construct(){
   }

   // Thanks on index
   public function index(){
   dbconn();
   global $site_config, $CURUSER;
   $id = (int)$_GET['id'];
   if (!is_valid_id($id));
   DB::run("INSERT INTO thanks (user, thanked, added, type) VALUES (?, ?, ?, ?)",[$CURUSER['id'], $id, get_date_time(), 'torrent']);
   header("Refresh: 3;url=$site_config[SITEURL]/index.php");
   show_error_msg("Error", "Thanks you for you appreciation.",1);
   }
   // Thanks on details
   public function details(){
   dbconn();
   global $site_config, $CURUSER;
   $id = (int)$_GET['id'];
   if (!is_valid_id($id));
   DB::run("INSERT INTO thanks (user, thanked, added, type) VALUES (?, ?, ?, ?)",[$CURUSER['id'], $id, get_date_time(), 'torrent']);
   header("Refresh: 3;url=$site_config[SITEURL]/torrents/details?id=$id");
   show_error_msg("Error", "Thanks you for you appreciation.",1);
   }
 
   public function liketorrent(){
   dbconn();
   global $site_config, $CURUSER;
   $id = (int)$_GET['id'];
   if (!is_valid_id($id));
   DB::run("INSERT INTO likes (user, liked, added, type, reaction) VALUES (?, ?, ?, ?, ?)",[$CURUSER['id'], $id, get_date_time(), 'torrent', 'like']);
   header("Refresh: 3;url=$site_config[SITEURL]/torrents/details?id=$id");
   show_error_msg("Error", "Thanks you for you appreciation.",1);
   }

   public function unliketorrent(){
   dbconn();
   global $site_config, $CURUSER;
   $id = (int)$_GET['id'];
   if (!is_valid_id($id));
   DB::run("DELETE FROM likes WHERE user=? AND liked=? AND type=?", [$CURUSER['id'], $id, 'torrent']);
   header("Refresh: 3;url=$site_config[SITEURL]/torrents/details?id=$id");
   show_error_msg("Error", "Sorry you dont like.",1);
   }

}


post like buttons on torrent details

   // LIKE MOD
   if($site_config["allowlikes"]) {
   $data = DB::run("SELECT user FROM likes WHERE liked=? AND type=? AND user=? AND reaction=?", [$id, 'torrent', $CURUSER['id'], 'like']);
   $likes = $data->fetch(PDO::FETCH_ASSOC);
   if($likes){
       print("<tr><td align='left'><b>Reaction:</b></td><td><a href='$site_config[SITEURL]/likes/unliketorrent?id=$id'><img src='/images/unlike.png' width='80' height='40' border='0'></a></td></tr>\n");
   }else{
       print("<tr><td align='left'><b>Reaction:</b></td><td><a href='$site_config[SITEURL]/likes/liketorrent?id=$id'><img src='/images/like.png' width='80' height='40' border='0'></a></td></tr>\n");
   }
   }
My Theme in Progress — 2020-06-02 13:12:11 in M-BiTsy Support
All suggestions are welcome mate, because the code is different and there is no mods ready i think its best i add the most common features to the base
in topnavbar below  <!-- START NAVIGATION -->

move  <?php if ($CURUSER){ ?>

below the line
<a class="navbar-brand" href="<?php echo $site_config["SITEURL"]; ?>/index.php"><img src='<?php echo $site_config["SITEURL"]; ?>/views/themes/<?php echo $THEME; ?>/images/logo.gif'></a>

then the end of the file should look like this
 </div>
 <?php } ?>
</nav>
<br>
My Theme in Progress — 2020-05-29 18:56:41 in M-BiTsy Support
Looking good  (y) hoping to find time to do forum tonight or I might just add the old forum Css for now like the shoutbox, they were the two areas where bootstrap caused a big style issue
While the theme is fine please keep note of any other edits because the project keeps moving ready for release at end of next month gonna, adding mods now then I'm going to be lazy and get freelancer to do all templates

heres my latest one
Topnavbar
[TABLE]
[TR]
[TD]  <a class="navbar-brand" href="<?php echo $site_config["SITEURL"]; ?>/index.php"><img src='<?php echo $site_config["SITEURL"]; ?>/views/themes/<?php echo $THEME; ?>/images/logo.gif'></a>[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]

[TD]  [/TD]
[/TR]
[/TABLE]
Addition to add to config, it's best to place things that can be set in there

In config
$site_config['freeleechgb'] = '8589934592';        // freeleech if over x gb


Replace the line in mod in cleanup
$gigs  = 8589934592; 

For
$gigs  = $site_config["freeleechgb"];
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