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

just to be an asshole to myself, I was doing this on my test machine
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
autolink("invite.php", "Matrix reconfiguring. New users Accepted. ");
?>


I like slow and irritating. I replaced this (because most of it makes no sense anyways)
header("Refresh: 0; url=invite.php?id=$id");

with this
autolink("invite.php", "Matrix reconfiguring. New users Accepted. ");


autolink is your friend....
yep. Seems good. Let me know and we can move it to mod complete if you feel like its done. Let me know
The ajshoutbox prolly explains why I didnt have any issues with this code. I have the ajax shitbox installed on my test box. I still removed it tho lol
the invited_by table in my test database shows 1, so I have to assume its working and I saw no such errors in my  tests. invitedate is also recorded
I did not get any sql error when registering a user while using the code generated invite. I did get the implode error when I didnt select a user to confirm, which seems to be solved by the code I posted above. I will test some more tho, but right now, its the 4th of july and imma go get drunk as piss. Wish me luck :D
should solve the "nothing selected" problem. Still thinking about the other issues
takeconfirm.php
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
header("Refresh: 0; url=invite.php?id=$id");
?>
I see what you mean.
well, I was able to invite myself. Im still looking for any errors, but I dont see any right now. I invited myself, entered the invite code, signed up, and then confirmed it on the admin account and it wrks fine. Yea, the code is still there, but what should I be looking for? What other errors? The system I am testing on is in my signature below. Ubuntu has always worked great, so thats what I use, none of that fancy shit lol
"serph, post: 66774, member: 1398":

Lol i don't need .PHP at the end of my urls I have nginx and use clean urls ie index not index.php account not account.php etc sorry forgot all about it tbh

no problem, just wanted to make sure I wasnt crazy or that my stupid ass dreamweaver wasnt acting like a dickhead again lol
and what is this? in invite.php. What is checkuser.php? lol
$user = "<td align=left class=$class><a class=altlink href=checkuser.php?id=$arr[id]>$arr[username]</a></td>";
Is it just me, or are these wrong for everybody?
<form method="post" action="account-signup?takesignup=1">

should be
<form method="post" action="account-signup.php?takesignup=1">

I see a few of these errors in the code I have
im stupid. How do I test this mod? lol I uploaded the files after I backed up the originals, but I dont know how to test it. Do I have to set the site to "invite only" in the config? Shouldn't it use this
if (!$site_config['ENABLEINVITES'])

instead of this
if (!$site_config['INVITEONLY'])

Just wondering
did everyone run this? just out of stupid curiosity. Because if you didnt, there is no table
Execute this against your database using phpmyadmin or whatever you use. I still havent tested this. Im just looking at the code.
CREATE TABLE `invites` (
 `id` int(10) unsigned NOT NULL auto_increment,
 `inviter` int(10) unsigned NOT NULL default '0',
 `inviteid` int(10) NOT NULL default '0',
 `invite` varchar(32) NOT NULL default '',
 `time_invited` datetime NOT NULL default '0000-00-00 00:00:00',
 `confirmed` char(3) NOT NULL default 'no',
 PRIMARY KEY  (`id`),
 KEY `inviter` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
GLOBALS IS ALL CAPS. I hope your post was a typo lol
Oh, ok , very well then. 1 mistake found. In account-signup.php
find
    $id = mysqli_insert_id($GLOBALS[DBconnector]);

change to
   $id = mysqli_insert_id($GLOBALS["DBconnector"]);

double quotes missing. It would screw up everything if it cant connect to the database.
also, I guess you have to use the edits listed in the original mod? https://www.torrenttrader.xyz/index.php?threads/invite-code-system.3246/ There are quite a few edits that need to be done to that also. mysql_query needs changed, mysql_insert_id, etc
the files have a few short open php tags. Will cause issues if your php is set to not use open tags. Close the tags ie:<?php, not <? . I only saw this by looking at the code. I did not test this mod yet, so maybe after I give it a try I can help more, but I would start there
You can delete a NFO file on an existing torrent. This is very simple. I did this because I was trying to test something and the NFO was blowing my screen out. It was too big and caused me to have to scroll to the right to see the whole page. Rather than edit the database with phpmyadmin, I chose this method so anyone who uploads an NFO with bad formatting that destroys the page can remove it
in torrents-edit.php find
    $img2action = $_POST['img2action'];
   if ($img2action == "update")
       $updateset[] = "image2 = " .sqlesc(uploadimage(1, $row["image2"], $id));
   if ($img2action == "delete") {
       if ($row[image2]) {
           $del = unlink($site_config["torrent_dir"]."/images/$row[image2]");
           $updateset[] = "image2 = ''";
       }
   }

add after
    if ($nfoaction == "delete"){
        $updateset[] = "nfo = 'no'";
           }

find
echo "<tr><td class='table_col1'  align='right'><b>".T_("NFO").": </b><br /></td><td class='table_col2' ><input type='radio' name='nfoaction' value='keep' checked='checked' />Keep NFO &nbsp; <input type='radio' name='nfoaction' value='update' />Update NFO:";

replace with
echo "<tr><td class='table_col1'  align='right'><b>".T_("NFO").": </b><br /></td><td class='table_col2' ><input type='radio' name='nfoaction' value='keep' checked='checked' />Keep NFO <input type='radio' name='nfoaction' value='update' />Update NFO <input type='radio' name='nfoaction' value='delete'/>Delete NFO ";
[ATTACH type="full"]5080[/ATTACH]
wait times — 2019-06-26 23:11:54 in v3 Support
give everyone some GB upload to get started and see if that helps. This is a 2.08 mod, but should work fine on TTv3 https://www.torrenttrader.xyz/index.php?threads/give-positive-ratio-and-invites-to-new-users-on-signup-tt-2-08.22/

And yes, you should put those edits back that you removed :)

There is also a cleanup interval of 10 minutes, so any changes wouldnt be seen instantly
hmm, did you install this first? https://www.torrenttrader.xyz/index.php?threads/sticky-torrents-ttv3.9800/#post-66657
I actually installed this backwards by installing this mod first then I went back and installed the other one with the SQL edits and tested it and it appears to work fine. I am testing on TTv3
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728