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

Hi guys, first at all, i'm so sorry about the bad english.

After four years I will "play" again with tt, and my "first" contribution now will be a thing that is not really necessary but it was for me.

The torrent trader (at least in the version 2.08) send emails by "native" php function mail and by the mail class of pear.

In my case none of these methods worked, because I have a VPS poorly configurated.

Is so boring configure a local smtp for linux (to use native mail) and I don't have (and actually I don't want to know how) install the pear libraries, so I made a mod to send e-mail through the PHPMailer.

PHPMailer is a mail library (duh), but it's not updated anymore (I guess), but works fine.

OK, lets stop talk and begin write.

I'm using TorrenTrader 2.08 clean, no mods, no nothing (but it's not a trouble).

First, download the phpmailer library at [url="https://github.com/Synchro/PHPMailer"]https://github.com/Synchro/PHPMailer[/url] (official website in case they don't use git anymore [url="http://phpmailer.worxware.com/"]http://phpmailer.worxware.com/[/url]) and download the following files:

  • PHPMailerAutoload.php
  • class.phpmailer.php
  • class.pop3.php
  • class.smtp.php

Now create a folder called "phpmailer" on your trader root website (the upload folder) and put the four files there (please, don't rename them).

Fine! Now, let's edit your backend/mail.php file.

Find (49, 50):

                break;
            case "php":

and them replace by:

                break;
 
            case "phpmailer":
                $this->type = "phpmailer";
                $file_phpmailer_autoload = realpath(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'phpmailer' . DIRECTORY_SEPARATOR . 'PHPMailerAutoload.php';
                require_once $file_phpmailer_autoload;
                break;
 
            case "php":

Find (line 83, 84, 85, 86. 87?):

                $mail = $smtp->send($to, $headers, $message);
 
                break;
            case "php":
                @mail($to, $subject, $message, $additional_headers, $additional_parameters);

and them replace by:

                $mail = $smtp->send($to, $headers, $message);
 
                break;
 
            case "phpmailer":
                //Create a new PHPMailer instance
                $mail = new PHPMailer();
 
                //Tell PHPMailer to use SMTP
                $mail->isSMTP();
                $mail->IsHTML(true); //Set to true or false, you decide
 
                $mail->SMTPDebug = 0;
                $mail->Host = $site_config["mail_smtp_host"];
                $mail->Port = $site_config["mail_smtp_port"];
                $mail->SMTPAuth = $site_config["mail_smtp_auth"];
                if ($site_config["mail_smtp_ssl"]) {
                    $mail->SMTPSecure = "ssl";
                }
                $mail->Username = $site_config["mail_smtp_user"];
                $mail->Password = $site_config["mail_smtp_pass"];
 
                $mail->setFrom($site_config['SITEEMAIL'], $site_config['SITENAME']);
                $mail->addReplyTo($site_config['SITEEMAIL'], $site_config['SITENAME']);
 
                $mail->addAddress($to);
                $mail->Subject = $subject;
                $mail->msgHTML($message);
 
                @$mail->send();
 
                //Clear destinataries and attachments
                $mail->ClearAllRecipients();
                $mail->ClearAttachments();
 
 
                break;
 
            case "php":
                @mail($to, $subject, $message, $additional_headers, $additional_parameters);

Now, we have to configure our tracker to send e-mails via this new method, so, just if you want to change, edit your config.php

Find:

$site_config["mail_type"] = "???";

"???" will be "php" ou "pear". Now, change it for "phpmailer";

$site_config["mail_type"] = "phpmailer";

In the next lines, there are the smtp configuration, this I cant help you because it depends of your mail server.

If you will use gmail, use the following configurations:

$site_config["mail_smtp_host"] = "smtp.gmail.com"; // SMTP server hostname
$site_config["mail_smtp_port"] = "465"; // SMTP server port
$site_config["mail_smtp_ssl"] = true; // true to use SSL
$site_config["mail_smtp_auth"] = true; // true to use auth for SMTP
$site_config["mail_smtp_user"] = "all_the_text_before_the_@_of_your_email"; // SMTP username
$site_config["mail_smtp_pass"] = "your_gmail_password"; // SMTP password

I hope it can help someone.

PS.: I prefer phpmail because not always the servers has the native mail function well configurated (and most of the time the e-mail go to spam) and not always the servers has the pear libraries installed, so phpmailer should work better in the most of the time.

PPS.: phpmailer needs the php sockets working, so, phpmailer it's not 100% functional, but I NEVER see a server with socket for php disabled.

And for the lazy ones, I attached the phpmailer files here (just kidding, just in case of phpmailer blows-up)

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7017"]phpmailer.zip[/url]
When i start this mod, the tracker status change to: sending invalid data <NULL> and I find where is the error that give me that message.

//////Snatched////////////////////

$dt = gmtime() - 180;

$dt = sqlesc(get_date_time($dt));

/////////////////////////////////


But i can't see an error here.... I just add this and i have the error, I remove and the error gone... Help?
I mean, My Ideas to do new mods, Then, i have to copy/port the olders.
Really, my ideas are limited LOL...
It's like a container and every inside is only showed when click the button....

spoilers are... hmm... revelations of the "file" and can be hidden (hided, hide, don't know rofl)
sorry, don't understando so much english  :)

But your problem is with the uploaded image of the torrent?

Good ideia, I disable image upload in my tracker and I don't think this!
Wow, good, everyone is doing the best for torrenttrader.

tnx walker!
Dificulty: Easy

Instalation Time: Over 5 minutes

Obs.:

1 - Backup your files and database before install Any Mod/Addon/Hack.

2 - Used a New and clean TorrentTrader V2.05 Script of torrenttrader.

3 - Mod made running on localhost.

4 - Errors found on my tracker: Any

Hide xxx files

Hi, let's start the [MOD]ification;

First run this sql

ALTER TABLE `users` ADD `view_xxx` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' COMMENT 'see xxx';


Then... let's do the part where you can hide/show porn xxx category

In the account.php find:

$acceptpms = $CURUSER["acceptpms"] == "yes";
and before add:




	//Mod by williamokano

//Hide Porn XXX content

print("<TR><TD align=right class=table_col1><B>View XXX Torrents:</B> </TD><TD align=left class=table_col1><input type=checkbox name=view_xxx" . ($CURUSER["view_xxx"] == "yes" ? " checked" : "") . "> Please unselect this option if you would not like to view XXX torrents.</td></tr>");





Now... Find:





$acceptpms = $_POST["acceptpms"];





And before add:





$view_xxx = ($_POST["view_xxx"] != "" ? "yes" : "no");





Find:





$updateset[] = "acceptpms = ".sqlesc($acceptpms);





Before add:



$updateset[] = "view_xxx = ".sqlesc($view_xxx);





Now, we have finished in this file.





Now, backup and edit index.php





let's start



In index.php find:





begin_frame("Latest Torrents");





Below add



//Hide porn Mod By Williamokano

$wherea=array();

$wherea[] = "banned = 'no'";

$wherea[] = "visible = 'yes'";

//Here we define the categories blocked

if ($CURUSER["view_xxx"]!="yes") {

$wherea[] = "torrents.category != '26'";

$wherea[] = "torrents.category != '52'";

//an exemplo, change for your porn cat id

}

$where = implode(" AND ", $wherea);





Now find:





WHERE visible = 'yes' AND banned = 'no' ORDER





REPLACE by:





WHERE ". $where ." ORDER





Now.... let's go to the others pages hide more porn content



In the torrents.php find:





$wherea[] = "visible = 'yes'";





before add:





//Hide porn by williamokano

if ($CURUSER["view_xxx"]!="yes") {

$wherea[] = "category != '26'";

$wherea[] = "category != '52'";

}





Now, in torrents-search.php find:





$wherea[] = "banned = 'no'";





before add:





//hide porn by williamokano

if ($CURUSER["view_xxx"]!="yes") {

$wherea[] = "category != '52'";

$wherea[] = "category != '26'";

}




I think it be showed in some other places but it's hidden enough from the public.

Here's the original V1 Mod:

[url="http://www.torrenttrader.org/index.php?showtopic=2610"]http://www.torrenttrader.org/index.php?showtopic=2610[/url]

@author: nightmare

@ported: williamokano @ sauron [url="http://www.planetshare.org"]http://www.planetshare.org[/url]

Based, but not copied!
Let's go, it's so easy!

In functions.php find:

	// 
  • $s = preg_replace("/\[\*\]/", "<li>", $s);
  • Before add:




    	//[spoiler]TEXT[/spoiler]

    $s = preg_replace("/\[spoiler\]((\s|.)+?)\[\/spoiler\]/", "<div style=\"margin:0px 0px 0px 0px\">

    <div class=\"smallfont\" style=\"margin-bottom:0px\">

    <small><b><blink>May have revelations.<br>Click the button to show/hide.</blink><br></b></small><input type=\"button\" value=\"Show\" style=\"width:75px;font-size:10px;margin:0px;padding:0px;\" onclick=\"if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }\">

    </div>

    <div style=\"margin: 0px; padding: 0px; border: 0px inset;\">

    <div style=\"display: none;\">\\1</div></div>", $s);




    How to use...

    Use like this

    [*spoiler]text here[/*spoiler]

    remove the * from the tags!
    really be carefull, it's delete a lot of members....

    just for trcker cleaning,  :)

    I'ill revise the block again, but works cool here
    Hi, first, sorry about the bad english.

    Theres a Add-on for torrenttrader v2 script (I'm using 2.04 and works fine).

    Simple but usefull.

    Shows you if there are inactive torrents/users in yout tracker and them.... tchadammmm....

    You can delete them!

    Wow..... Suckz, but usefull for a tracker clean!  :)

    Now.... Let's to the code...

    Create a php files named logs.php

    <?php
    // P
    in the download.php

    Find:

    dbconn();







    below add:





    ////////////////////////bann download ///////////////////////////////////////////////////

    $subbanned = mysql_query("SELECT id FROM users WHERE id=$CURUSER[id] AND downloadbanned='no' LIMIT 1") or err('Tracker error (1)');

    if (mysql_num_rows($subbanned) < 1){

    show_error_msg("Error", "You have been banned from download.", 1);

    }
    Tnxxxx, Work Perfect
    100% working

    tnx
    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: 9
    • Members: 0
    • Guests online: 9
    • Comments: 3
    • Messages: 1,728