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

signature — 2022-12-06 05:18:51 in v3 Support
this will force img bbcode
find
$signature = $_POST["signature"];


below add
        if ($_POST["signature"] != '') {
           $has_bbcode = substr($_POST['signature'], 5);
           $has_bbcode = substr($has_bbcode, 0, -6);
           if (filter_var($has_bbcode, FILTER_VALIDATE_URL)) {
               $signature = $_POST["signature"];
               //echo("$_POST[signature] is a success");
           } else {
               die("Votre Url de votre image de signature est pas valide.");
           }
       }
signature — 2022-12-04 19:23:48 in v3 Support
try this for image link, then we can add image type https://torrenttrader.uk/test
should accept img tag

make test.php
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();

       if ($_POST) {
           if (filter_var($_POST['link'], FILTER_VALIDATE_URL)) {
               $signature = $_POST['link'];
               echo("$_POST[link] link is a success");
           } else {
               $has_bbcode = substr($_POST['link'], 5);
               $has_bbcode = substr($has_bbcode, 0, -6);
               if (filter_var($has_bbcode, FILTER_VALIDATE_URL)) {
                   $signature = $has_bbcode;
                   echo("$has_bbcode bbcode is a success");
               } else {
                   $signature = 'error';
                   echo("$_POST[link] is not a valid URL");
               }
           }
       }
       ?><br>
       <form id="submit" method="post" action="test.php">
           Result = <?= $signature ?><br>
           <input type='text' name='link' placeholder="image link only"><br>
           <button type="submit">submit</button>
       </form>
signature — 2022-12-04 14:05:02 in v3 Support
This is where it can be complicated.

You would need to check link/image then also bbcode - substr or preg but then it gets a little messy

I will try code later but I would block bbcode, make default signature then add html directly where ever signature is shown

getting this error — 2022-12-03 15:50:16 in General Chat
is this on download ? see if we can narrow it down

on url check id eg download?id=XXX (or right click on link to get url)
check uploads folder that the torrent is there

if torrent is in uploads folder in download.php find
$fn = "$torrent_dir/$id.torrent";


under place - for test remove afterwards
die($fn);



signature — 2022-12-03 15:23:42 in v3 Support
maybe the best way is to stop members submitting wrong type
example in account edit form use
placeholder='images url only'

then also in account find $signature = $_POST["signature"]

something like check is image url
if (filter_var($_POST["signature"], FILTER_VALIDATE_URL)) {
$signature = $_POST["signature"];
} else {
    die('not image');
}


not tested this but you just need to check that $_POST["signature"].
this way someone could put website link in signature
i did something like this, because updating the torrent is half the issue, the other side was searching that column afterwards. You want to search action the the column is horror,action so it made sense to split the string up and create a tags table

$genre  = $IMDB_GENRE_RESULT;
$pieces = explode(",", $genre);
SQL_Query_exec("INSERT INTO tags (torrentid, type1, type2, type3) VALUES ($id,  $pieces[0],  $pieces[1],  $pieces[2]");


