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

Cleanup - Ignoring column — 2020-08-06 14:15:29 in v3 Support
Not sure if gmtime is user timezone
It returns sql_timestamp_to_unix_timestamp($s) which i think is local (ini)
Had a few issues with dates myself I'll take a look for that line
Cleanup - Ignoring column — 2020-08-06 13:37:58 in v3 Support
Limited or account_limited ?

Have you tried viewing output
$var = SQL_Query_exec(
dump_var($var);

Nevermind just noticed account_limited in other query
great work on the navbar ?(y) ive added to base, because ive moved a lot around i re-did all the links so if you update everything is ready
i removed the social media & radio links but everything else is there if you send me links to missing mods contact/friend/request ill add them

just updated github if you wish to try newest one save old files first

to update sql
ALTER TABLE `shoutbox` ADD `staff` tinyint( 3 ) unsigned NOT NULL default '0';


in config.php
// FORUM POST ON INDEX
$site_config['FORUMONINDEX'] = true;


transfer and rewrite all files except config.php [color=rgb(247, 218, 100)](for live servers)[/color]
https://github.com/M-jay84/Torrent-Trader-MVC-PDO-OOP

install for xampp php 7.4 only  [color=rgb(247, 218, 100)](use attached folder)[/color]
place pdo folder so it looks like htdocs/pdo/public_html [color=rgb(247, 218, 100)](this is so links and rewrite is set)[/color]
edit db settings in config.php if you do not rename the pdo folder you do not need to set url just search localhost/pdo
it looks like it was model name $this->model('nal'); ive attached files i uploaded and search siteurl/nals you dont need sql

my code is little different if it does not work its because of the object ive added example on Nals.php (controller)
      //if ($row["public"] == "yes")
is now
     if ($row->public == "yes")


anything below $res = $this->nalModel->getnals(); can be swapped for your original files, just checking my current project against github before adding controller changes
the code will become a lot more object orientated when i start adding the classes just trying to comment github better

Been trying to keep code similar for comparing changes on github but its getting to point where i need to format all files getting a little messy now lol

for anyone else who it might benefit sometimes when a object is called  $row["public"] this will throw a error like Cannot use object of type stdClass as array
this just means its expecting the object to be passed better, calling objects by $this-> in classes does this often
$row->public
Is Controller called Nals.php
what do you have for xampp setup .htaccess seems to be playing up for me
is it htdocs/foldername/.htaccess - tried removing https rewrite

ill try live server as well  (y)
quick look at controller and its called Nals so try added 's'  <?php echo TTURL; ?>/nals' , the files look fine
— 2020-08-03 16:28:55 in
Pdo db classes can be extended too
class DB extends \PDO

This way you can use custom functions and the original functions just added this got sick of editing scripts from github  to test lol

In my mvc skeleton I just have two  db functions
Run() for chaining and get_row_count was moved there
had a issue with the torrent table looks like a mod (torrent team), had to remove that but apart from that seems to be working  :D

just add peers controller then update code below

//////connectable yes or know////////
if ($CURUSER["view_torrents"]=="yes") {
   $activeseed = get_row_count("peers", "WHERE userid = '$CURUSER[id]' AND seeder = 'yes'");
   $activeleech = get_row_count("peers", "WHERE userid = '$CURUSER[id]' AND seeder = 'no'");
   $stmt = DB::run("SELECT connectable FROM peers WHERE userid=" . $CURUSER["id"] . " LIMIT 1");
   $connect = $stmt->fetchColumn();
   if($connect == 'yes') {
   $connectable = "<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"#00FF00\">YES</font></b>";
   } elseif($connect == 'no') {
   $connectable = "<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"FFCCFF\">NO</font></b>";
   } else {
       $connectable ="<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"99CCFF\">Check Settings</font></b>";
  }  
}

print("&nbsp;(<font color=#C0C0C0><i>Seeding:</i></font> <a href=\"javascript:popout(0)\"onclick=\"window.open('" .$site_config["SITEURL"]. "/peers/seeding1?id=" . $CURUSER["id"] . "','Seeding','width=350,height=350,scrollbars=yes')\"><font color='#EB7F27'><b>".$activeseed."</b></font></a>&nbsp;");
print("<font color=#C0C0C0><i>Leeching:</i> </font><a href=\"javascript:popout(0)\"onclick=\"window.open('" .$site_config["SITEURL"]. "/peers/leeching?id=" . $CURUSER["id"] . "','Seeding','width=350,height=350,scrollbars=yes')\"><font color='#EB7F27'><b>".$activeleech."</b></font></a>&nbsp;");
print("<font color=#C0C0C0><i>Connected:</i></font> ".$connectable.")");
//////connectable yes or know end of mod////////
thanks for files ill have a good look through later, here is image of shoutbox added staff chat panel, edit
all help is very welcome  (y)

heres last forum post on index added to base in config
$site_config['FORUMONINDEX'] = true;

then on home
if ($site_config['FORUMONINDEX']) {
   begin_frame("Recent Fourum Post ");
   latestforumposts();
   end_frame();
}
Here you go mate, managed to slim it slightly i just place on home to test

//////connectable yes or know////////
if ($CURUSER["view_torrents"]=="yes") {
   $activeseed = get_row_count("peers", "WHERE userid = '$CURUSER[id]' AND seeder = 'yes'");
   $activeleech = get_row_count("peers", "WHERE userid = '$CURUSER[id]' AND seeder = 'no'");
   $stmt = DB::run("SELECT connectable FROM peers WHERE userid=" . $CURUSER["id"] . " LIMIT 1");
   $connect = $stmt->fetchColumn();
   if($connect == 'yes') {
   $connectable = "<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"#00FF00\">YES</font></b>";
   } elseif($connect == 'no') {
   $connectable = "<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"FFCCFF\">NO</font></b>";
   } else {
       $connectable ="<b><font face=\"Verdana\" style=\"font-size: 10px\" color=\"99CCFF\">Check Settings</font></b>";
  }    
}

print("&nbsp;(<font color=#C0C0C0><i>Seeding:</i></font> <a href=\"javascript:popout(0)\"onclick=\"window.open('" .$site_config["SITEURL"]. "/seeding.php?id=" . $CURUSER["id"] . "','Seeding','width=350,height=350,scrollbars=yes')\"><font color='#EB7F27'><b>".$activeseed."</b></font></a>&nbsp;");
print("<font color=#C0C0C0><i>Leeching:</i> </font><a href=\"javascript:popout(0)\"onclick=\"window.open('" .$site_config["SITEURL"]. "/leeching.php?id=" . $CURUSER["id"] . "','Seeding','width=350,height=350,scrollbars=yes')\"><font color='#EB7F27'><b>".$activeleech."</b></font></a>&nbsp;");
print("<font color=#C0C0C0><i>Connected:</i></font> ".$connectable.")");
//////connectable yes or know end of mod////////


Whats this ?   - $site_config["SITEURL"]. "/leeching.php?id=" . $CURUSER["id"] and the seeding.php one might be useful  :D

will be moving a lot of things around got 3 controllers left before i add all classes keep a note of any edits
if you use this will you post, if you post your recent theme ill check against mine
here is rough copy of shoutbox at minute only staff can edit/delete

add sql (we just add staff column will not effect anything)
upload files

on home controller find
echo '<iframe name="shout_frame" src="'.TTURL.'/shoutbox"

change TTURL.'/shoutbox"  to TTURL.'/newshout"
Which TT is your main site 2.08 if you post account, accountdetails and adminmodtask and shoutbox I'll have a look at some of them options
Might be able to piece it together i assume theres a condition in shoutbox
if $CURUSER[shoutboxbanned] a lot of it looks straight forward
for nfo in torrents controller find
print("<textarea class='nfo' style='width:98%;height:100%;' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea>");
replce with
print("<div><textarea class='nfo' style='width:98%;height:100%;' rows='20' cols='20' readonly='readonly'>" . stripslashes($nfo) . "</textarea></div>");

Quote:
Have users control all their settings/privacy/torrent settings/ view settings/ reset pw/etc etc....in one place.

so far all the controllers are independent (torrents is little tricky) but all user settings together, all torrents together  this makes extending easier

Quote:
Further you should allow for additional functions to be added. Like:

A good example is user controller & torrent controller both have comments
so on torrent detail panel we link comment controller method $gettorrentcommentbyid($id); which shows torrent comments
&
on user detail panel we link comment controller method $getusercommentbyid($id); which shows users comments

i moved the torrent comments but havent looked at comments yet just trying to start moving everything
warnings is another good example we have a warning controller
been playing with torrent controller as well but cant post that by itself its linked to a few things but here is how torrentdetails looks
TT Torrent Client — 2020-07-30 21:02:16 in v3 Mods Completed
you can include and the global db settings global $mysql_host, $mysql_user, $mysql_pass, $mysql_db

include 'backend/mysql.php';
global $mysql_host, $mysql_user, $mysql_pass, $mysql_db;


so we use

       $dsn      = 'mysql:host=' . $mysql_host . ';dbname=' . $mysql_db . ';
       $user     = '$mysql_user';
       $password = '$mysql_pass';


or define paths.php and include in index.php

include 'backend/mysql.php';
define('DB_HOST', $mysql_host);
define('DB_NAME', $mysql_db);
define('DB_USER', $mysql_user);
define('DB_PASS', $mysql_pass);


so we use

       $dsn      = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';
       $user     = 'DB_USER';
       $password = 'DB_PASS';
Its works same as before permission wise you can play with Id in url to check different users/permissions, on mine I have link to warned by Id, uploaded by Id etc
The side list and forms look a little off when I tidy files I'll put in a table so looks better.

I'll update github this week got a few controllers now user, account, email  been moving functions to classes too
been going round in circles with user controller but this is something that ive been playing with, to test upload files from folder, the files dont overwrite anything just add then go to siteurl/neww

the controller is messy at minute but just need to finish it now but everything seems to work not tested reset your own email yet on xamp
this replaces account, account-details, modtasks etc
— 2020-07-27 16:59:02 in
nothing will be lost, everything will remain on site
— 2020-07-26 22:05:56 in
not too sure whats happening with crazyzone, but if users are wanting another site similar to bvlist then we can get something going
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: 10

  • Online

  • Total online: 4
  • Members: 1
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728