[DISC] TorrentPier BitTorrent Tracker MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Tocsin LK
Registered User
Posts: 14
Joined: Thu Jan 26, 2006 6:43 pm

Post by Tocsin LK »

First things first, I'd just like to say how much I've really enjoyed this modification so far. It has a lot of promise.

A couple things though:

1.) Would it be possible to set some options so that "full details mode" is only viewable by administrators or moderators?
2.) For general viewing purposes, would it be possible to set it so only administrators/moderators would be able to see the usernames of who is downloading and seeding a torrent in the various functions where a general user can currently view such information?

I bring this up since, from a privacy standpoint, I don't see why the common public needs to know exactly what forum users are downloading/sharing a file and, in some circumstances, users may not want other users to have this info.

3.) I will post more on this issue later as I'm currently connecting through Lynx and can't change the torrentpier settings through this browser, but, I have encountered a fairly large bug when I completely disabled "full detail mode" that has something to do with bad SQL syntax it seems. Maybe it's just my system, but here is a way to go about re-creating it:
a.) Go into the ACP -> TorrentPier -> Forum Config.
b.) In the section for "Full Details Mode," set to "no."
c.) Go into one of your torrent forums and click on a post containing an attached torrent for download.

If this is a universal problem, you'll get the same error I did. I will post the full error message when I get back from work tonight.

Meithar
Registered User
Posts: 16
Joined: Tue Sep 16, 2003 8:57 am

Post by Meithar »

Tocsin LK
Thanks!

How to fix this bug:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
attach_mod/displaying_torrent.php

#
#-----[ FIND ]------------------------------------------
#
$get_s_mode = (isset($_GET['spmode'])) ? $_GET['spmode'] : '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($cfg_s_mode == SHOW_PEERS_NAMES)
{
	$s_mode = 'names';
}
else if ($cfg_s_mode == SHOW_PEERS_FULL)
{
	$s_mode = 'full';
}
else
{
	$s_mode = 'count';
}

Tocsin LK
Registered User
Posts: 14
Joined: Thu Jan 26, 2006 6:43 pm

Post by Tocsin LK »

Thanks. Worked like a charm. :)

Aaru Bui
Registered User
Posts: 43
Joined: Sat Apr 09, 2005 5:15 am

Post by Aaru Bui »

Version 0.3.6.7 Released.

User avatar
jeevan25
Registered User
Posts: 388
Joined: Thu Dec 30, 2004 2:45 am

Post by jeevan25 »

nice. when is gonna be final. it is rc but i want it to be perfect before instaling. :P

User avatar
okada1314
Registered User
Posts: 209
Joined: Sat Oct 29, 2005 10:51 am

Post by okada1314 »

the download is dead

gamepro
Registered User
Posts: 184
Joined: Sun Mar 27, 2005 4:17 am
Contact:

Post by gamepro »

Link for the 3.6.7 code changes should be .txt not .zip

http://www.digimonhimitsu.com/Temp/Torr ... hanges.txt

concretemonkey
Registered User
Posts: 49
Joined: Sat Oct 23, 2004 1:05 am

Error on viewtopic

Post by concretemonkey »

Hi, I had sucessfully installed this mod on a previous forum.

I am on a new forum and have the Categories Hierarchy mod installed too, and am trying to install this one.

Everything seemed fine until i got the the viewtopic.php page. I got this error:

Code: Select all

Could not obtain topic information

DEBUG MODE

SQL Error : 1064 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 phpbb_topics t WHERE t.topic_id = 7 LIMIT 1' at l

SELECT t.topic_sub_type, t.topic_duration, t.topic_first_post_id, t.topic_sub_title, t.topic_attachment, t.** FROM phpbb_topics t WHERE t.topic_id = 7 LIMIT 1

Line : 233
File : viewtopic.php
I assume that I have some SQL missing, but I can't for the life of me figure out what it is. Does anyone have any suggestions please.

Thanks In Advance,

ConcreteMonkey

Aaru Bui
Registered User
Posts: 43
Joined: Sat Apr 09, 2005 5:15 am

Post by Aaru Bui »

TP doesn't deal with that part of the coding. You sure it wasn't there before the TP mod was installed?