CREATE TABLE `tags` (
 `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 `torrentid` int(10) DEFAULT NULL,
 `type1` varchar(40) DEFAULT NULL,
 `type2` varchar(40) DEFAULT NULL,
 `type3` varchar(40) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM;


for search use where in type1 or type2 etc

You would need to check result not empty before inserting

looks expensive but the logic looks ok you would need to open ports

cant remember if its  FORWARDED_FOR that returns false positives. Always thought the best option for vpn detection was a array list/txt file and then in_array. That would be bulletproof as long as the list was up-to-date.
going to take a closer look see if i can identify what's causing error  👍
print("<a href='" . URLROOT . "/thank?id=$data[id]&type=torrent'><button  class='btn btn-sm ttbtn'>Thanks</button></a><br>");
magnets dont work on local torrents

in app/views/user/torrents.php find
print("<a href='" . URLROOT . "/like/thanks?id=$data[stmt][id]&type=torrent'><button  class='btn btn-sm ttbtn'>Thanks</button></a><br>");


try replace with
print("<a href='" . URLROOT . "/thank?id=$data[stmt][id]&type=torrent'><button  class='btn btn-sm ttbtn'>Thanks</button></a><br>");
Get forum post id — 2022-11-10 05:53:04 in General Chat
from what i remember you need a link in forums - example where report button is something like this - you will need to alter link to right address
<a href='<?php echo $site_config['SITEURL']; ?>post?id=<?php echo $topicid; ?>&page=<?php echo $_GET['page'] ?>#post<?php echo $postid; ?>'>Anchor</a>


then just after while or foreach where we print post body add js so we have something to link
print("<a id='post$arr[id]'></a>");


just checked this is in v3 just need to add link
print("<a id='post$postid'></a>");
Get forum post id — 2022-11-09 14:20:26 in General Chat
like this - im sure this is in v3


if you right click icon you get link
Checked the sql and done column is there so must be not reading query correctly
Try wrap done in-line with back `
`done`
In index.php mate
Help — 2022-10-27 08:13:52 in General Chat
strange in account.php
find
if ($do == "save_settings"){


about 7 lines up you should have
	<tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("SUBMIT");?>" /> <input type="reset" value="<?php echo T_("REVERT");?>" /></td></tr>
</table></form>


to make sure i have right place you can try
	</table><input type="submit" value="Submit" /></form>
Help — 2022-10-27 07:35:30 in General Chat
on transfer all users were set to default class 1
go to host, phpmyadmin, users table, change you class to 7
after this you can set others on site like moderators etc
Help — 2022-10-27 06:41:32 in General Chat
This is how I converted the users table to TT for future reference for full transfers it would just be a case of copying this format to all tables.
<?php
define("DB_HOST", "localhost");
define("DB_USER", "dbusername");
define("DB_PASS", "dbpassword");
define("DB_NAME", "dbname");
define('DB_CHAR', 'utf8mb4');

function mksecret($len = 20)
{
   $chars = array_merge(range(0, 9), range("A", "Z"), range("a", "z"));
   shuffle($chars);
   $x = count($chars) - 1;
   for ($i = 1; $i <= $len; $i++)
       $str .= $chars[mt_rand(0, $x)];
   return $str;
}

function pdo($pdo, $sql, $args = NULL)
{
   try {
       if (!$args) {
           return $pdo->query($sql);
       }
       $stmt = $pdo->prepare($sql);
       $stmt->execute($args);
       return $stmt;
   } catch (\Exception $e) {
       throw $e;
   }
}

$opt = array(
   PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
   PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
   PDO::ATTR_EMULATE_PREPARES => false,
);
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHAR;
try {
   $pdo = new PDO($dsn, DB_USER, DB_PASS, $opt);
} catch (\Exception $e) {
   die('The Database Details Are Incorrect');
}

$unit3d = pdo($pdo, "SELECT * from users1")->fetchAll();
foreach ($unit3d as $olduser) {
   pdo(
       $pdo,
       "INSERT INTO users (
               username, password, secret, email,
               status, added, last_access,
               uploaded, downloaded, passkey, seedbonus, gender,
               stylesheet,
               language, class, signature)
               VALUES (
               ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
       [
           $olduser['username'],
           $olduser['password'],
           mksecret(),
           $olduser['email'],
           'confirmed',
           $olduser['created_at'],
           $olduser['last_action'],
           $olduser['uploaded'],
           $olduser['downloaded'],
           $olduser['passkey'],
           $olduser['seedbonus'],
           'Male',
           1,
           1,
           1,
           $olduser['signature'] ?? ''
       ]
   );
}

Help — 2022-10-26 12:45:42 in General Chat
managed to convert them but noticed seedbonus which is not on default TT
i can transfer it if you want to add column to TT - there is a mod on the site for seedbonus
Help — 2022-10-26 09:08:44 in General Chat
Any help would be free I don't do paid work I do it for fun and experience   👍

I know TT database like back of my hand so would just need a backup of the unit3d users table - if you make backup and in the backup sql file keep all the structure ( create users table)
and then delete all data ( insert into users) except 1 - it would help to have one example of a user

I looked at unit3d and the only thing that stood out was the passwords- I don't think you can transfer passwords - so on login user would have ro be directed to recover password or insert password or something like that
I can't seem to find which hash unit3d uses so would be quicker and easier resetting passwords
Help — 2022-10-25 21:36:23 in General Chat
to transfer users id use something like this

make a backup of your unit3d users table then rename users1 and a new TT table users2
we make 2 new tables in case we make mistake
the tt side would be users2
CREATE TABLE `users2` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `username` varchar(40) NOT NULL default '',
 `password` varchar(40) NOT NULL default '',
 `secret` varchar(20) binary NOT NULL default '',
 `email` varchar(80) NOT NULL default '',
 `status` enum('pending','confirmed') NOT NULL default 'pending',
 `added` datetime DEFAULT NULL,
 `last_login` datetime DEFAULT NULL,
 `last_access` datetime DEFAULT NULL,
 `editsecret` varchar(20) binary NOT NULL default '',
 `privacy` enum('strong','normal','low') NOT NULL default 'normal',
 `stylesheet` int(10) default '1',
 `language` varchar(20) NOT NULL default '1',
 `info` text,
 `acceptpms` enum('yes','no') NOT NULL default 'yes',
 `ip` varchar(39) NOT NULL default '',
 `class` tinyint(3) unsigned NOT NULL default '1',
 `avatar` varchar(100) NOT NULL default '',
 `uploaded` bigint(20) unsigned NOT NULL default '0',
 `downloaded` bigint(20) unsigned NOT NULL default '0',
 `title` varchar(30) NOT NULL default '',
 `donated` int(5) unsigned NOT NULL default '0',
 `country` int(10) unsigned NOT NULL default '0',
 `notifs` varchar(100) NOT NULL default '',
 `enabled` varchar(10) NOT NULL default 'yes',
 `modcomment` text default NULL,
 `gender` varchar(6) NOT NULL default '',
 `client` varchar(25) NOT NULL default '',
 `age` int(3) NOT NULL default '0',
 `warned` char(3) NOT NULL default 'no',
 `signature` varchar(200) NOT NULL default '',
 `last_browse` int(11) NOT NULL default '0',
 `forumbanned` char(3) NOT NULL default 'no',
 `invited_by` int(10) NOT NULL default '0',
 `invitees` varchar(100) NOT NULL default '',
 `invites` smallint(5) NOT NULL default '0',
 `invitedate` datetime DEFAULT NULL,
 `commentpm` enum('yes','no') NOT NULL default 'yes',
 `passkey` varchar(32) NOT NULL default '',
 `page` text,
 `team` int(10) unsigned NOT NULL default '0',
 `tzoffset` int(4) default 0,
 `hideshoutbox` enum('yes', 'no') NOT NULL DEFAULT 'no',
 PRIMARY KEY  (`id`),
 UNIQUE KEY `username` (`username`),
 KEY `status_added` (`status`,`added`),
 KEY `ip` (`ip`),
 KEY `uploaded` (`uploaded`),
 KEY `downloaded` (`downloaded`),
 KEY `country` (`country`)
) ENGINE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=1 ;


then create file called test.php
in the example " . $olduser['email'] .", needs to be the unit3d name i assume its email you just need to match up for TT you only need these columns - however you might need to add more like download, upload, signature etc - try get this query to work first any errors will be in admincp log
<?php
require_once("backend/functions.php");
dbconn();
    $sql = SQL_Query_exec("SELECT * from users1");
    $unit3d =  mysqli_fetch_assoc($ss_r);
    foreach ($unit3d as $olduser){
        $addnewuser = SQL_Query_exec("
                           INSERT INTO users (
                            username, password, secret, email,
                            status, added, last_access, age,
                            country, gender, client, stylesheet,
                            language, class, ip)
                            VALUES (
                           " . $olduser['username'] .",
                           " . $olduser['password'] .",
                           " . $olduser['secret'] .",
                           " . $olduser['email'] .",
                           " . $olduser['status'] .",
                           " . $olduser['added'] .",
                           " . $olduser['last_access'] .",
                           " . $olduser['age'].",
                           " . $olduser['country'] .",
                           " . $olduser['gender'] .",
                           " . $olduser['client'] .",
                           " . $site_config["default_theme"] .",
                           " . $site_config["default_language"] .",
                           1,
                           " . $olduser['ip'] .")");
    }
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