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

Replace thisEach function — 2021-10-02 06:15:25 in v3 Support
this seems to print out 16
function smile() {

       print "<div align='center'><table cellpadding='1' cellspacing='1'><tr><br />";
     
       global $smilies, $count;
       reset($smilies);
     
       for ($i = 0; $i < 16; $i++) {
           $code = key($smilies);
           $url = current($smilies);
           next($smilies);
           print("\n<td><a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\">
           <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a></td>");
        }
   }
Replace thisEach function — 2021-10-01 22:41:42 in v3 Support
whats the code in the while brackets is it a calculation like $i = $count or $i++

just wonder if its grouping by 16 or limiting to 16.

we can try count through array = replace the while for a for()

for ($i = 0; $i < 16; $i++) {
   // vars
   $code = key($smilies);
   $url = current($smilies);
   // add
   next($smilies);
  // result
  var_dump($url);
}



groups — 2021-10-01 07:46:28 in v3 Support
In account-details

This is the code for dropdown
if ($CURUSER["class"] > $user["class"]){
print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
$maxclass = $CURUSER["class"];
for ($i = 1; $i < $maxclass; ++$i)
print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
print("</select></td></tr>\n");
}


There are 7 groups
Is vip premium id 8 or is admin id 8

Make group.sql backup then in phpmyadmin manually re order numbers
1(members) - 8(admin) this may help

Change your user class column in user table to 8 to see any changes
Replace thisEach function — 2021-09-29 04:13:40 in v3 Support
I removed it a while back, noticed i still had the function when cleaning the files up

From what i remember its used on stylesheet, language and timezone selection so a another example

while (list($key, $val) = thisEach($tzs)) {


the array var goes first in this case $tzs then the key ($key) followed by the value ($value)
foreach($tzs as $key => $val) {


Replace thisEach function — 2021-09-28 16:45:43 in v3 Support
This is the function that fixed each been removed in php 7

I ended up removing thisEach function

mass search files for
thisEach


Here is blocks/themelang_block
while (list($ss_name, $ss_id) = thisEach($ss_sa)){


Replace with
foreach ($ss_sa as $ss_name => $ss_id) {


If process works use above as a guide to replace all other instances
groups — 2021-09-28 16:30:05 in v3 Support
What's the url  just need the end bit  url/???
just been playing with user links on my pdo one and improved this

this is my function
function coloredname($name)
   {
       $classy = DB::run("SELECT u.class, u.id, u.donated, u.warned, u.enabled, g.Color, g.level, u.uploaded, u.downloaded FROM `users` `u` INNER JOIN `groups` `g` ON g.group_id=u.class WHERE username ='" . $name . "'")->fetch();
       $gcolor = $classy['Color'];
       if ($classy['donated'] > 0) {
           $star = "<img src='" . URLROOT . "/assets/images/donor.png' alt='donated' border='0' width='15' height='15'>";
       } else {
           $star = "";
       }
       if ($classy['warned'] == "yes") {
           $warn = "<img src='" . URLROOT . "/assets/images/warn.png' alt='Warn' border='0'>";
       } else {
           $warn = "";
       }
       if ($classy['enabled'] == "no") {
           $disabled = "<img src='" . URLROOT . "/assets/images/disabled.png' title='Disabled' border='0'>";
       } else {
           $disabled = "";
       }
       return stripslashes("<a href='".URLROOT."/profile?id=" . $classy['id'] . "'><font color='" . $gcolor . "'>" . $name . "</a>" . $star . "" . $warn . "" . $disabled . "</font>");
   }


this always returns a link to users profile

so for v3 something like
$a ="SELECT class, id, donated,

and
return stripslashes("<a href='".$site_config['SITEURL']."/profile?id=" . $classy['id'] . "'>


fir the query this is much better for newer sql
SELECT u.class, u.id, u.donated, u.warned, u.enabled, g.Color, g.level, u.uploaded, u.downloaded FROM `users` `u` INNER JOIN `groups` `g` ON g.group_id=u.class WHERE username ='" . $name . "'"
Customize Help — 2021-09-12 10:09:15 in v3 Support
lets see what we can do  :cool  , i dont use v3 so might need some tinkering or others might have code but here is a start

1) search languages/english.php for Type type type type area
   remove this line from index.php
print("<br /><center><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a> - <a href='torrents-search.php'>".T_("SEARCH_TORRENTS")."</a></center><br />");


2) https://torrenttrader.uk/topic?topicid=9717

3) ill take a look at that, that will be the download.php file should be possible

4) maybe someone has this mod

5) try this on index.php

find
	$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
$res = SQL_Query_exec($query);
if (mysqli_num_rows($res)) {
torrenttable($res);
}else {


replace with ( look for HERE you will need to add the id (number) for the catogorie example if you click movies the url might say id=15 - then replace HERE with 15 - in the code below search category =HERE i put twice in this example
	$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
$res = SQL_Query_exec($query);
if (mysqli_num_rows($res)) {

$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND category =HERE AND banned = 'no' ORDER BY id DESC LIMIT 25";
$res = SQL_Query_exec($query);
if (mysqli_num_rows($res)) {
           torrenttable($res);
       }
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND category =HERE AND banned = 'no' ORDER BY id DESC LIMIT 25";
$res = SQL_Query_exec($query);
       if (mysqli_num_rows($res)) {
torrenttable($res);
       }
}else {
SQL Error — 2021-09-10 15:50:10 in v3 Support
for shared you should ask host but you should be able to check in phpmyadmin in the cpanel

like this https://imgur.com/VgN16rz

to show whats enabled
SHOW VARIABLES LIKE 'sql_mode';


to set (dont use this yet lets see whats there first)
set global sql_mode='';

Captcha Google — 2021-09-08 15:20:49 in v3 Mods Requests
ive updated this post with the captcha i use here https://torrenttrader.uk/topic?topicid=10250&page=last#last

i use google v2 on login and signup if any use, in progress only because i dont use v3 but should be fully working

or post your login page and i will have a look
Captcha TTv3 — 2021-09-08 15:02:32 in v3 Mods in Progress
for signup

account-signup find
if ($_GET["takesignup"] == "1") {


below add

(new Captcha)->response($_POST['g-recaptcha-response']);


find
<tr>
<td align="center" colspan="2">
    <input type="submit" value="<?php echo T_("SIGNUP"); ?>" />
</td>
</tr>


add above
<tr>
 <td align="center" colspan="2">
 <?php (new Captcha)->html(); ?>
</td>
</tr>
Bug Tracker — 2021-09-03 19:07:48 in M-BiTsy Support
that username code is from v3 so added this function to check username is letter or number

    function usernameAlfNum($username)
   {
       if (!preg_match('/^[A-Za-z]{1}[A-Za-z0-9]{5,31}$/', $username)) {
           return true;
       } else {
           return false;
       }
   }


for private site members only needs setting - it was all private before but been adding back the ability to allow guest to see some parts
requète sql — 2021-08-30 18:21:23 in v3 Support
You could test this if I understand correctly

SQL_Query_exec("UPDATE `users` SET `class` = '3', `oldclass`='$oldclass', `downloaded` = 0, `vipuntil` = '$vipuntil' WHERE `id` = '$CURUSER[id]'");


That resets downloaded when becoming vip

Or you could temporarily reset ratio with a sql column in users old ratio you would need to need to add old ratio back in cleanup if you use method below

SQL_Query_exec("UPDATE `users` SET `class` = '3', `oldclass`='$oldclass', `downloaded` = 0, `oldratio` = $CURUSER[downloaded], `vipuntil` = '$vipuntil' WHERE `id` = '$CURUSER[id]'");


If you wish to keep download at 0 while vip we might need to edit announce  :unsure
error announce — 2021-08-16 14:03:54 in v3 Support
Here is the announce I saw

https://github.com/D3monCoder/TORRENTTRADER-V2.08-MICRO-EDITION/blob/master/upload/announce.php

Around lines 388 and 410

You could change table columns  to allow negative numbers but I would see if the code edits work first.
error announce — 2021-08-15 17:18:22 in v3 Support
It is when seeders and leeches is below 0

I noticed this before in Micromonkeys edition which you could try added to updateset array

$updateset[] = "leechers = (CASE WHEN (leechers < 1) THEN 0 ELSE (leechers - 1) END)";
 
torrents in my profile — 2021-08-08 19:00:41 in v3 Support
Are they external torrents ?
torrents in my profile — 2021-08-08 17:03:25 in v3 Support
oh i see  :rofl  i can not test too much on v3 but i think this will work for account.php

once edited go to siteaddress/account.php?action=seedingtorrents

find
/////////////// MY TORRENTS ///////////////////


above add
if ($action=="seedingtorrents"){

$count = SQL_Query_exec("SELECT COUNT(id) FROM peers
                                           WHERE peers.userid = $CURUSER[id]
                                           AND peers.seeder = 'yes'" );

      list($pagertop, $pagerbottom, $limit) = pager(50, $count, 'account.php?action=seedingtorrents&');

$test = SQL_Query_exec("SELECT * FROM torrents
                                         INNER JOIN peers
ON torrents.owner = peers.userid
WHERE peers.userid = $CURUSER[id]
AND peers.seeder = 'yes'" );

begin_frame(T_("USER").": $CURUSER[username] (".T_("Currently seeding").")");
navmenu();
   if (mysqli_num_rows($count) > 0) {
?>
<table class="f-border comment" cellpadding="10" border="0" width="100%">
<tr>
   <th>name</th>
</tr><tr>
<?php
   foreach ($test as $row) {
?>
   <td><?php echo $test['name'] ?></td>
<?php
}
?>
</tr>
</table>
<br /><br />
<?php
   echo $pagerbottom;
   } else {
echo 'not seeding';
}
end_frame();
}


i just add torrent name for now for testing but i added pager so hopefully it works and we can build table
torrents in my profile — 2021-08-08 14:56:09 in v3 Support
Try this In account.php
Find
$usersignature = stripslashes($CURUSER["signature"]);


Below add
$numseeding = get_row_count("peers", "WHERE userid = $CURUSER[id] AND seeder = 'yes' ");


find
<b><?php echo T_("PASSKEY"); ?>:</b> <?php echo $CURUSER["passkey"]; ?><br />


Below add
<b><?php echo T_("Torrents Seeding"); ?>:</b> <?php echo $numseeding; ?><br />


 
torrents in my profile — 2021-08-08 14:07:15 in v3 Support
If you mean account.php and not account-details.php change $id to $CURUSER['id']
torrents in my profile — 2021-08-08 13:48:38 in v3 Support
For torrents, comments, posts in account-details.php you have

$numtorrents = get_row_count("torrents", "WHERE owner = $id");
       $numcomments = get_row_count("comments", "WHERE user = $id");
       $numforumposts = get_row_count("forum_posts", "WHERE userid = $id");


That's uploaded torrents

For only seeding torrents maybe count peers table
   $numseeding = get_row_count("peers", "WHERE userid = $id AND seeder = 'yes' ");


Then just
echo $numseeding;


Not tested on v3 but looks OK
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