User avatar
Razarnet
Registered User
Posts: 23
Joined: Fri Aug 05, 2005 1:32 pm

Post by Razarnet »

Is able to get this mod work with phpbb 2.0.19 and CHMod 214?
This far i've been install:

phpbb 2.0.19
CHmod 214
xs_mod 231

But then comes problems... CHMOD was remove some .php and doesn't use those.. so i cant made code changes cos there's not php files where to install notes told to make changes so... Have anyone solution to this? This can be hard challenge even for u guy's.

I think there is many who want subformus and tracker in own board.. so i could be cool if you can made version where these are ready preinstalled :-)
Last edited by Razarnet on Mon Feb 06, 2006 9:15 pm, edited 2 times in total.

concretemonkey
Registered User
Posts: 49
Joined: Sat Oct 23, 2004 1:05 am

Post by concretemonkey »

Yes Aaru, I am sure it wasn't there before.

There are two lins of SQL that i thought edited the mentioned table. These are:

Code: Select all

ALTER TABLE phpbb_topics ADD topic_dl_type TINYINT(1) NOT NULL DEFAULT '0';
ALTER TABLE phpbb_topics ADD topic_dl_status TINYINT(1) NOT NULL DEFAULT '0';
Anyone have any ideas? Would a copy of mt viewtopic.php file help?

Since the error was line 233 I have included the lines of code before and after.

Code: Select all

//
// This rather complex gaggle of code handles querying for topics but
// also allows for direct linking to a post (and the calculation of which
// page the post is on and the correct display of viewtopic)
//
$join_sql_table = (!$post_id) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = (!$post_id) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = ( empty($post_id) ) ? 'LIMIT 1' : 'GROUP BY p.post_id LIMIT 1';

//bt
$sql = "SELECT t.*, f.*" . $count_sql . "
	FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
	WHERE $join_sql
		AND f.forum_id = t.forum_id
		$order_sql";

//-- mod : categories hierarchy ------------------------------------------------
//-- add
// we don't need the forums table, so do some cleanings
$sql = str_replace(', ' . FORUMS_TABLE . ' f', '', $sql);
$sql = str_replace('AND f.forum_id = t.forum_id', '', $sql);
$sql = str_replace(', f.forum_id', ', t.forum_id', $sql);
$sql = preg_replace('/, f\.\w*/si', '', $sql);

// added fields
$added_fields = 't.topic_sub_type, t.topic_duration, t.topic_first_post_id, t.topic_sub_title, ';
if ( $config->data['mod_topic_calendar_CH'] )
{
	$added_fields .= 't.topic_calendar_time, t.topic_calendar_duration, ';
}
//-- mod : attachmod ----------------------------------------------------------- 
//-- add
if ( defined('CH_mod_attachmod') )
{
	$added_fields .= 't.topic_attachment, ';
}
//-- fin mod : attachmod -------------------------------------------------------
$sql = str_replace('SELECT ', 'SELECT ' . $added_fields, $sql);
$sql = str_replace('GROUP BY ', 'GROUP BY ' . $added_fields, $sql);
//-- fin mod : categories hierarchy --------------------------------------------
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, "Could not obtain topic information", '', __LINE__, __FILE__, $sql);
}

if ( !($forum_topic_data = $db->sql_fetchrow($result)) )
{
	message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}

$forum_id = intval($forum_topic_data['forum_id']);

//
// Start session management
//
Regards
ConcreteMonkey

concretemonkey
Registered User
Posts: 49
Joined: Sat Oct 23, 2004 1:05 am

Post by concretemonkey »

I have fixed my previous problem now, by removing the * f from the sql.

Unfortuately i have found another problem (which was present before fixing the sql)

When a new post is made, it says the post is made by Guest when viewing the list of topics in a forum, but clearly says the posters name on the actual post in viewtopic.php

Does anyone have any suggestions as to why this is happening?

concretemonkey
Registered User
Posts: 49
Joined: Sat Oct 23, 2004 1:05 am

Post by concretemonkey »

I have sucessfully modified 3 parts of the TorrentPier Mod and it's new mods.

