I have a licensed vBulletin 3.8.0 and can't find vbtt on vbulletin.org so I came here. I am using the: http://www.vbteam.info/compatible-scripts/13800-vbulletin-torrent-tracker-2-0-1-vbtt.html
The install goes well until it asks me to edit files from vBulletin. It's telling me to:
Open attachment.php, remove:
^I can't find that ANYWHERE in attachment.php for vBulletin 3.8.0
Then find:
and replace it with:
^ Again, I can't find this anywhere.
Instead I find:
For the first part and:
For the second part. Can I remove that first part and then edit the first half of the second code?
I found the vb 3.6.8 premodded with vbtt here but then if I where to upgrade to my vBulletin 3.8.0 it would then change the file edits.
Anyway wanna give me some help on this? Please.
The install goes well until it asks me to edit files from vBulletin. It's telling me to:
Open attachment.php, remove:
Code:
header('Content-Length: ' . $attachmentinfo['filesize']);
Then find:
Code:
if ($vboptions['attachfile'])
{
while (!feof($fp) AND connection_status() == 0)
{
echo @fread($fp, 1048576);
flush();
and replace it with:
Code:
// Modification for VBulletin Torrent Tracker 2 by SqrtBoy ([email protected])
$torrent_data = '';
if ($vboptions['attachfile'])
{
while (!feof($fp) AND connection_status() == 0)
{
$torrent_data .= @fread($fp, 1048576);
Instead I find:
Code:
header('Content-Range: bytes */'. $attachmentinfo['filesize']);
For the first part and:
Code:
if ($startbyte > 0)
{
fseek($fp, $startbyte);
}
while (connection_status() == 0 AND $startbyte <= $lastbyte)
{ // You can limit bandwidth by decreasing the values in the read size call, they must be equal.
$size = $lastbyte - $startbyte;
$readsize = ($size > 1048576) ? 1048576 : $size + 1;
echo @fread($fp, $readsize);
$startbyte += $readsize;
flush();
}
@fclose($fp);
}
else
{
// start grabbing the filedata in batches of 2mb
while (connection_status() == 0 AND $startbyte <= $lastbyte)
{
$size = $lastbyte - $startbyte;
$readsize = ($size > 2097152) ? 2097152 : $size + 1;
$attachmentinfo = $db->query_first_slave("
SELECT attachmentid, SUBSTRING(" . ((!empty($vbulletin->GPC['thumb']) ? 'thumbnail' : 'filedata')) . ", $startbyte + 1, $readsize) AS filedata
FROM " . TABLE_PREFIX . "attachment
WHERE attachmentid = $attachmentinfo[attachmentid]
");
echo $attachmentinfo['filedata'];
$startbyte += $readsize;
flush();
}
For the second part. Can I remove that first part and then edit the first half of the second code?
I found the vb 3.6.8 premodded with vbtt here but then if I where to upgrade to my vBulletin 3.8.0 it would then change the file edits.
Anyway wanna give me some help on this? Please.