Members   Search      Help    Register    Login    Home
Today's Messages (off)  | Unanswered Messages (on)

Forum: Feature Request for 2.X
 Topic: gmail mod
gmail mod [message #5848] Mon, 21 November 2011 05:56
stevo66669 is currently offline stevo66669  Canada
Messages: 19
Registered: October 2011
Location: Canada
Leecher
hey is there any chance on converting this mod from tt to phpmbt?
it would go into the include/config file




// Mail settings
// php to use PHP's built-in mail function. or pear to use http://pear.php.net/Mail
// MUST use pear for SMTP
$site_config["mail_type"] = "pear";
$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"] = "username"; // SMTP username
$site_config["mail_smtp_pass"] = "password"; // SMTP password




There will ALWAYS be ONLY 1 Stevo, and thats me Smile
 Topic: pre time
icon3.gif  pre time [message #5294] Tue, 25 January 2011 21:20
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

possible to have pre time mod added to pmbt. thanks

 Topic: external upload section
external upload section [message #5133] Thu, 02 December 2010 22:43
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

ok what i think would be nice, is a cetegory for ext torrents with sub cats, movies, music, tv, apps, images, other., im wanting to show external torrents to the world and have private for registered users.

 Topic: ip protection
ip protection [message #4496] Mon, 19 July 2010 21:38
Daffy is currently offline Daffy  France
Messages: 359
Registered: October 2009
Location: uk
Releaser

would be good if a use changes his ip he gets logged out of site. e.g if logged in and ip changed, auto log them out, force log back in. also an email to the user letting him.her know, user signed in with ip and date/time.

 Topic: Freeleech for single user
Freeleech for single user [message #4113] Mon, 10 May 2010 21:08
Fantazy is currently offline Fantazy  Sweden
Messages: 69
Registered: April 2010
Seeder
A function to set freeleech for a single user in the users profile would be nice.

Is there a way to make that happen in 2.0.4 repack?


http://img26.imageshack.us/img26/443/42918339485.jpg
 Topic: news
news [message #3695] Tue, 02 March 2010 09:22
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

id like an easier way to add site news, like an edit button on the actual block instead of having to go to admin/settings. this feature would be alot better and kwiker imo.

 Topic: PMBT with vbulletin?
icon5.gif  PMBT with vbulletin? [message #3222] Sat, 21 November 2009 07:39
AJ1804 is currently offline AJ1804  New Zealand
Messages: 1
Registered: November 2009
Leecher
Hi i was wondering if it was possible to integrate vbulletin with pmbt? Instead of using phpBB?
 Topic: automated User purening
icon1.gif  automated User purening [message #2598] Sun, 03 May 2009 13:15
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
This is a update to the release By Revan for PMBT 1.X
This well delete inactive users from your site in 2 stages

First stage it well check users to see who has not been in for a set
period of time it well mark there account warned for inactivity and send them a E-mail notice telling them that they have not been active and that they have a set amount of time in which to return to the site in order not to be removed.

Second it well check to see who has been set inactive read the date set as inactive if the user has not returned in such time it well remove the account from both forum and tracker.

I had to do a lot of clean up on this as when I first tested Revans
release it would always send out a notice to new user on sign up confirmation which was not very good.
then I noticed that the notices where empty of the e-mail body so I had to fix this to
I also noted that the query's used to mark accounts as active and inactive would be ran for every user wich would cause a very high load on the data base so I had to move them in the code so
that it would only run one time for every page load.

I am going to make a admin page to allow you to set your warning dates and delete dates and so that you can turn it on and off with out
going threw data base.

so here it is let me know what you think

first is the sql you well need
this one is the configs of your prune system set it to what you want
CREATE TABLE IF NOT EXISTS `torrent_userautodel` (
  `inactwarning_time` int(10) NOT NULL default '0',
  `autodel_users_time` int(10) NOT NULL default '0',
  `autodel_users` enum('true','false') NOT NULL default 'true'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `torrent_userautodel` (`inactwarning_time`, `autodel_users_time`, `autodel_users`) VALUES
(30, 10, 'false');
ALTER TABLE `torrent_users` ADD `inactwarning` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `torrent_users` ADD `inactive_warn_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';

Now open include/config.php
then below this

if (!$row = $db->sql_fetchrow($configquery)) die("phpMyBitTorrent not correctly installed! Ensure you have run setup.php or config_default.sql!!");


add:

$sql = "SELECT * FROM ".$db_prefix."_userautodel LIMIT 1;";

$userautodel = $db->sql_query($sql,BEGIN_TRANSACTION);

if (!$userautodel) die("Configuration not found! Make sure you have installed phpMyBitTorrent correctly.");
if (!$row3 = $db->sql_fetchrow($userautodel)) die("phpMyBitTorrent not correctly installed! Ensure you have run setup.php or config_default.sql!!");




and below

$version = $row["version"];


add

$inactwarning_time = $row3["inactwarning_time"]*86400;
$autodel_users_time = $row3["autodel_users_time"]*86400;
$autodel_users = ($row3["autodel_users"] == "true") ? true : false;

Now here is the Cleanup.php parts you need
first find
        $db->sql_query("UPDATE ".$db_prefix."_torrents SET visible = 'no' WHERE type != 'link' AND tot_peer <= '".$down_limit."' AND UNIX_TIMESTAMP(last_action) < UNIX_TIMESTAMP(NOW()) - ".intval($dead_torrent_interval)." AND evidence != 1 AND (TRACKER IS NULL OR ".intval($autoscrape).");");
        $db->sql_query("UPDATE ".$db_prefix."_torrents SET visible = 'yes' WHERE tot_peer > '".$down_limit."';");

And add after
#prune users
if ($autodel_users)	
{
$userwarninactivesub = Array();
$userwarninactivesub[english] = "".$sitename." Warning";
$userwarninactivesub[german] = "".$sitename." Achtung";
$userwarninactivesub[spanish] = "Advertencia ".$sitename."";
$userwarninactivesub[brazilian] = "".$sitename." adverte";
$userwarninactivesub[portuguese] = "".$sitename." adverte";

$userwarninactivetext = Array();

$warntexten1 = "Hi,
we would like to warn you that you have not been active on **siteurl** for more than **inactwarning_time** days,
if you do not want to have your account deleted please login to it.
";
if ($autodel_users_time != 0)
{
$warntexten2 = "You have **autodel_users_time** days to log in from now. 
Otherwise we will delete your account permanently.";
}
else $warntexten2 = "";
$warntexten3 = "
Thanks **sitename** Admin
**siteurl**";
$userwarninactivetext[english] = "".$warntexten1.$warntexten2.$warntexten3."";


$warntextger1 = "Wir möchten darauf hinweisen , dass du auf **siteurl** seit mehr als **inactwarning_time** Tagen nicht mehr aktiv warst, 
wenn Du nicht willst, dass dein Account gelöscht wird, logge dich bitte ein. 
";
if ($autodel_users_time != 0)
{
$warntextger2 = "Du hast ab jetzt **autodel_users_time** Tage Zeit um dich auf **sitename** einzuloggen.
Ansonsten werden wir deinen Account permanent löschen.";
}
else $warntextger2 = "";
$warntextger3 = "
Danke**sitename**Admin.
**siteurl**";

$userwarninactivetext[german] = "".$warntextger1.$warntextger2.$warntextger3."";

$warntextspa1 = "Hola, 
Queriamos decirte que no visitaste nuestra pagina **siteurl** por mas de **inactwarning_time** dias.
Si no quieres que tu Cuenta sea borrada, por favor logueate. 
";
if ($autodel_users_time != 0)
{
$warntextspa2 = "Tienes **autodel_users_time** dias para loguearte nuevamente apartir de hoy.
De otra manera borraremos tu cuenta de forma permanente.";
}
else $warntextspa2 = "";
$warntextspa3 = "
Gracias. Los **sitename** administradores
**siteurl**";

$userwarninactivetext[spanish] = "".$warntextspa1.$warntextspa2.$warntextspa3."";

$warntextbra1 = "Oi,
Nós gostaríamos de avisa-lo que voce nao tem estado ativo no **siteurl** por mais de **inactwarning_time** dias.
Se voce nao quer ter sua conta excluída, por favor conecte-se. 
";
if ($autodel_users_time != 0)
{
$warntextbra2 = "Voce tem **autodel_users_time** dias a partir de hoje para fazer isso.
Caso contrário nós iremos apagar sua conta permanentemente.";
}
else $warntextbra2 = "";
$warntextbra3 = "
Obrigado **sitename** Administrador
**siteurl**";
$userwarninactivetext[brazilian] = "".$warntextbra1.$warntextbra2.$warntextbra3."";

$warntextpor1 = "Oi,
Nós gostaríamos de avisa-lo que voce nao tem estado ativo no **siteurl** por mais de **inactwarning_time** dias.
Se voce nao quer ter sua conta excluída, por favor conecte-se. 
";
if ($autodel_users_time != 0)
{
$warntextpor2 = "Voce tem **autodel_users_time** dias a partir de hoje para fazer isso.
Caso contrário nós iremos apagar sua conta permanentemente.";
}
else $warntextpor2 = "";
$warntextpor3 = "
Obrigado **sitename** Administrador
**siteurl**";

$userwarninactivetext[portuguese] = "".$warntextpor1.$warntextpor2.$warntextpor3."";

$sql = "SELECT id, email, inactwarning, lastlogin, language, ban FROM ".$db_prefix."_users WHERE ban != 1 AND inactwarning != 1 AND lastlogin != '0000-00-00 00:00:00' AND (UNIX_TIMESTAMP(lastlogin) < UNIX_TIMESTAMP(NOW()) - ".$inactwarning_time.") ;";
$res = $db->sql_query($sql)or btsqlerror($sql);
while ($get_info = $db->sql_fetchrow($res))
{
echo $get_info['id']."<br>";
logerror($get_info['id'].$get_info['email'].$get_info['inactwarning'].$get_info['lastlogin'], "prune time");
$replace_markers = Array("**sitename**","**siteurl**","**inactwarning_time**","**autodel_users_time**");
$replace_data = Array ("".$sitename."","".$siteurl."","".($inactwarning_time/86400)."","".($autodel_users_time/86400)."");
if ($get_info[language] == "") $get_info[language] = "english";
$warn_mail = new eMail;
$warn_mail->sender = $admin_email;
$warn_mail->subject = $userwarninactivesub[$get_info[language]];
$warn_mail->body = str_replace($replace_markers,$replace_data,$userwarninactivetext[$get_info[language]]);
$warn_mail->Add($get_info['email']);
$warn_mail->Send();
}
}
$db->sql_query("UPDATE ".$db_prefix."_users SET inactwarning = 0, inactive_warn_time = '0000-00-00 00:00:00' WHERE inactwarning = 1 AND (UNIX_TIMESTAMP(lastlogin) > UNIX_TIMESTAMP(NOW()) - ".$inactwarning_time.");");
$up_warn = "UPDATE ".$db_prefix."_users SET inactwarning = 1, inactive_warn_time = NOW() WHERE ((UNIX_TIMESTAMP(lastlogin) < UNIX_TIMESTAMP(NOW()) - ".$inactwarning_time.") AND ban != 1 AND lastlogin != '0000-00-00 00:00:00');";
$db->sql_query($up_warn)or btsqlerror($up_warn);

Now find this
        if ($autoscrape) multiscrape();
autoclean();

and add after
if ($autodel_users)
{
    $sql = "SELECT id FROM ".$db_prefix."_users WHERE inactwarning = 1 AND (UNIX_TIMESTAMP(inactive_warn_time) < UNIX_TIMESTAMP(NOW()) - ".$autodel_users_time.") AND inactwarning = 1;";
    $res = $db->sql_query($sql);
    while ($row = $db->sql_fetchrow($res))
    {
     removedinactive($row['id']);
    }
}

Now Open include functions.php
find
function ratingpic($num) {//Gets the correct star rating picture
        $r = round($num * 2) / 2;
        if ($r < 1 OR $r > 5) return;
        return pic($r."-rating.png");
}

And add after
function removedinactive($uid){
                        global $db, $db_prefix, $forumshare;
                        $sql = "SELECT username FROM ".$db_prefix."_users WHERE id = '".$uid."';";
                        $res = $db->sql_query($sql);
                        list ($username) = $db->sql_fetchrow($res);
                        $db->sql_freeresult($res);
                        if (empty($username)) return;
                        $sql = "SELECT avatar FROM ".$db_prefix."_users WHERE id = '".$uid."';";
                        $res = $db->sql_query($sql);
                        list ($avatar) = $db->sql_fetchrow($res);
                        $db->sql_freeresult($sql);
                        if (eregi("^user/",$avatar)) @unlink($avatar);
						if($forumshare AND get_user_forum_name($username)>=2)forum_delete($uid, $username);                        
                        $sql = Array();
                        $sql[] = "DELETE FROM ".$db_prefix."_tickets WHERE user = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_snatched WHERE userid = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_shouts WHERE user = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_download_completed WHERE user = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_privacy_backup WHERE master = '".$uid."' OR slave = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_privacy_file WHERE master = '".$uid."' OR slave = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_privacy_global WHERE master = '".$uid."' OR slave = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_comments_notify WHERE user = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_seeder_notify WHERE user = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_online_users WHERE id = '".$uid."';";
                        $sql[] = "UPDATE ".$db_prefix."_torrents SET owner = '0', ownertype = '2' WHERE owner = '".$uid."';";
                        $sql[] = "UPDATE ".$db_prefix."_peers SET uid = '0' WHERE uid = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_private_messages_blacklist WHERE master = '".$uid."' OR slave = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_private_messages_bookmarks WHERE master = '".$uid."' OR slave = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_private_messages WHERE recipient = '".$uid."';";
                        $sql[] = "DELETE FROM ".$db_prefix."_users WHERE id = '".$uid."';";

                        foreach ($sql as $query) {
                                $db->sql_query($query) or btsqlerror($sql);
                        }
} 


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Sun, 03 May 2009 13:25]

Report message to a moderator




Current Time: Thu Feb 09 20:27:05 GMT 2012

Total time taken to generate the page: 0.00807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software