When Torrentpier first came out as an entire board, I attempted to create the memberlist.php stats hack. Obviously this has been bettered by Aaru and Quake-69, but there was somethings missing that I enjoyed. So here they are!

The following three mods will change the way the stats are displayed on the forum. When a member has not downloaded and only uploaded his/her ratio is '-'. This is also true if they have only downloaded and not seeded. This way only people who have both uploaded and downloaded get a ratio and the Leechers and seeders are classed the same. These mods work around that. The mods show stats like so:

Only uploaded and never downloaded = Max.
Only Downloaded and never uploaded = Leech.
Ratio only goes up to 999.5, anything above = Max.

Now you know who your valuable seeding members are!!

The first is for the index.php page and is standard in the TorrentPier mod:

Code: Select all

##############################################################
## MOD Title: Index Code Adjustment For Ratio Hack
## MOD Author: ConcreteMonkey
##
## MOD Information:     Mod to increase the information given by the Stats mod (index only)
##
## MOD Description:	This will add "Max", "Leech" and ratio's to the index.php page.
##
## MOD Version: 0.0.1
##
##
## Installation Level: easy
## Installation Time: 2 Minutes (1min with EasyMOD by Nuttzy)
## Files To Edit: 1
##	index.php
##
##############################################################

#
#-----[ OPEN ]------------------------
#
index.php
#
#-----[ FIND ]------------------------
#
	$ul    = ($row['u_up_total']) ? $row['u_up_total'] : 0;
	$dl    = ($row['u_down_total']) ? $row['u_down_total'] : 0;
#
#-----[ REPLACE WITH ]----------------
	$upload    = ($row['u_up_total']) ? $row['u_up_total'] : 0;
	$download    = ($row['u_down_total']) ? $row['u_down_total'] : 0;
#
#
#-----[ FIND ]------------------------
#
	$ratio = ($dl) ? round(($ul / $dl), 2) : 0;
#
#-----[ REPLACE WITH ]----------------
#
				if (($download == 0)&&($upload!=0))
					{
						$ratio = Max;
					}
		
				elseif (($download != 0) && ($upload == 0))
					{
						$ratio = Leech;
					}
					
				elseif ($download > $upload)
					{
						$ratio = Leech;
					}
		
				elseif (($download == 0) && ($upload == 0))
					{
						$ratio = 0;
					}
		
				else
					{
	   					$ratio2 = round(($upload/$download),0);
	   					if ($ratio2 >= 999.5)
	   					{
	   						$ratio = Max;
	   					}
	   					
	   					else
	   					{
	   						$ratio = '1:'.$ratio2;
	   					}
	   				}
#
#-----[ FIND ]------------------------
#
		'U_UP_TOTAL'   => ($ul) ? humn_size($ul) : 0,
		'U_DOWN_TOTAL' => ($dl) ? humn_size($dl) : 0,
#
#-----[ REPLACE WITH ]----------------
#
		'U_UP_TOTAL'   => ($upload) ? humn_size($upload) : 0,
		'U_DOWN_TOTAL' => ($download) ? humn_size($download) : 0,
#
#-----[ SAVE/CLOSE ALL FILES ]--------
#
# EoM
The second is for the memberlist and requires you have the memberlist ratio mod installed.

Code: Select all

##############################################################
## MOD Title: Memberlist Code Adjustment For Ratio Hack
## MOD Author: ConcreteMonkey
##
## MOD Information:     Mod to increase the information given by the Stats mod (memberlist only)
##                                Requires the memberlist stats hack from http://www.digimonhimitsu.com/Temp/Upload%20Download%20Stats%20Hack.txt
##
## MOD Description:	This will add "Max", "Leech" and ratio's to the memberlist.php page.
##
## MOD Version: 0.0.1
##
## MOD Credits: I attempted the original mod before the torrentpier mod. Thanks to Aaru and Quake-69 for fixing all it's flaws.
##
## Installation Level: easy
## Installation Time: 2 Minutes (1min with EasyMOD by Nuttzy)
## Files To Edit: 1
##	memberlist.php
##
##############################################################

