Today's Messages (off)
| Unanswered Messages (on)
| Forum: PMBT 2.X Themes |
|---|
| Topic: category icons |
|---|
| | Topic: Some Icons |
|---|
| | Topic: dvtester |
|---|
| | Topic: Archer |
|---|
| Archer [message #2311] |
Mon, 09 February 2009 04:36 |
|
Attachment: Archer.rar
(Size: 466.31KB, Downloaded 165 times)
[Updated on: Sun, 07 June 2009 00:31]

|
|
| | Topic: Acidtech Tiger |
|---|
| | Topic: Acidtech Green |
|---|
| | Forum: General Help for 2.X |
|---|
| Topic: Search by Relevance & Search Exact Phrase |
|---|
| Search by Relevance & Search Exact Phrase [message #4667] |
Thu, 05 August 2010 18:22 |
watermolecule  Messages: 78 Registered: July 2010 |
Seeder |
|
|
We are trying to implement a Search by Relevance option in the Order By dropbox within the search page. We'd also like to implement a 'Search Exact Phrase' checkbok in the search page...
Has anyone had any luck modifying the search in PMBT? We'd like to hear from you / get some assistance.
Thanks
|
|
| | Topic: Error IRC Chat |
|---|
| Error IRC Chat [message #3948] |
Tue, 27 April 2010 13:21 |
|
|
startup erro: java.long.error:unable to load interface pixx:java.lang.securityException:trusted loaderattempted to loang
|
|
| | Topic: Login page |
|---|
| | Topic: currently browsing |
|---|
| currently browsing [message #3704] |
Wed, 03 March 2010 18:13 |
|
online user part where users are currently browsing. i notice alot say httperror, wondered where that was or how to stop it. also is it possible to add a part in the users profile for staff to see the current location of the user or say last location of the user.

|
|
| | Topic: httperror.php little fix |
|---|
| httperror.php little fix [message #3541] |
Mon, 18 January 2010 06:47 |
erika  Messages: 8 Registered: January 2010 |
Leecher |
|
|
In the file httperror.php ,check ($admin_email)...
if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
include("header.php");
switch ($errid) {
case 400: {
header("HTTP/1.0 400 Bad request");
bterror(str_replace("**email**",spellmail($admin_email),_http400errtxt),_http400errttl);
break;
}
case 401: {
header("HTTP/1.0 401 Access Denied");
bterror(str_replace("**email**",spellmail($admin_email),_http401errtxt),_http401errttl);
break;
}
case 403: {
header("HTTP/1.0 403 Forbidden");
bterror(str_replace("**email**",spellmail($admin_email),_http403errtxt),_http403errttl);
break;
}
case 404: {
header("HTTP/1.0 404 Access Denied");
bterror(str_replace("**email**",spellmail($admin_email),_http404errtxt),_http404errttl);
break;
}
case 500: {
header("HTTP/1.0 500 Internal Server Error");
bterror(str_replace("**email**",spellmail($admin_email),_http500errtxt),_http500errttl);
break;
}
}
include("footer.php");
?>
[Updated on: Mon, 18 January 2010 12:56] by Moderator
|
|
| | Topic: Torrent category viewer |
|---|
| Torrent category viewer [message #3149] |
Fri, 06 November 2009 19:39 |
dophert  Messages: 16 Registered: November 2009 |
Leecher |
|
|
Hey,
I want to have my categories viewed when i'm on the "Torrent" button. how to do that.
And how to create categories in categories like games>pc games
bv.
|
|
| | Topic: ip system |
|---|
| ip system [message #2923] |
Thu, 10 September 2009 20:21 |
|
replace
function getip() {
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && validip($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && validip($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR') && validip(getenv('HTTP_X_FORWARDED_FOR'))) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP') && validip(getenv('HTTP_CLIENT_IP'))) {
$ip = getenv('HTTP_CLIENT_IP');
} else {
$ip = getenv('REMOTE_ADDR');
}
}
return $ip;
}
with this in include/functions.php
function getip() {
$check = array('HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED',
'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED',
'HTTP_VIA', 'HTTP_X_COMING_FROM', 'HTTP_COMING_FROM');
foreach ($check as $c) {
if (ip_valid(&$_SERVER[$c])) {
return ip_first($_SERVER[$c]);
}
}
return $_SERVER['REMOTE_ADDR'];
}
function ip_first($ips) {
if (($pos = strpos($ips, ',')) != false) {
return substr($ips, 0, $pos);
} else {
return $ips;
}
}
function ip_valid($ips) {
if (isset($ips)) {
$ip = ip_first($ips);
$ipnum = ip2long($ip);
if ($ipnum !== -1 && $ipnum !== false && (long2ip($ipnum) === $ip)) { // PHP 4 and PHP 5
if (($ipnum < 167772160 || $ipnum > 184549375) && // Not in 10.0.0.0/8
($ipnum < -1408237568 || $ipnum > -1407188993) && // Not in 172.16.0.0/12
($ipnum < -1062731776 || $ipnum > -1062666241)) // Not in 192.168.0.0/16
return true;
}
}
return false;
}

|
|
| | Topic: Problem with user.php |
|---|
| Problem with user.php [message #2863] |
Thu, 06 August 2009 17:25 |
|
Hello.
I change in takeregister.php this line :
$sql = "INSERT INTO ".$db_prefix."_users (username, clean_username, email, password, act_key, regdate" . $passkeyrow . ") VALUES ('".addslashes($username)."', '".strtolower($username)."', '".addslashes($email)."', '".md5($password)."', '".$act_key."', NOW(),'1')" . $passkey .");";
And next :
OpenTable(_btsignup);
/*$replace_markers = Array("**sitename**","**siteurl**","**username**","**password**","**key**");
$replace_data = Array ($sitename,$siteurl,$username,$password,md5($act_key));
$confirm_mail = New eMail;
$confirm_mail->sender = $admin_email;
$confirm_mail->subject = $userregconfirmmailsub[$language];
$confirm_mail->body = str_replace($replace_markers,$replace_data,$userregconfirmmailtext[$language]);
$confirm_mail->Add($email);
$confirm_mail->Send();
echo "<p>"._btregcomplete.spellmail($admin_email)."</p>";
*/
echo "<p>You have been registerd with this site Thank You </p>";
*/
echo "<p>You have been registerd with this site Thank You </p>";
CloseTable();
And ok I don't have problem whit e-mail reg. but. When I logout then i get this error :
SQL Error
Error Executing SQL Query SELECT * FROM gustaff_prt_users WHERE username =''LIMIT 1
Error ID: 1146
Error Message: Table 'gustaff_prt.gustaff_prt_users' doesn't exist
And when I login on site : mysite.com/user.php then get blank site and must del /user.php for back logged on site.
Sory for my english
solved
[Updated on: Thu, 06 August 2009 23:09]
|
|
| | Topic: error |
|---|
| error [message #2603] |
Thu, 07 May 2009 22:05 |
evil  Messages: 25 Registered: May 2009 |
Leecher |
|
|
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(*) FROM torrent_casino_bets WHERE id = 2' at line 1
can anyone help sort this for me plz
i get that wen i took a bet in the casino
thank you
|
|
| | Forum: Feature Request for 2.X |
|---|
| Topic: ip protection |
|---|
| ip protection [message #4496] |
Mon, 19 July 2010 21:38 |
|
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 |
|
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?
|
|
| | Topic: poster mod |
|---|
| poster mod [message #4096] |
Sat, 08 May 2010 19:14 |
|
be good to have a mod where we can upload cover/image for torrents show up above file size .

|
|
| | Topic: news |
|---|
| news [message #3695] |
Tue, 02 March 2010 09:22 |
|
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? |
|---|
| | Topic: automated User purening |
|---|
automated User purening [message #2598] |
Sun, 03 May 2009 13:15 |
|
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);
}
}
[Updated on: Sun, 03 May 2009 13:25]

|
|
| | Forum: M0dZ & HaCkZ |
|---|
| Topic: new statistics table |
|---|
new statistics table [message #4740] |
Tue, 24 August 2010 20:10 |
|
Hope you like it firstly.
simply put statstable_blocks.php into blocks/ and browser, date.txt both into cache/ chmd to 666
add below to your index where you want to appear.
include ("blocks/statstable_blocks.php");
im in middle of adding the lotto stats to this. i will update once iv done more.

edited, almost done. gonna get high for a bit.
updated: 27/08/10
replace whole code inside statstable_blocks.php with below.
<?php
if (!defined('IN_PMBT')) die ("You can't access this file directly");
?>
<style type="text/css">
<!--
.rowhead {
color: #ffffff;
}
a:link, a:visited {
color: #ffffff;
}
.rowhead2 {
color: #ffffff;
}
-->
</style>
<?php
if ($user->user) {
OpenTable(Statistics);
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(lastlogin) > UNIX_TIMESTAMP(NOW()) - 86400;";
$res = $db->sql_query($sql);
list ($totuser) = $db->sql_fetchrow($res);
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(regdate) > UNIX_TIMESTAMP(NOW()) - 86400*7;";
$res = $db->sql_query($sql);
list ($totuser2) = $db->sql_fetchrow($res);
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(regdate) > UNIX_TIMESTAMP(NOW()) - 86400;";
$res = $db->sql_query($sql);
list ($totuser3) = $db->sql_fetchrow($res);
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_users;";
$res = $db->sql_query($sql);
list ($totuser4) = $db->sql_fetchrow($res);
//Total users
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_guests;";
$res = $db->sql_query($sql);
list ($guests) = $db->sql_fetchrow($res);
$sql = ("SELECT COUNT(id) FROM ".$db_prefix."_torrents WHERE leechers > 0 AND seeders = 0 ORDER BY leechers ");
$res = $db->sql_query($sql);
list ($needseed) = $db->sql_fetchrow($res);
//Total Torrents and their size
$sql = "SELECT COUNT(id), SUM(size) FROM ".$db_prefix."_torrents;";
$res = $db->sql_query($sql);
list ($tottorrent, $totshare) = $db->sql_fetchrow($res);
//Total peers and their speed
$sql = "SELECT COUNT(id), (SUM(upload_speed)+SUM(download_speed))/2 FROM ".$db_prefix."_peers;";
$res = $db->sql_query($sql);
list ($totpeers, $totspeed) = $db->sql_fetchrow($res);
//Total seeders and total leechers
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_peers GROUP BY seeder ORDER BY seeder ASC;";
$res = $db->sql_query($sql);
list ($totseeders) = $db->sql_fetchrow($res);
list ($totleechers) = $db->sql_fetchrow($res);
$sql = "SELECT COUNT(id) as cnt, client FROM ".$db_prefix."_peers WHERE client IS NOT NULL GROUP BY client ORDER BY cnt DESC LIMIT 1;";
$res = $db->sql_query($sql);
list ($cnt, $client) = $db->sql_fetchrow($res);
//topic count and post counts
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_forum_posts;";
$res = $db->sql_query($sql);
list ($postcount) = $db->sql_fetchrow($res);
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_forum_topics;";
$res = $db->sql_query($sql);
list ($topiccount) = $db->sql_fetchrow($res);
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_forumcats;";
$res = $db->sql_query($sql);
list ($forumcats) = $db->sql_fetchrow($res);
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_forum_forums;";
$res = $db->sql_query($sql);
list ($forumforums) = $db->sql_fetchrow($res);
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_forum_readposts;";
$res = $db->sql_query($sql);
list ($forumreadposts) = $db->sql_fetchrow($res);
//youtube
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_youtubevideo;";
$res = $db->sql_query($sql);
list ($youtubevideo) = $db->sql_fetchrow($res);
//countries
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_countries;";
$res = $db->sql_query($sql);
list ($countries) = $db->sql_fetchrow($res);
//languages
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_languages;";
$res = $db->sql_query($sql);
list ($languages) = $db->sql_fetchrow($res);
//Comments
$sql = "SELECT COUNT(id) FROM ".$db_prefix."_comments;";
$res = $db->sql_query($sql);
list ($ncomments) = $db->sql_fetchrow($res);
//lotto stats
$res = $db->sql_query("SELECT * FROM ".$db_prefix."_lottery_config");
while ($arr = $db->sql_fetchrow($res))
$arr_config[$arr['name']] = $arr['value'];
$who_won = explode("|", $arr_config['lottery_winners']);
$who_won = array_unique($who_won);
$lottery_winners = '';
for ($x = 0; $x < count($who_won); $x++){
$username = '';
$res2 = $db->sql_query("SELECT id, username, can_do FROM ".$db_prefix."_users");
while ($arr2 = $db->sql_fetchrow($res2))
{
if ($arr2['id'] == $who_won[$x])
{
$username = '<a href="user.php?op=profile&id='. $arr2['id'] .'"><font color="'.getusercolor($arr2["can_do"]).'">'. $arr2['username'] .'</font></a>';
$lottery_winners .= (!$lottery_winners) ? $username : ', '. $username;
break;
}
}}
if ($arr_config["ticket_amount_type"] == 'GB')
$arr_config['ticket_amount'] = 1024 * 1024 * 1024 * $arr_config['ticket_amount'];
else if ($arr_config["ticket_amount_type"] == 'MB')
$arr_config['ticket_amount'] = $arr_config['ticket_amount']*1024 * 1024;
$size = $arr_config['ticket_amount'];
$total = $db->sql_numrows($db->sql_query("SELECT * FROM ".$db_prefix."_tickets"));
$pot = $total * $size;
$pott = mksize($pot);
if ($arr_config["use_prize_fund"] == 1)$pott = mksize($arr_config['prize_fund']);
$endday = $arr_config['end_date'];
if ($arr_config["enable"])
$statas = '<img src=themes/NB-Media/pics/online.gif>';
else
$statas = '<img src=themes/NB-Media/pics/offline.gif>';
if (count($who_won) > 1)
$winners = 'Winners';
else
$winners = 'Winner';
if (count($who_won) > 1)
$each = ' (Each)';
else
$each = '';
if(ereg("Opera", getenv("HTTP_USER_AGENT"))) $browser = "opera";
else if(ereg("Chrome", getenv("HTTP_USER_AGENT"))) $browser = "chrome";
else if(ereg("MSIE", getenv("HTTP_USER_AGENT"))) $browser = "ie";
else if(ereg("Safari", getenv("HTTP_USER_AGENT"))) $browser = "safari";
else if((ereg("Nav", getenv("HTTP_USER_AGENT"))) || (ereg("Gold", getenv("HTTP_USER_AGENT"))) ||
(ereg("X11", getenv("HTTP_USER_AGENT"))) || (ereg("Mozilla", getenv("HTTP_USER_AGENT"))) ||
(ereg("Netscape", getenv("HTTP_USER_AGENT"))) )
$browser = "mozilla";
else $browser = "oth";
$mozilla=$ie=$safari=$opera=$chrome=$oth=0;
$revamp = false;
$date = date('d');
//echo $date;
if($date == "01")
{
$mon = date('m');
$open = fopen("cache/date.txt", "r");
$size = filesize("cache/date.txt");
$lines = fread($open, $size);
fclose($open);
if($mon != $lines)
{
$revamp = true;
$open = fopen("cache/date.txt", "w");
fwrite($open,$mon);
fclose($open);
}
else
{
$revamp = false;
}
}
if($revamp == false)
{
$lines = file("cache/browser.txt");
foreach ($lines as $line_num => $line)
{
//echo $line."<br>";
$fp = strpos($line,'****');
$nam = substr($line,0,$fp);
$sp = strpos($line,'++++');
$val = substr($line,$fp+4,$sp-($fp+4));
//echo($val."<br>");
//echo("-----------");
if($nam == "mozilla")
$mozilla = $val;
else if($nam == "ie")
$ie = $val;
else if($nam == "safari")
$safari = $val;
else if($nam == "opera")
$opera = $val;
else if($nam == "chrome")
$chrome = $val;
else if($nam == "oth")
$oth = $val;
}
}
if($browser == "mozilla")
$mozilla = $mozilla+1;
else if($browser == "ie")
$ie = $ie+1;
else if($browser == "safari")
$safari = $safari+1;
else if($browser == "opera")
$opera = $opera+1;
else if($browser == "chrome")
$chrome = $chrome+1;
else if($browser == "oth")
$oth = $oth+1;
$open = fopen("cache/browser.txt", "w");
fwrite($open,"ie****".$ie."++++"."\nmozilla****".$mozilla."++++"."\nsafari****".$safari."++++".
"\nopera****".$opera."++++"."\nchrome****".$chrome."++++".
"\noth****".$oth."++++");
fwrite($open,"\n");
fclose($open);
$tot = $mozilla+$ie+$safari+$opera+$chrome+$oth;
echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<td align=\"center\" valign=middle>
<table border=1 cellspacing=\"0\" cellpadding=\"2\">
<tr><td>Guests Online</td><td align=right >" . $guests . "</td></tr>
<tr><td>Members Online</td><td align=right >" . $user_now . "</td></tr>
<tr><td>Most Online 1 Time</td><td align=right >".$most_users_online."</td></tr>
<tr><td>Online past 24hour</td><td align=right >" . $totuser . "</td></tr>
<tr><td>Reg Past 7Days</td><td align=right >".$totuser2."</td></tr>
<tr><td>Reg Past 24hours</td><td align=right >".$totuser3."</td></tr>
<tr><td>Male users <img src=\"images/users/male.png\" title=\"Male\" alt=\"Male\"></td><td align=right >n/a</td></tr>
<tr><td>Female users <img src=\"images/users/female.png\" title=\"Female\" alt=\"Female\"></td><td align=right \">n/a</td></tr>
<tr><td>Total users <img src=\"images/users/na.png\" title=\"registered\" alt=\"registered\"></td><td align=right >".$totuser4."</td></tr>
<tr></tr>
</table></td>
<td align=\"center\" valign=middle>
<table border=1 cellspacing=\"0\" cellpadding=\"2\">
<tr><td>Transfer Speed</td><td align=right >".mksize($totspeed)."/s</td></tr>
<tr><td>Torrents</td><td align=right >".$tottorrent."</td></tr>
<tr><td>Total Seeders</td><td align=right >".$totseeders."</td></tr>
<tr><td>Total Leechers</td><td align=right >".$totleechers."</td></tr>
<tr><td>Torrents NeedSeed</td><td align=right >".$needseed."</td></tr>
<tr><td>External</td><td align=right >-</td></tr>
<tr><td>New Today</td><td align=right >".$tottoday."</td></tr>
<tr><td>Peers</td><td align=right >$totpeers</td></tr>
<tr><td>Total Share Data</td><td align=right >".mksize($totshare)."</td></tr>";
echo "<tr></tr>";
echo"</td></table>
<td align=\"center\" valign=middle>
<table border=1 cellspacing=\"0\" cellpadding=\"2\">
<tr><td>Forums</td><td align=right >".$forumforums."</td></tr>
<tr><td>Categorys</td><td align=right >".$forumcats."</td></tr>
<tr><td>Topics</td><td align=right >".$topiccount."</td></tr>
<tr><td>Posts</td><td align=right >".$postcount."</td></tr>
<tr><td>Posts Read</td><td align=right >".$forumreadposts."</td></tr>
<tr><td>Comments Posted</td><td align=right >".$ncomments."</td></tr>
<tr><td>Movie Trailers</td><td align=right >".$youtubevideo."</td></tr>
<tr><td>Countries</td><td align=right >".$countries."</td></tr>
<tr><td>Best Client - ".$client."</td><td align=right >".$cnt."</td></tr>
</table></td>
<td align=\"center\" valign=middle>
<table border=1 cellspacing=\"0\" cellpadding=\"2\" width=140>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/moz.png\" border=\"0\" alt=\"Mozilla\"></td><td> ".(round($mozilla*10000/$tot)/100)." %</td></tr>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/chr.png\" border=\"0\" alt=\"Google Chrome\"></td><td> ".(round($chrome*10000/$tot)/100)." %</td></tr>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/ie.png\" border=\"0\" alt=\"Internet Explorer\"></td><td> ".(round($ie*10000/$tot)/100)." %</td></tr>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/saf.png\" border=\"0\" alt=\"Safari\"></td><td> ".(round($safari*10000/$tot)/100)." %</td></tr>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/opera.png\" border=\"0\" alt=\"Opera\"></td><td> ".(round($opera*10000/$tot)/100)." %</td></tr>";
echo "<tr><td><img src=\"".$site_config["SITEURL"]."/images/stats/oth.png\" border=\"0\" alt=\"Others\"></td><td> ".(round($oth*10000/$tot)/100)." %</td></tr>";
echo "<tr></tr>
</table></td>
<td align=\"center\" valign=middle>
<table border=1 cellspacing=\"0\" cellpadding=\"2\">";
echo "<tr><td>Lottery Status</td><td>" .$statas. "</td></tr>";
echo "<tr><td>Current Prize</td><td>".$pott."</td></tr>";
echo "<tr><td>Tickets Sold</td><td>".$total."</td></tr>";
echo "<tr><td>Last Lottery Winner(s)</td><td>" .count($who_won).$winners. "</td></tr>";
echo "<tr><td>Last Lottery Winner</td><td>".$lottery_winners."</td></tr>";
echo "<tr><td>Date Of Last Lottery</td><td>" .$arr_config["lottery_winners_time"]."</td></tr>";
echo "<tr><td>Lottery Ends</td><td>" .$endday. "</td></tr>";
if ($arr_config["enable"])echo "<tr><td>Purchase Tickets</td><td><a href=\"tickets.php\"><font color=limegreen>Here</font></a></td></tr>";
echo "<tr></tr>
</table></td>
</td></table>";
CloseTable();
}
?>
added attachtment images.rar (unpack)
add users/ and stats/ folders into images/
[Updated on: Sat, 28 August 2010 00:22]

|
|
| | Topic: staff links block |
|---|
| | Topic: speed test hack |
|---|
| speed test hack [message #4376] |
Sun, 04 July 2010 10:16 |
firefly007  Messages: 41 Registered: May 2010 |
Leecher |
|
|
<?php
/*
*------------------------------phpMyBitTorrent V 2.0.4-------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*-------------- Created By Antonio Anzivino (aka DJ Echelon) --------------*
*------------- http://www.p2pmania.it -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*------------- http://www.bittorrent.com -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*-- This program is free software; you can redistribute it and/or modify --*
*-- it under the terms of the GNU General Public License as published by --*
*-- the Free Software Foundation; either version 2 of the License, or --*
*-- (at your option) any later version. --*
*-- --*
*-- This program is distributed in the hope that it will be useful, --*
*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*
*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*
*-- GNU General Public License for more details. --*
*-- --*
*-- You should have received a copy of the GNU General Public License --*
*-- along with this program; if not, write to the Free Software --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --*
*-- --*
*------------------------------------------------------------------------------*
*------ ©2009 phpMyBitTorrent Development Team ------*
*----------- http://phpmybittorrent.com -----------*
*------------------------------------------------------------------------------*
*----------------- Sunday, September 14, 2008 9:05 PM ---------------------*
*/
if (eregi("main.php",$_SERVER["PHP_SELF"])) die ("You can't access this file directly");
define("IN_PMBT",true);
include("header.php");
OpenTable("Speed test");
?>
<iframe src="********/speedtest/meter.php" width=900 height=1000 align=right>
This is an in-line frame. You can <a href="">framesrc.html</a> and then hit your back arrow to return to the page.
</iframe>';
<?
CloseTable();
include("footer.php");
?>
This is for mybitorrent 2 and up.
call this file speedtest.php
make sure you replace the stars with your site url.
Then download the rar file and copy to root.
then unrar and upload dir keeping the file in the folder
Attachment: speed.rar
(Size: 3.17KB, Downloaded 14 times)
[Updated on: Thu, 22 July 2010 23:18]

http://www.gower.co.za
|
|
| | Topic: Guest Online/log Script! |
|---|
| Guest Online/log Script! [message #4351] |
Mon, 28 June 2010 21:32 |
Hasan  Messages: 89 Registered: April 2010 |
Seeder |
|
|
A little script I made..( Used codes from other script and made this)
I'm still new too php so please be gentle o.o
In this script you can see guest/user online last 5 mins(you can chose how long time as well)and there will be added a log too..
You can see how it looks in my side wwww.u-torrentz.org, Just scroll down.
1) Install the Sql ( remember to change CHARSET to "latin1" when you import the sql file)
Code:
CREATE TABLE `guest` (
`time` int(15) NOT NULL default '0',
`ip` varchar(50) NOT NULL default '',
`browser` varchar(50) NOT NULL default '',
PRIMARY KEY (`time`)
)ENGINE=MyISAM DEFAULT CHARSET=latin1;
2) Upload the online.php file in you root ( You can mod it and add so you can see ip by adding "ip" or do other mods o.o)
3)
Add this code where ever you want it to... (easily too mod)
//Guest Online
$db_host = "localhost";
$db_user = "User-name";
$db_pass = "Password";
$db_name = "DATABASE";
$dbc = mysql_connect($db_host, $db_user, $db_pass);
$dbs = mysql_select_db($db_name);
$tm = time();
$timeout = $tm - (300); //300 is 5 mins
if($_SERVER["REMOTE_ADDR"]){$ip=$_SERVER["REMOTE_ADDR"
];}
else{$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];}
$brws = explode("(",$_SERVER["HTTP_USER_AGENT"]);
$browser = $brws[0];
mysql_query("INSERT INTO guest SET time='".$tm."', ip='".$ip."', browser='".$browser."'");
$delete = mysql_db_query($db_name, "DELETE FROM guest WHERE time<$timeout");
if(!($delete)) {
print "";
}
$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM guest"));
mysql_close();
echo "<br/><a href=\"online.php\"><b>Total Guest Online In Last 5 mins:</b> $count[0]</a><br/>";
Here you go
Attachment: online.php
(Size: 0.82KB, Downloaded 13 times)
My site www.u-torrentz.org
|
|
| | Topic: world cup map |
|---|
| | Topic: Poster with glossy style, nice effect |
|---|
| Poster with glossy style, nice effect [message #4349] |
Mon, 28 June 2010 13:28 |
|
open main.php in your theme/s
find at the bottom. yours may look a little diff
function themefooter(){
global $db, $db_prefix, $startpagetime, $theme, $siteurl, $user, $upload_level, $sitename, $gfx_check, $donations, $INVITEONLY,$onlysearch, $pivate_mode, $forumshare, $shout_config, $PHP_SELF, $_SERVER;
and add below
echo '<script type="text/javascript" src="js/glossy.js"></script>';
now open include/functions.php
find
"<a href=\"\\1\" target=\"_blank\"><img border=0 src=\"\\1\" onLoad='SetSize(this, 300)'></a>",
"<a href=\"\\1\" target=\"_blank\"><img border=0 src=\"\\1\" onLoad='SetSize(this, 300)'></a>",
and change to this or alter as your see if yours is modified
"<a href=\"\\1\" target=\"_blank\"><img class=glossy border=0 src=\"\\1\" onLoad='SetSize(this, 300)'></a>",
"<a href=\"\\1\" target=\"_blank\"><img class=glossy border=0 src=\"\\1\" onLoad='SetSize(this, 300)'></a>",
basically adding
unpack attatched rar, upack and place glossy directory into your root/js folder.

Attachment: glossy.rar
(Size: 3.35KB, Downloaded 12 times)
[Updated on: Mon, 28 June 2010 13:38]

|
|
| | Topic: New releases section |
|---|
| New releases section [message #4282] |
Sun, 13 June 2010 15:12 |
firefly0777  Messages: 10 Registered: June 2010 Location: south africa |
Leecher |
|
|
Hi Joe and company.
It would be very helpful to have a new release section
on the tracker with a pre time ability.
This is what I would like.A new releases section page with the ability of pre time auto detect release function or so the ability to auto move it after a specified time frame to the main page.
I do know that it is possible because ive seen it on another site.
This will be a powerful and useful thing to have.
thanks
[Updated on: Sun, 13 June 2010 15:15]
|
|
| | Topic: Modded Torrent table |
|---|
| Modded Torrent table [message #3902] |
Sun, 18 April 2010 00:32 |
|
this is to make your torrent tables match your themes.
open include/bittorrent.php
find
<?php function torrenttable($res, $variant = "index", $user = "", $block = "") {
global $db, $name, $search, $user, $download_level, $torrent_global_privacy, $onlysearch, $db_prefix, $autoscrape, $theme, $btback1, $btback2, $btback3, $free_dl; ?>
add after that
<?php if(function_exists('theme_torrenttable'))return theme_torrenttable($res, $variant, $user, $block); ?>
Now go the your themes folder ((Themes/pmbt))
create new file bittorrrent.php and add to it
<?php
/*
*----------------------------phpMyBitTorrent V 2.0.4---------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*-------------- Created By Antonio Anzivino (aka DJ Echelon) --------------*
*------------- http://www.p2pmania.it -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*------------- http://www.bittorrent.com -------------*
*----------------------------------------------------------- -------------------*
*----------------------------------------------------------- -------------------*
*-- This program is free software; you can redistribute it and/or modify --*
*-- it under the terms of the GNU General Public License as published by --*
*-- the Free Software Foundation; either version 2 of the License, or --*
*-- (at your option) any later version. --*
*-- --*
*-- This program is distributed in the hope that it will be useful, --*
*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*
*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*
*-- GNU General Public License for more details. --*
*-- --*
*-- You should have received a copy of the GNU General Public License --*
*-- along with this program; if not, write to the Free Software --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --*
*-- --*
*----------------------------------------------------------- -------------------*
*------ ©2005 phpMyBitTorrent Development Team ------*
*----------- http://phpmybittorrent.com -----------*
*----------------------------------------------------------- -------------------*
*----------------- Sunday, September 14, 2008 9:05 PM ---------------------*
*/
function theme_torrenttable($res, $variant = "index", $user = "", $block = "") {
global $db, $name, $search, $user, $download_level, $torrent_global_privacy, $onlysearch, $db_prefix, $autoscrape, $theme, $btback1, $btback2, $btback3, $free_dl, $prev, $pages, $pager, $next;
$utc = $btback1;
$phpself = $_SERVER['PHP_SELF'];
echo <<<EOF
<script type="text/javascript" language="JavaScript">
var expanded = 0;
function expand(id) {
if (expanded == id) return;
var obj;
var obj2;
obj = document.getElementById("userpanel_"+id);
obj.className = 'show';
if (expanded != 0) {
obj2 = document.getElementById("userpanel_"+expanded);
obj2.className = 'hide';
}
expanded = id;
}
function toggle(nome) {
if(document.getElementById(nome).style.display=='none')
{
document.getElementById(nome).style.display = '';
document.getElementById(nome+"img").src="http://bvlist.com/i mages/collapse.png";
} else {
document.getElementById(nome).style.display = 'none';
document.getElementById(nome+"img").src="http://bvlist.com/i mages/expand.png";
}
}
</script>
EOF;
?>
<?php
$count_get = 0;
foreach ($_GET as $get_name => $get_value) {
if ($get_name != "sort" && $get_name != "type") {
if ($count_get > 0) {
$oldlink = $oldlink . "&" . $get_name . "=" . $get_value;
} else {
$oldlink = $oldlink . $get_name . "=" . $get_value;
}
$count_get++;
}}
if ($count_get > 0) {
$oldlink = "?" . $oldlink . "&";
}else{
$oldlink = "?";
}
if ($_GET['sort'] == "1") {
if ($_GET['type'] == "desc") {
$link1 = "asc";
} else {
$link1 = "desc";
}
}
if ($_GET['sort'] == "2") {
if ($_GET['type'] == "desc") {
$link2 = "asc";
} else {
$link2 = "desc";
}
}
if ($_GET['sort'] == "3") {
if ($_GET['type'] == "desc") {
$link3 = "asc";
} else {
$link3 = "desc";
}
}
if ($_GET['sort'] == "4") {
if ($_GET['type'] == "desc") {
$link4 = "asc";
} else {
$link4 = "desc";
}
}
if ($_GET['sort'] == "5") {
if ($_GET['type'] == "desc") {
$link5 = "asc";
} else {
$link5 = "desc";
}
}
if ($_GET['sort'] == "6") {
if ($_GET['type'] == "desc") {
$link6 = "asc";
} else {
$link6 = "desc";
}
}
if ($_GET['sort'] == "7") {
if ($_GET['type'] == "desc") {
$link7 = "asc";
} else {
$link7 = "desc";
}
}
if ($_GET['sort'] == "8") {
if ($_GET['type'] == "desc") {
$link8 = "asc";
} else {
$link8 = "desc";
}
}
if ($_GET['sort'] == "9") {
if ($_GET['type'] == "desc") {
$link9 = "asc";
} else {
$link9 = "desc";
}
}
if ($link1 == "") { $link1 = "asc"; } // for torrent name
if ($link2 == "") { $link2 = "desc"; }
if ($link3 == "") { $link3 = "desc"; }
if ($link4 == "") { $link4 = "desc"; }
if ($link5 == "") { $link5 = "desc"; }
if ($link6 == "") { $link6 = "desc"; }
if ($link7 == "") { $link7 = "desc"; }
if ($link8 == "") { $link8 = "desc"; }
if ($link9 == "") { $link9 = "desc"; }
if ($variant == "index")
{
OpenTable(" ");
echo "<p class=\"explane\">"._btmfreetorrentexplain."</p><br><br>";
echo "<p class=\"explane\">"._btmnuketorrentexplain."</p>";
CloseTable();
}
echo "<table border=\"0\" width=\"100%\"><tr><td align=\"left\" ><p>".$prev."</p></td><td align=\"center\"><p>".(($pages > 1) ? $pager : "")."</p></td><td align=\"right\"><p>".$next."</p></td></tr></table>";
echo "<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\" >\n";
echo"<tbody><tr>\n";
echo"<td class=\"colhead\" align=\"center\"><a href=\"$phpself?sort=4&type=$link4\" title=\"Sort by "._bttype." ".$link4."\">"._bttype."</a></td>\n";
echo"<td class=\"colhead\" align=\"left\"><a href=\"$phpself".$oldlink."sort=1&type=$link1\" title=\"Sort by "._btname." ".$link1."\">"._btname."</a></td>\n";
echo"<!--<td class=\"heading\" align=left>DL</td>-->\n";
echo"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">".pic("completed.gif",null,_btnfile)."</a></td>\n";
echo"<td class=\"colhead\" align=\"right\">".pic("icon_comment.png",null,_bt_offers_comments)."</td>\n";
echo"<td class=\"colhead\" align=\"center\">".pic("icon_rating.png",null,_btvote)."</td>\n";
echo"<td class=\"colhead\" align=\"center\">"._btadded."</td>\n";
//echo"<td class=\"colhead\" align=\"center\"><a href=\"browse.php?sort=added&h=7&d=DESC\" >Time Alive</a></td>\n";
echo"<td class=\"colhead\" align=\"center\">".pic("pic_ratio.gif",null,_btpeerspeed)."</td>\n";
echo"<td class=\"colhead\" align=\"center\"><a href=\"$phpself".$oldlink."sort=5&type=$link5\" title=\"Sort by Number of files ".$link5."\">".pic("icon_size.png",null,_btsize)."</a></td>\n";
echo"<!--\n";
echo"<td class=\"colhead\" align=right>Views</td>\n";
echo"<td class=\"colhead\" align=right>Hits</td>\n";
echo"-->\n";
echo"<td class=\"colhead\" align=\"center\">"._bthits."</td>\n";
echo"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=7&type=$link7\" title=\"Sort by "._btseeders." ".$link7."\">".pic("pic_uploaded.gif",null,_btseeders)."</a></td>\n";
echo"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=8&type=$link8\" title=\"Sort by "._btleechers." ".$link8."\">".pic("pic_downloaded.gif",null,_btleechers)."</a></td>\n";
if ($variant == "index")echo"<td class=\"colhead\" align=\"center\">"._btaddedby."</td>\n";
echo"</tr>\n";
while ($row = $db->sql_fetchrow($res)) {
$id = $row["id"];
echo"<tr>\n";
echo"<td style=\"padding: 0px;\" align=\"center\">";
if (isset($row["cat_name"])) {
if (!$onlysearch AND $variant == "index") echo "<a href=\"$phpself?cat=".$row["category"]."\">";
if (isset($row["cat_pic"]) AND $row["cat_pic"] != "" AND is_readable("themes/".$theme."/pics/cat_pics/".$row["cat_pic"]))
echo "<img border=\"0\" src=\"themes/" . $theme . "/pics/cat_pics/". $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" >";
elseif (isset($row["cat_pic"]) AND $row["cat_pic"] != "" AND is_readable("cat_pics/".$row["cat_pic"]))
echo "<img border=\"0\" src=\"cat_pics/" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" >";
else
echo $row["cat_name"];
if (!$onlysearch AND $variant == "index") echo "</a>";
} else echo "-";
echo"</td>\n";
echo"<td align=\"left\">";
$imgs = 0;
//help(pic ("help.gif","",null),preg_replace("/[^0-9a-z -< >._#]/i",'',$row["descr"]),$dispname);
if($row["ratiobuild"] == "yes" || $free_dl) {help(pic ("magic.gif","",null),"This File Is Set As A Ratio Builder Yuor Download Is Not Counted Only your Upload");$imgs++; }
if($row["nuked"] == "yes") {help(pic ("nuked.gif","",null),"This File Has Been Nuked. Wich meens It may have parts missing Sound is off time or some other troubles so download at your own risk"); $imgs++; }
if ($row["evidence"] != 0) { echo pic("sticky.gif",null,_btalt_sticky); $imgs++; }
if ($row["banned"] == "yes") { echo pic("banned.png",null,_btalt_banned); $imgs++; }
if ($row["type"]=="link") { echo pic("minidonkey.gif",$row["ed2k"],_btalternatesource); $imgs++; }
if ($row["tracker"] != "" AND $row["tracker"] != "dht:") { echo pic("external.gif",null,_btalt_external); $imgs++; }
if ($imgs == 2) { echo "<br>"; $imgs = 0; }
if ($row["dht"] == "yes" AND $variant != "mytorrents") { help(pic("dht.gif","",null),_btdhtexplanation,_btdht); $imgs++; }
$dispname = htmlspecialchars($row["name"]);
$dispname = str_replace("_", " ", $dispname);
$dispname = str_replace(".", " ", $dispname);
echo "<nobr><p class=\"title\"><a STYLE=\"text-decoration:none\" href=\"details.php?id=".$id;
if ($row["owner"] != $user->id)
echo "&hit=1";
echo "\" title=\"".$dispname."\"><nobr>".((strlen($dispname) <= 37) ? search_word($dispname, $search): search_word(substr($dispname,0,36)."...", $search))."</a></p>";
if ((checkaccess("download")) AND $row["type"] != "link") echo"<a class=\"index\" href=\"download.php?id=".$row["id"]."\"><img style=\"border: medium none ;\" alt=\"download\" src=\"themes/acidtech/pics/download2.gif\" align=\"right\" >";
echo"</nobr></a>";
if ($variant == "index" OR $variant == "usertorrent") echo "<br>";
//Edit & Delete
if ($user->moderator OR ($row["owner"] == $user->id AND $row["owner"] != "0")) echo pic("edit.gif","edit.php?id=".$row["id"],_btalt_edit).pic("drop.gif","edit.php?op=delete&id=".$row["id"],_btalt_drop);
// Ban
if ($user->moderator AND $row["banned"] != "yes"){
echo pic("ban.png","edit.php?op=ban&id=".$row["id"],_btban);
}
//Scrape
if ($row["tracker"] != "") {
if ($user->user){
if (time()- sql_timestamp_to_unix_timestamp($row["tracker_update"])> 1800) {
echo pic("refresh.png","scrape-external.php?id=".$row["id"]."&tracker=".$row["tracker"]."&return=". urlencode($_SERVER["REQUEST_URI"]),_btalt_scrape);
}else{
echo pic("refresh_gray.png",NULL,_btalt_noscrape);
}
}elseif ($user->moderator){
echo pic("refresh.png","scrape-external.php?id=".$row["id"]."&tracker=".$row["tracker"]."&return=". urlencode($_SERVER["REQUEST_URI"]),_btalt_scrape);
}else{
echo pic("refresh_gray.png","scrape-external.php",_btalt_logintoscrape);
}
}
//Permission Administration
if ($torrent_global_privacy AND $user->user AND $row["type"] != "link") {
if ($row["owner"] == $user->id) {
$pic = "auth_none.gif";
$authsql = "SELECT status FROM ".$db_prefix."_privacy_file WHERE torrent = '".$row["id"]."' AND status = 'pending';";
$authres = $db->sql_query($authsql) or btsqlerror($authsql);
if ($db->sql_numrows($authres) > 0) $pic = "auth_pending.gif";
echo pic($pic,"mytorrents.php?op=displaytorrent&id=".$row["id"]);
} elseif (!can_download($user,$row)) {
$authres = $db->sql_query("SELECT status FROM ".$db_prefix."_privacy_file WHERE torrent = '".$row["id"]."' AND slave = '".$user->id."' LIMIT 1;");
if ($db->sql_numrows($authres) == 0) echo pic("lock_request.gif","details.php?op=authorization&id=".$row["id"],_btalt_lock_request);
else echo pic("lock.gif",null,_btalt_lock);
}
}
if ($variant == "index")echo"<br /><span id=ID" . $row["id"] . "><a onclick=\"sndReq('op=view_details&torrent=" . $row["id"] . "', 'ID" . $row["id"] . "')\">".pic("plus.gif","",_btddetails)."</a></span>";
echo"</td>\n";
echo"<td align=\"right\">";
if ($variant == "index" OR $variant == "usertorrent") {
//Size
if ($row["type"] == "single" OR $row["numfiles"] <= 1)
echo("<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" .$row["numfiles"]."</a>");
else {
if ($row["owner"] != $user->id)
echo "<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" . $row["numfiles"] . "</a>";
else
echo "<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" . $row["numfiles"] . "</a>";
}
}
echo"</td>\n";
echo"<td align=\"right\">";
if (!$row["comments"])
print($row["comments"] . "");
else {
$hit = ($row["owner"] == $user->id) ? "" : "&hit=1";
echo "<b><a href=\"details.php?id=".$row["id"].$hit."&comm=startcomments\">" . $row["comments"] . "</a></b>";
}
echo"</td>\n";
echo"<td align=\"center\">";
if (!isset($row["rating"]))
echo "---";
else {
$rating = round($row["rating"] * 2) / 2;
$rating = ratingpic($row["rating"]);
if (!isset($rating))
echo "---";
else
echo ($rating);
}
echo"</td>\n";
echo"<td align=\"center\">".$row['added']."</td>\n";
//echo"<td align=\"center\">10<br>hours</td>\n";
echo"<td align=\"center\">";
if ($row["type"] != "link" AND $row["tracker"] == "") {
if ($row["leechers"] > 0 AND $row["speed"] > 0) {
$ro = $row["seeders"]/$row["leechers"];
$speed_leech = ($ro == 0) ? round($row["speed"]/$row["leechers"]) : min($row["speed"],round($row["speed"]*$ro));
$edt_m = ($row["size"] / $speed_leech)/60; //to minutes
$edt = ($edt_m % 60)."m"; //minutes
$edt_h = floor($edt_m / 60);
if ($edt_h>0) $edt = $edt_h."h ".$edt;
$speed_leech = mksize($speed_leech)."/s";
} else {
$speed_leech = "--";
$edt = "--";
}
}
echo"".mksize($row["speed"])."/s</td>\n";
echo"<td align=\"center\">".mksize($row["size"])."</td>\n";
$totsql = "SELECT count(`torrentid`)as `snatch` FROM `torrent_snatched` WHERE `torrentid` = '".$row["id"]."'";
$totres = $db->sql_query($totsql);
$sncount = $db->sql_fetchrow($totres);
echo"<td align=\"center\">".$sncount['snatch']."<br>times</td>\n";
echo"<td align=\"right\"><b>".$row["seeders"]."</b></td>\n";
echo"<td align=\"right\"><b>".$row["leechers"]."</b></td>\n";
if ($variant == "index"){
echo"<td align=\"center\">";
if ($variant == "index") {
if (isset($row["username"]) AND $row["ownertype"]==0) {
echo "<a href=\"user.php?op=profile&username=".$row["username"]."\"><font color=\"".getusercolor($row["can_do"])."\">" . htmlspecialchars($row["user_name"])."</font></a>";
} else
echo "(<i>"._btunknown."</i>)";
}
}
echo"</a></td>\n";
echo"</tr>\n";
}
return;
}
?>
Now in same folder open main.php
find
<?php function OpenTable( ?>
and add before
<?php include_once'themes/'.$theme.'/bittorrent.php'; ?>
You may need a few images for the one I made if so let me know I well post them

|
|
| | Topic: Birthday Mod |
|---|
| | Topic: shoutcast radio |
|---|
| | Topic: comming up a DUTCH translation |
|---|
| comming up a DUTCH translation [message #3345] |
Sun, 13 December 2009 14:29 |
fammudde  Messages: 3 Registered: December 2009 Location: Schiedam netherlands |
Leecher |
|
|
a LONG time ago already talked about it with joe, finally working on it.
because of my busy life at the moment i HOPE to finish te translation around the next week ( somewhere around the 18th )
Stats for translation: 25% done
UPDATE 04-01-2010: ok because some prived shit i havent any time but now i do (A) so lets translate the stuff! i start working on it again
[Updated on: Mon, 04 January 2010 11:49]
|
|
| | Topic: you tube |
|---|
| | Topic: IMDB |
|---|
| | Topic: MP3 Player |
|---|
| MP3 Player [message #3097] |
Fri, 30 October 2009 23:57 |
|
nice mp3 player will work on all sources and scripts.
add mp3 folder to root directory.
place this where you want to show.
OpenTable(MediaPlayer);
echo "<center>\n";
echo "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"150\" height=\"141\" id=\"clock\" align=\"middle\">\n";
echo "<param name=\"movie\" value=\"mp3/player.swf\" />\n";
echo "<param name=\"quality\" value=\"high\" />\n";
echo "<param name=\"scale\" value=\"exactfit\" />\n";
echo "<param name=\"wmode\" value=\"transparent\" />\n";
echo "<param name=\"menu\" value=\"false\">\n";
echo "<embed src=\"mp3/player.swf\" quality=\"high\" scale=\"exactfit\" wmode=\"transparent\" width=\"150\" height=\"141\" name=\"clock\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n";
echo "</object>\n";
CloseTable();
if you want for logged in only view add below
if ($user->user) {
OpenTable(MediaPlayer);
echo "<center>\n";
echo "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"150\" height=\"141\" id=\"clock\" align=\"middle\">\n";
echo "<param name=\"movie\" value=\"mp3/player.swf\" />\n";
echo "<param name=\"quality\" value=\"high\" />\n";
echo "<param name=\"scale\" value=\"exactfit\" />\n";
echo "<param name=\"wmode\" value=\"transparent\" />\n";
echo "<param name=\"menu\" value=\"false\">\n";
echo "<embed src=\"mp3/player.swf\" quality=\"high\" scale=\"exactfit\" wmode=\"transparent\" width=\"150\" height=\"141\" name=\"clock\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n";
echo "</object>\n";
CloseTable();
}
load your mp3 tracks only to mp3.
open list.xml with text editor, example of 2 tracks i have left and 2 slots as example.(the mp3 files in list are not included).
can add as many as you wish/ as your hdd can hold lol. plug in maybe needed.
if so post in forums and i will post link.

|
|
| | Topic: Quick rar guide |
|---|
| Quick rar guide [message #3073] |
Thu, 29 October 2009 12:30 |
|
thought id share this as many people ask me "how do i rar up files in split volumes" you may want to add more yourself.
create new doc, named rarup.php copy all inside and upload to root
<?php
include("header.php");
OpenTable("Guide to Making Win RAR files
");
?><center>
<table class=main width=750 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
<h2>Guide to Making Win RAR files
</h2>
<table width=100% border=1 cellspacing=0 cellpadding=10><tr><td class=text>
<p>Guide to Making Win RAR files.</p>
<ol>
<li>Download Winrar from here: '<a href=PATH TO WINRAR HERE/ target=_blank>WINRAR</a>'.</li>
<li>First find the file you want to RAR in window explorer.
.</li>
<li>Then right click and choose add to archive.</li>
<li>Next you want to choose "Store" in the compression method box.</li>
<li>In the split to volumes, bytes enter the following</li>
<li>50.000000 for DVD (files over 1.5 gig).</li>
<li>15.000000 for Music (files under 1.5 gig).</li>
Now this is important.
<li>Click the advance tab. Make sure you place a check in old style volume names.</li>
<li>This will make sure that each RAR files ends in r00, r01, r02 ect... Instead of part001, part002, ect...</li>
<li>That's it. It will then create the RAR files ready for torrent making.</li>
</td></tr></table>
</td></tr></table>
<?
CloseTable();
include("footer.php");
?>
change PATH TO WINRAR HERE with. you know lol
[Updated on: Thu, 29 October 2009 12:31]

|
|
| | Topic: [PMBT 2.0.X] Admin user PMS |
|---|
| [PMBT 2.0.X] Admin user PMS [message #2766] |
Sun, 05 July 2009 14:12 |
|
Here is a New admin tool allowing you to view search and find all PMS from users.
Please let me know If you find any bugs
<?
error_reporting(E_ALL & ~E_NOTICE);
include("header.php");
if(!$user->admin)loginrequired("admin");
define('THIS_SCRIPT', 'admin_pms');
define('HACK_TITLE', 'Dream\'s Read PMs');
define('MIN_SEARCH_WORD_LENGTH', '4');
function fetch_row_bgclass()
{
// returns the current alternating class for <TR> rows in the CP.
global $bgcounter;
return ($bgcounter++ % 2) == 0 ? 'alt1' : 'alt2';
}
function htmlspecialchars_uni($text, $entities = true)
{
return str_replace(
// replace special html characters
array('<', '>', '"'),
array('<', '>', '"'),
preg_replace(
// translates all non-unicode entities
'/&(?!' . ($entities ? '#[0-9]+|shy' : '(#[0-9]+|[a-z]+)') . ';)/si',
'&',
$text
)
);
}
function print_table_start($echobr = true, $width = '90%', $cellspacing = 0, $id = '', $border_collapse = false)
{
global $tableadded;
$tableadded = 1;
if ($echobr)
{
echo '<br />';
}
$id_html = ($id == '' ? '' : " id=\"$id\"");
echo "\n<table cellpadding=\"4\" cellspacing=\"$cellspacing\" border=\"0\" align=\"center\" width=\"$width\" style=\"border-collapse:" . ($border_collapse ? 'collapse' : 'separate') . "\" class=\"tborder\"$id_html>\n";
}
function print_form_header($phpscript = '', $do = '', $uploadform = false, $addtable = true, $name = 'cpform', $width = '90%', $target = '', $echobr = true, $method = 'post', $cellspacing = 0, $border_collapse = false)
{
global $vbulletin, $tableadded;
if (($quote_pos = strpos($name, '"')) !== false)
{
$clean_name = substr($name, 0, $quote_pos);
}
else
{
$clean_name = $name;
}
echo "<form action=\"$phpscript.php?do=$do\"" . iif($uploadform, ' enctype="multipart/form-data"') . " method=\"$method\"" . iif($target, " target=\"$target\"") . " name=\"$clean_name\" id=\"$name\">\n";
//construct_hidden_code('do', $do);
echo "<input type=\"hidden\" name=\"do\" value=\"" . htmlspecialchars_uni($do) . "\" />\n";
if ($addtable)
{
print_table_start($echobr, $width, $cellspacing, $clean_name . '_table', $border_collapse);
}
else
{
$tableadded = 0;
}
}
// grab the counts of all users that have PMs
function rpm_get_pm_users($totalpms)
{
global $db, $db_prefix;
$res ="SELECT COUNT(`pm`.`recipient`) AS total, `pm`.`sender`, `pm`.`recipient`, `user`.`username`, `user`.`id` AS `userid` FROM `torrent_private_messages` AS `pm` INNER JOIN `torrent_users` AS `user` ON (`pm`.`recipient` = `user`.`id`) WHERE `pm`.`recipient` = `user`.`id` GROUP BY `pm`.`recipient` HAVING total = " . $totalpms . " ORDER BY `pm`.`recipient` DESC ";
$pms=$db->sql_query($res) or btsqlerror($res);
return $pms;
}
function rpm_print_footer()
{
}
function rpm_get_all_pm_users()
{
global $db, $db_prefix;
$totals = $db->sql_query("
SELECT COUNT(*) AS total
FROM `" . $db_prefix . "_private_messages`
GROUP BY `recipient`
ORDER BY total DESC
");
return $totals;
}
function rpm_get_pm($pmtextid)
{
global $db, $db_prefix;
$get_pm = $db->sql_fetchrow($db->sql_query("
SELECT *
FROM `" . $db_prefix . "_private_messages`
WHERE `id` = " . $pmtextid . "
"));
return $get_pm;
}
function print_description_row($text, $htmlise = false, $colspan = 2, $class = '', $align = '', $helpname = NULL)
{
global $stylevar;
if (!$class)
{
$class = fetch_row_bgclass();
}
echo "<tr valign=\"top\">
<td class=\"$class\"" . iif($colspan != 1," colspan=\"$colspan\"") . iif($align, " align=\"$align\"") . ">" . iif($htmlise, htmlspecialchars_uni($text), $text) . "</td>\n</tr>\n";
}
function iif($expression, $returntrue, $returnfalse = '')
{
return ($expression ? $returntrue : $returnfalse);
}
function print_table_header($title, $colspan = 2, $htmlise = false, $anchor = '', $align = 'center', $helplink = true)
{
global $bgcounter, $stylevar;
if ($htmlise)
{
$title = htmlspecialchars_uni($title);
}
$title = "<b>$title</b>";
if ($anchor != '')
{
$title = "<a name=\"$anchor\">$title</a>";
}
echo "<tr>\n\t<td class=\"tcat\" align=\"$align\"" . iif($colspan != 1, " colspan=\"$colspan\"") . ">$title</td>\n</tr>\n";
$bgcounter = 0;
}
function rpm_user_exists($userid)
{
global $db;
$exists = $db->sql_fetchrow($db->sql_query("
SELECT `id`
FROM `torrent_users`
WHERE `id` = " . $userid . "
"));
if ($exists)
{
return true;
}
else
{
return false;
}
}
function print_table_footer($colspan = 2, $rowhtml = '', $tooltip = '', $echoform = true)
{
global $tableadded, $vbulletin;
if ($rowhtml)
{
$tooltip = iif($tooltip != '', " title=\"$tooltip\"", '');
if ($tableadded)
{
echo "<tr>\n\t<td class=\"tfoot\"" . iif($colspan != 1 ," colspan=\"$colspan\"") . " align=\"center\"$tooltip>$rowhtml</td>\n</tr>\n";
}
else
{
echo "<p align=\"center\"$tooltip>$extra</p>\n";
}
}
if ($tableadded)
{
echo "</table>\n";
}
if ($echoform)
{
echo "</form>\n\n\n";
}
}
function rpm_username_exists($username)
{
global $db, $db_prefix;
$exists = $db->sql_fetchrow($db->sql_query("
SELECT `id`
FROM `" . $db_prefix . "_users`
WHERE LOWER(`username`) = LOWER('" . $username . "')
"));
if ($exists)
{
return $exists['id'];
}
else
{
return false;
}
}
function rpm_get_name($userid)
{
global $db, $db_prefix;
$result = $db->sql_fetchrow($db->sql_query("
SELECT `username`
FROM `" . $db_prefix . "_users`
WHERE `id` = " . $userid . "
"));
return $result['username'];
}
// search for PMs that match key search terms
function rpm_search_pms($search_for, $match)
{
global $db, $db_prefix;
if ($match == 'exact')
{
$sql = "SELECT DISTINCT `id`, `subject`, `sent`
FROM `" . $db_prefix . "_private_messages`
WHERE `text` LIKE '%" . $search_for . "%'
ORDER BY `sent` DESC";
}
elseif ($match == 'all')
{
$a = explode(' ', $search_for);
$ands = implode("%' AND `message` LIKE '%", $a);
$sql = "SELECT DISTINCT `id`, `subject`, `sent`
FROM `" . $db_prefix . "_private_messages`
WHERE `text` LIKE '%" . $ands . "%'
ORDER BY `sent` DESC";
}
else
{
$a = explode(' ', $search_for);
$ors = implode("%' OR `text` LIKE '%", $a);
$sql = "SELECT DISTINCT `id`, `subject`, `sent`
FROM `" . $db_prefix . "_private_messages`
WHERE `text` LIKE '%" . $ors . "%'
ORDER BY `sent` DESC";
}
$result = $db->sql_query($sql);
$pms = array();
while($array = $db->sql_fetchrow($result))
{
$pms[] = $array;
}
$db->sql_freeresult($result);
return $pms;
}
function rpm_get_latest_pms($limit_by)
{
global $db, $db_prefix;
$res = "
SELECT *
FROM `" . $db_prefix . "_private_messages`
ORDER BY `sent` DESC
LIMIT 0, " . $limit_by . "
";
$result = $db->sql_query($res) or btsqlerror($res);
$pms = array();
while($array = $db->sql_fetchrow($result))
{
$pms[] = $array;
}
$db->sql_freeresult($result);
return $pms;
}
function rpm_get_pms($userid)
{
global $db, $db_prefix;
$res = "
SELECT *
FROM `" . $db_prefix . "_private_messages` AS pm
WHERE pm.sender=" . $userid . " OR pm.recipient=" . $userid . "
ORDER BY `sent` DESC
";
$result = $db->sql_query($res) or btsqlerror($res);
$pms = array();
while($array = $db->sql_fetchrow($result))
{
$pms[] = $array;
}
$db->sql_freeresult($result);
return $pms;
}
function print_cells_row($array, $isheaderrow = false, $class = false, $i = 0, $valign = 'top', $column = false, $smallfont = false)
{
global $colspan, $bgcounter, $stylevar;
if (is_array($array))
{
$colspan = sizeof($array);
if ($colspan)
{
$j = 0;
$doecho = 0;
if (!$class AND !$column AND !$isheaderrow)
{
$bgclass = fetch_row_bgclass();
}
elseif ($isheaderrow)
{
$bgclass = 'thead';
}
else
{
$bgclass = $class;
}
$bgcounter = iif($column, 0, $bgcounter);
$out = "<tr valign=\"$valign\" align=\"center\">\n";
foreach($array AS $key => $val)
{
$j++;
if ($val == '' AND !is_int($val))
{
$val = ' ';
}
else
{
$doecho = 1;
}
if ($i++ < 1)
{
$align = " align=\"$stylevar[left]\"";
}
elseif ($j == $colspan AND $i == $colspan AND $j != 2)
{
$align = " align=\"$stylevar[right]\"";
}
else
{
$align = '';
}
if (!$class AND $column)
{
$bgclass = fetch_row_bgclass();
}
if ($smallfont)
{
$val = "<span class=\"smallfont\">$val</span>";
}
$out .= "\t<td" . iif($column, " class=\"$bgclass\"", " class=\"$bgclass\"") . "$align>$val</td>\n";
}
$out .= "</tr>\n";
if ($doecho)
{
echo $out;
}
}
}
}
function print_label_row($title, $value = ' ', $class = '', $valign = 'top', $helpname = NULL, $dowidth = false)
{
global $stylevar;
if (!$class)
{
$class = fetch_row_bgclass();
}
if ($helpname !== NULL AND $helpbutton = construct_table_help_button($helpname))
{
$value = '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr valign="top"><td>' . $value . "</td><td align=\"$stylevar[right]\" style=\"padding-$stylevar[left]:4px\">$helpbutton</td></tr></table>";
}
if ($dowidth)
{
if (is_numeric($dowidth))
{
$left_width = $dowidth;
$right_width = 100 - $dowidth;
}
else
{
$left_width = 70;
$right_width = 30;
}
}
echo "<tr valign=\"$valign\">
<td class=\"$class\"" . ($dowidth ? " width=\"$left_width%\"" : '') . ">$title</td>
<td class=\"$class\"" . ($dowidth ? " width=\"$right_width%\"" : '') . ">$value</td>\n</tr>\n";
}
function rpm_print_stop_back($text = 'error')
{
global $vbphrase;
echo '<p> </p><p> </p>';
print_form_header('', '', 0, 1, 'messageform', '65%');
print_table_header($vbphrase['vbulletin_message']);
print_description_row("<blockquote><br />$text<br /><br /></blockquote>");
print_table_footer(2, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
rpm_print_footer();
}
// ####################### LIST USERS WITH X AMOUNT OF PMs ##########################
if ( $_REQUEST['do'] == 'havepms' )
{
// grab list of users that have PMs
$havepms = rpm_get_pm_users($_REQUEST['totalpms']);
// if there are no PMs
if (!$db->sql_numrows($havepms))
{
rpm_print_stop_back('There are no PMs.');
die();
}
// show the list
OpenTable(HACK_TITLE . ' - List Users With ' . $_REQUEST['totalpms'] . ' PMs');
print_form_header('', '', 0, 1, 'havepmsForm');
print_table_header('List of users with ' . $_REQUEST['totalpms'] . ' PMs');
while($pms = $db->sql_fetchrow($havepms))
{
$link1 = THIS_SCRIPT . '.php?do=list&userid=' . $pms['userid'];
$link2 = 'pm.php?op=send&to=' . $pms['userid'];
$link3 = 'user.php?op=editprofile&id=' . $pms['userid'];
$row = '<span style="float:right">[<a href="' . $link1 . '">Show All PMs</a>] ';
$row .= '[<a href="' . $link2 . '">Send PM to User</a>] ';
$row .= '[<a href="' . $link3 . '">Edit User</a>]</span>';
$row .= '<b>' . $pms['username'] . '</b>';
print_description_row($row);
}
print_table_footer(2, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
CloseTable();
}
// ####################### LIST ALL USERS WITH PMs ##########################
if ($_REQUEST['do'] == 'allusershavepms')
{
// get array of PM counts
$pmcounts = rpm_get_all_pm_users();
//die(print_r($pmcounts));
print_form_header('', '', 0, 1, 'allusershavepmsForm');
print_table_header('List Users With PMs');
// assign the counts
$pmtotals = array();
while ($currentpmcount = $db->sql_fetchrow($pmcounts))
{
$pmtotals["$currentpmcount[total]"]++;
}
// construct & display the rows
foreach ($pmtotals AS $pmtotal => $totalusers)
{
if ($totalusers != 1)
{
$usertext = 'There are ' . $totalusers .' users';
}
else
{
$usertext = 'There is ' . $totalusers .' user';
}
$link = THIS_SCRIPT . '.php?do=havepms&totalpms=' . $pmtotal;
$row = '<span style="float:right">[<a href="' . $link . '">List All Users</a>]</span>';
$row .= $usertext . ' with ' . $pmtotal . ' PMs' ;
print_description_row($row);
}
print_table_footer(2, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
}
// ############################# READ PMs #################################
if ($_REQUEST['do'] == 'list')
{
// if no userid or username entered
if (empty($_REQUEST['userid']))
{
print('You need to enter a User ID or Username.');
}
// if it is a username
if (!is_numeric($_REQUEST['userid']))
{
// check the username exists and assign it
$userid = rpm_username_exists($_REQUEST['userid']);
// if username does not exist
if (empty($userid))
{
print('User <b>' . $_REQUEST['userid'] . '</b> does not exist.' . $userid);
die();
}
}
else // if userid
{
// if userid does not exist
if (!rpm_user_exists($_REQUEST['userid']))
{
print('User ID: <b>' . $_REQUEST['userid'] . '</b> does not exist.');
die();
}
// assign the userid
$userid = $_REQUEST['userid'];
}
// get all PMs for the user
$pms = rpm_get_pms($userid);
// if there are no PMs
if (empty($pms))
{
print('User <b>' . $_REQUEST['userid'] . '</b> has no PMs.');
die();
}
// get the username
$name = rpm_get_name($userid);
// seperate sent and recieved PMs
$sent = array();
$received = array();
foreach ($pms AS $pm)
{
// seperate sent and recieved PMs (also takes into account user sending to self via to or bcc)
if ($pm['sender'] == $userid)
{
$sent[] = $pm;
}
else
{
$received[] = $pm;
}
}
// display list of sent PMs
print_form_header('', '', 0, 1, 'sentpmlistForm');
print_table_header(count($sent) . ' PMs sent from ' . $name . ' (Userid: ' . $userid . ')', 4);
if (empty($sent))
{
print_description_row('<center>There are no sent PMs to view.</center>');
}
else
{
print_cells_row(array('pmtextid', 'PM Title', 'Date', ''), 1);
foreach ($sent AS $pm)
{
$date = $pm['sent'];
$link = THIS_SCRIPT . '.php?do=read&pmtextid=' . $pm['id'];
$row = array();
$row[] = '<div class="smallfont">' . $pm['id'] . '</div>';
$row[] = '<div class="smallfont"><span style="float:left">' . $pm['subject'] . '</span></div>';
$row[] = '<div class="smallfont">' . $date . '';
$row[] = '<div class="smallfont">[<a href="' . $link . '">View Private Message</a>]</div>';
print_cells_row($row);
}
}
print_table_footer(4, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
// display list of recieved PMs
print_form_header('', '', 0, 1, 'receivedpmlistForm');
print_table_header(count($received) . ' PMs recieved for ' . $name . ' (Userid: ' . $userid . ')', 5);
if (empty($received))
{
print_description_row('<center>There are no recieved PMs to view.</center>');
}
else
{
print_cells_row(array('pmtextid', 'PM Title', 'From', 'Date', ''), 1);
foreach ($received AS $pm)
{
$date = $pm['sent'];
$link = THIS_SCRIPT . '.php?do=read&pmtextid=' . $pm['id'];
$row = array();
$row[] = '<div class="smallfont">' . $pm['id'] . '</div>';
$row[] = '<div class="smallfont"><span style="float:left">' . $pm['subject'] . '</span></div>';
$row[] = '<div class="smallfont">' . $pm['sender'] . '</div>';
$row[] = '<div class="smallfont">' . $date . '';
$row[] = '<div class="smallfont">[<a href="' . $link . '">View Private Message</a>]</div>';
print_cells_row($row);
}
}
print_table_footer(5, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
}
if ($_REQUEST['do'] == 'read')
{
// no pmtextid
if (empty($_REQUEST['pmtextid']))
{
print('Need a pmtextid.');
die();
}
// if pmtext is not a number or number < 1
if (!is_numeric($_REQUEST['pmtextid']) OR $_REQUEST['pmtextid'] < 1)
{
print('Pmtextid must be a positive number.');
die();
}
// get the requested PM
$pm = rpm_get_pm($_REQUEST['pmtextid']);
// PM does not exist
if (empty($pm))
{
print('Pmtextid <b>' . $_REQUEST['pmtextid'] . '</b> does not exist.');
die();
}
// get all userids for the users that still have the PM with pmtextid
$userids = $db->sql_fetchrow($db->sql_query("
SELECT DISTINCT `sender`
FROM `".$db_prefix."_private_messages`
WHERE `id` = " . $_REQUEST['pmtextid'] . "
"));
// If there are no userids then the PM does not exist (this handles the last x PMs)
if (empty($userids))
{
print('
<center>Pmtextid <b>' . $_REQUEST['pmtextid'] . '</b> has been deleted and can not be recovered.
<br />The non-existant entry will be automatically removed within the hour by the
<br /><b>Hourly Cleanup #2</b> scheduled task.</center>
');
die();
}
// grab array of to and bcc users
//$toarray = array_values(unserialize($pm['touserarray']));
// convert date to readable format
$date = $pm['sent'];
// show PM contents
print_form_header('', '', 0, 1, 'pmlistForm');
print_table_header('Private Message Text ID : ' . $pm['id'],2);
print_label_row('<b>From:</b></b><dfn>Link goes to users Details.</dfn>', $pm['sender'] . ' (<a href = "user.php?op=profile&id=' . $pm['sender'] . '">userid: ' . $pm['sender'] . '</a>)');
if (is_array($toarray[0]))
{
print_label_row('<b>To:</b><dfn>Link(s) goes to users Details.</dfn>' , rpm_display_recipients_with_links($toarray[0]));
}
if (is_array($toarray[1]))
{
print_label_row('<b>BCC:</b></b><dfn>Link(s) goes to users Details.</dfn>' , rpm_display_recipients_with_links($toarray[1]));
}
print_label_row('<b>PM Title:</b>', $pm['subject']);
print_label_row('<b>Date:</b>', $date);
$message = format_comment($pm['text'], false, true);
parse_smiles($message);
print_label_row('<b>Message:', '<div class="smallfont">' . $message . '</div>');
print_table_footer(2, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
}
// ############################### SEARCH #################################
if ($_REQUEST['do'] == 'search')
{
// if no search terms have been entered
if (empty($_REQUEST['search']))
{
rpm_print_stop_back('You must type in at least one word to search for.');
}
// assign and make search terms safe
$search_for = $_REQUEST['search'];
// see if any of the search terms is lower than the minimum length
$words = explode(" ", $search_for);
foreach ($words AS $current)
{
if (strlen($current) < MIN_SEARCH_WORD_LENGTH)
{
rpm_print_stop_back('At least one of your search terms was less than ' . MIN_SEARCH_WORD_LENGTH .' characters long.');
}
}
// assign the type of match
$match = $_REQUEST['match'];
// conduct the search
$pms = rpm_search_pms($search_for, $match);
// format search words for display purposes
switch ($match)
{
case 'exact':
$search_words = str_replace(" ", " + ", $search_for);
$search_wording = 'the exact text';
break;
case 'all':
$search_words = str_replace(" ", " and ", $search_for);
$search_wording = 'all of the following words';
break;
case 'atleastone':
$search_words = str_replace(" ", " or ", $search_for);
$search_wording = 'at least one of the following words';
break;
}
// display list of PMs found
print_form_header('', '', 0, 1, 'pmlistForm');
print_table_header('Search Results for ' . $search_wording . ': ' . $search_words . '', 4);
if (empty($pms))
{
print_description_row('<center>There are no results to view for the search text.</center>');
}
else
{
print_cells_row(array('pmtextid', 'PM Title', 'Date', ''), 1);
foreach ($pms AS $pm)
{
$date = $pm['sent'];
$link = THIS_SCRIPT . '.php?do=read&pmtextid=' . $pm['id'];
$row = array();
$row[] = '<div class="smallfont">' . $pm['id'] . '</div>';
$row[] = '<div class="smallfont"><span style="float:left">' . $pm['subject'] . '</span></div>';
$row[] = '<div class="smallfont">' . $date . '';
$row[] = '<div class="smallfont">[<a href="' . $link . '">View Private Message</a>]</div>';
print_cells_row($row);
}
}
print_table_footer(4, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
}
// ########################### LATEST X PMs ###############################
if ($_REQUEST['do'] == 'latest')
{
// if nothing entered or zero entered
if (empty($_REQUEST['showlatest']))
{
rpm_print_stop_back('Enter a positive number greater than 0.');
}
// if non-numeric or negative number entered
if (!is_numeric($_REQUEST['showlatest']) OR $_REQUEST['showlatest'] < 1)
{
rpm_print_stop_back('Enter a positive number greater than 0.');
}
// get the PM list
$pms = rpm_get_latest_pms($_REQUEST['showlatest']);
// if no PMs
if (empty($pms))
{
rpm_print_stop_back('There are no PMs to view.');
}
// display PM list
print_form_header('', '', 0, 1, 'pmlistForm');
print_table_header('Show Last ' . $_REQUEST['showlatest'] . ' PMs', 5);
print_cells_row(array('pmtextid', 'PM Title', 'From', 'Date', ''), 1);
foreach ($pms AS $pm)
{
$date = $pm['sent'];
$link = THIS_SCRIPT . '.php?do=read&pmtextid=' . $pm['id'];
$row = array();
$row[] = '<div class="smallfont">' . $pm['id'] . '</div>';
$row[] = '<div class="smallfont"><span style="float:left">' . $pm['subject'] . '</span></div>';
$row[] = '<div class="smallfont">' . $pm['sender'] . '</div>';
$row[] = '<div class="smallfont">' . $date . '';
$row[] = '<div class="smallfont">[<a href="' . $link . '">View Private Message</a>]</div>';
print_cells_row($row);
}
print_table_footer(5, '<input class="button" value="Go Back" title="" tabindex="1" onclick="window.location=\'javascript:history.back(1)\';" type="button">');
}
//$byuser = "WHERE username ='".escape($userid)."' OR name = '".escape($userid)."' OR clean_username = '".escape(strtolower($userid))."' OR id = ".escape($userid)."";
//////////END PAGER///////////
$res = $db->sql_query("SELECT * FROM torrent_private_messages $byuser ORDER BY id DESC $limit") or sqlerr(__FILE__, __LINE__);
if (empty($_REQUEST['do']))
{
?>
<!-- form started:6 queries executed -->
<form action="admin_pms.php?do=list" method="post" name="listForm" id="listForm">
<input type="hidden" name="do" value="list" />
<input type="hidden" name="adminhash" value="3e73dc37dcedd5625580f2b3003a7c54" />
<input type="hidden" name="securitytoken" value="1246320728-ece494df92d839cbf13763b1e8d2fd3fdae46f8c" />
<br />
<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" style="border-collapse:separate" class="tborder" id="listForm_table">
<tr>
<td class="tcat" align="center" colspan="2"><b>Read PMs</b></td>
</tr>
<tr valign="top">
<td class="alt1">User ID or Username</td>
<td class="alt1"><div id="ctrl_userid"><input type="text" class="bginput" name="userid" id="it_userid_1" value="" size="35" dir="ltr" tabindex="1" /></div></td>
</tr>
<tr>
<td class="tfoot" colspan="2" align="center"> <input type="submit" id="submit0" class="button" tabindex="1" value="Read PMs" accesskey="s" />
</td>
</tr>
</table>
</form>
<!-- form ended: 6 queries executed -->
<!-- form started:6 queries executed -->
<form action="admin_pms.php?do=havepms" method="post" name="resetForm" id="resetForm">
<input type="hidden" name="do" value="allusershavepms" />
<input type="hidden" name="adminhash" value="3e73dc37dcedd5625580f2b3003a7c54" />
<input type="hidden" name="securitytoken" value="1246320728-ece494df92d839cbf13763b1e8d2fd3fdae46f8c" />
<br />
<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" style="border-collapse:separate" class="tborder" id="resetForm_table">
<tr>
<td class="tfoot" colspan="2" align="center"> <input type="submit" id="submit1" class="button" tabindex="1" value="List Users with PMs" accesskey="s" />
</td>
</tr>
</table>
</form>
<!-- form ended: 6 queries executed -->
<!-- form started:6 queries executed -->
<form action="admin_pms.php?do=search" method="post" name="searchForm" id="searchForm">
<input type="hidden" name="do" value="search" />
<input type="hidden" name="adminhash" value="3e73dc37dcedd5625580f2b3003a7c54" />
<input type="hidden" name="securitytoken" value="1246320728-ece494df92d839cbf13763b1e8d2fd3fdae46f8c" />
<br />
<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" style="border-collapse:separate" class="tborder" id="searchForm_table">
<tr>
<td class="tcat" align="center" colspan="2"><b>Search for PMs</b></td>
</tr>
<tr valign="top">
<td class="alt1">Search for<p><input type="button" unselectable="on" value="Large Edit Box" class="button" style="font-weight:normal" onclick="window.open('textarea.php?dir=ltr&name=search','textpopup','resizable=yes,scrollbars=yes,width=' + (screen.width - (screen.width/10)) + ',height=600');" /></p></td>
<td class="alt1"><div id="ctrl_search"><textarea name="search" id="ta_search_2" rows="4" cols="40" wrap="virtual" dir="ltr" tabindex="1"></textarea><div class="smallfont"><a href="#" onclick="return resize_textarea(1, 'ta_search_2')">Increase Size</a> <a href="#" onclick="return resize_textarea(-1, 'ta_search_2')">Decrease Size</a></div></div></td>
</tr>
<tr valign="top">
<td class="alt2">Match</td>
<td class="alt2"><div class="normal">
<div class="ctrl_"> <label for="rb_matchexact_3"><input type="radio" name="match" id="rb_matchexact_3" tabindex="1" value="exact" checked="checked" />exact text</label><br />
<label for="rb_matchall_3"><input type="radio" name="match" id="rb_matchall_3" tabindex="1" value="all" />all words</label><br />
<label for="rb_matchatleastone_3"><input type="radio" name="match" id="rb_matchatleastone_3" tabindex="1" value="atleastone" />at least one of the words</label><br />
</div> </div></td>
</tr>
<tr>
<td class="tfoot" colspan="2" align="center"> <input type="submit" id="submit2" class="button" tabindex="1" value="Search for PMs" accesskey="s" />
</td>
</tr>
</table>
</form>
<!-- form ended: 6 queries executed -->
<!-- form started:6 queries executed -->
<form action="admin_pms.php?do=latest" method="post" name="latestForm" id="latestForm">
<input type="hidden" name="do" value="latest" />
<input type="hidden" name="adminhash" value="3e73dc37dcedd5625580f2b3003a7c54" />
<input type="hidden" name="securitytoken" value="1246320728-ece494df92d839cbf13763b1e8d2fd3fdae46f8c" />
<br />
<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" style="border-collapse:separate" class="tborder" id="latestForm_table">
<tr>
<td class="tcat" align="center" colspan="2"><b>Latest PMs</b></td>
</tr>
<tr valign="top">
<td class="alt1">Number of PMs to show</td>
<td class="alt1"><div id="ctrl_showlatest"><input type="text" class="bginput" name="showlatest" id="it_showlatest_4" value="100" size="35" dir="ltr" tabindex="1" /></div></td>
</tr>
<tr>
<td class="tfoot" colspan="2" align="center"> <input type="submit" id="submit3" class="button" tabindex="1" value="Latest PMs" accesskey="s" />
</td>
</tr>
</table>
</form>
<!-- form ended: 6 queries executed -->
<?php
}
include("footer.php");
?>

|
|
| | Topic: Chat Mod |
|---|
| | Topic: Increasing Torrent Name Displayed In List [pMBT2.0.3] |
|---|
| Increasing Torrent Name Displayed In List [pMBT2.0.3] [message #2397] |
Wed, 25 February 2009 00:36 |
Threedays  Messages: 79 Registered: January 2009 Location: Australia |
Seeder |
|
|
To increase the torrent printing length for torrents listed...
On line 289 or there about in /include/bittorrent.php, increase the numbers 51 and 50 to say 71 and 70, as below.
echo "\" title=\"".$dispname."\">".((strlen($dispname) <= 71) ? search_word($dispname, $search): search_word(substr($dispname,0,70)."...", $search))."</a></p>";
[Updated on: Wed, 25 February 2009 00:37] See me at ; http://conspiracyhub.com/
|
|
| | Topic: [PMBT 2.0.3] Adding tracker stats to forum |
|---|
| [PMBT 2.0.3] Adding tracker stats to forum [message #2304] |
Mon, 09 February 2009 03:28 |
|
this is not as hard as it may look
Step 1
open phpBB3/viewtopic.php and find
<?php $post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array(); ?>
now replace that with
<?php #$post_list = $user_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array();
#tracker stats
$post_list = $user_cache = $tracker_user_cache = $tracker_id_cache = $id_cache = $attachments = $attach_list = $rowset = $update_count = $post_edit_list = array(); ?>
now find
<?php // We add the signature to every posters entry because enable_sig is post dependant
if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
{
$user_sig = $row['user_sig'];
} ?>
And add after
<?php if (defined('BT_SHARE'))
{
$tracker_user_cache[$poster_id] = get_tracker_stats($poster_id);
} ?>
Now find
<?php $postrow = array( ?>
and add after
<?php //tracker stats
'POSTER_UPLOAD' => (!defined('BT_SHARE'))? '' : $tracker_user_cache[$poster_id]['uploaded'],
'POSTER_DOWN_LOAD' => (!defined('BT_SHARE'))? '' : $tracker_user_cache[$poster_id]['downloaded'],
'POSTER_RATIO' => (!defined('BT_SHARE'))? '' : $tracker_user_cache[$poster_id]['ratio'],
//end ?>
OK your done there
now open say
phpBB3/styles/prosilver/templates/viewtopic_body.html
and find
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
<!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
<!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
And add before
<!-- IF postrow.POSTER_UPLOAD != '' --><dd><strong>Uploaded:</strong> {postrow.POSTER_UPLOAD}</dd><!-- ENDIF -->
<!-- IF postrow.POSTER_DOWN_LOAD != '' --><dd><strong>Downloaded:</strong> {postrow.POSTER_DOWN_LOAD}</dd><!-- ENDIF -->
<!-- IF postrow.POSTER_RATIO != '' --><dd><strong>Ratio:</strong> {postrow.POSTER_RATIO}</dd><!-- ENDIF -->
edit language to match yours
now go to admin panel purge cache and your done

|
|
|
Pages (3): [1 ]
Current Time: Thu Sep 2 19:15:14 BST 2010
Total time taken to generate the page: 0.02298 seconds
|