#
#-----[ OPEN ]------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------
#
		$upload = ($row['u_up_total']) ? $row['u_up_total'] : 0;
		$download = ($row['u_down_total']) ? $row['u_down_total'] : 0;
		$ratio = ($download) ? round(($upload / $download), 2) : 0;
#
#-----[ REPLACE WITH ]----------------
#
				$upload = $row['u_up_total'];
				$download =$row['u_down_total'];


				if (($download == 0)&&($upload!=0))
					{
						$ratio = Max;
					}
		
				elseif (($download != 0) && ($upload == 0))
					{
						$ratio = Leech;
					}
					
				elseif ($download > $upload)
					{
						$ratio = Leech;
					}
		
				elseif (($download == 0) && ($upload == 0))
					{
						$ratio = 0;
					}
		
				else
					{
	   					$ratio2 = round(($upload/$download),0);
	   					if ($ratio2 >= 999.5)
	   					{
	   						$ratio = Max;
	   					}
	   					
	   					else
	   					{
	   						$ratio = '1:'.$ratio2;
	   					}
	   				}
#
#-----[ FIND ]------------------------
#
			'UP_DOWN_RATIO' => ($ratio) ? $ratio : '-',
#
#-----[ REPLACE WITH ]----------------
#
			'UP_DOWN_RATIO' => $ratio,
#
#-----[ SAVE/CLOSE ALL FILES ]--------
#
# EoM
The third is for the viewtopic.php page and required you have the viewtopic stats mod installed.

Code: Select all

##############################################################
## MOD Title: Viewtopic Code Adjustment For Ratio Hack
## MOD Author: ConcreteMonkey
##
## MOD Information:     Mod to increase the information given by the Stats mod (viewtopic only)
##
## MOD Description:	This will add "Max", "Leech" and ratio's to the viewtopic.php page.
##                               This mod requires the viewtopic stats hack from http://filesoup.co.uk/forum/index.php?showtopic=120851
##
## MOD Version: 0.0.1
##
##
## Installation Level: easy
## Installation Time: 2 Minutes (1min with EasyMOD by Nuttzy)
## Files To Edit: 1
##	viewtopic.php
##
##############################################################

#
#-----[ OPEN ]------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------
#
	$ratio = ($download) ? round(($upload / $download), 2) : 0;
#
#-----[ REPLACE WITH ]----------------
#


				if (($download == 0)&&($upload!=0))
					{
						$ratio = Max;
					}
		
				elseif (($download != 0) && ($upload == 0))
					{
						$ratio = Leech;
					}
					
				elseif ($download > $upload)
					{
						$ratio = Leech;
					}
		
				elseif (($download == 0) && ($upload == 0))
					{
						$ratio = 0;
					}
		
				else
					{
	   					$ratio2 = round(($upload/$download),0);
	   					if ($ratio2 >= 999.5)
	   					{
	   						$ratio = Max;
	   					}	   					
	   					
	   					else
	   					{
	   						$ratio = '1:'.$ratio2;
	   					}
	   				}
#
#-----[ SAVE/CLOSE ALL FILES ]--------
#
# EoM
There may be a cleaner way of doing this, but it works like an absolute chram as it is.

I hope you enjoy it.

No demo yet as my forum is under construction, although the mods are working live and flawlessly!!

Regards,

ConcreteMonkey

nibraz
Registered User
Posts: 184
Joined: Tue Sep 14, 2004 9:56 pm

Post by nibraz »

Hi,
I have the torrent peer for phpbb from Aaru Bui. Is their any way that when members download they need a ratio of 1.1 in order download more torrents? like how can i prevent members from leeching and how can i set that members need ratio higher in order to download torrents. Here is an example:

member 1:
1st torrent : downloaded 1.2 GB : uploaded 600 MB
2nd torrent : cannot download ratio needed more then 1.1
3rd torrent : ratio need 3.1 to begin download.

Just like that for each torrent they a ratio 1 up say 4th torrent needs a ratio of 4.1 etc.. is their anyway to do this in order to prevent leeching?

User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Post by MHobbit »

Is this MOD actually abandoned? The topic prefix is [ABD]. If not, it will need to be changed. ;-)
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."

Locked

Return to “[2.0.x] MODs in Development”