Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 01-05-09, 15:46
sammygo's Avatar
sammygo sammygo is offline
Senior Member
 
Join Date: May 2008
P2P
Posts: 141
Default Subtitles
SQL
Code:
CREATE TABLE `subs` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `filename` varchar(255) NOT NULL default '',
  `cd` int(10) unsigned NOT NULL default '0',
  `frame` varchar(255) NOT NULL default '',
  `comment` text NOT NULL,
  `added` datetime default NULL,
  `size` int(10) unsigned NOT NULL default '0',
  `uppedby` int(10) unsigned NOT NULL default '0',
  `url` varchar(255) NOT NULL default '',
  `hits` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
subtitles.php - Look at attached files -


downloadsubs.php
Code:
<?
require "include/bittorrent.php";
dbconn();
if (!$CURUSER)
{
Header("Location: $BASEURL/");
die;
}
$filename = substr($HTTP_SERVER_VARS["PATH_INFO"], strrpos($HTTP_SERVER_VARS["PATH_INFO"], "/") + 1);
if (!$filename)
die("File name missing\n");
if (get_user_class() < UC_POWER_USER && filesize("$SUBSPATH/$filename") > 1024*1024)
die("Sorry, you need to be a power user or higher to download files larger than 1.00 MB.\n");
$filename = sqlesc($filename);
$res = mysql_query("SELECT * FROM subs WHERE filename=$filename") or sqlerr();
$arr = mysql_fetch_assoc($res);
if (!$arr)
die("Not found\n");
mysql_query("UPDATE subs SET hits=hits+1 WHERE id=$arr[id]") or sqlerr(__FILE, __LINE__);
$file = "$SUBSPATH/$arr[filename]";
if (!is_file($file))
die("File not found\n");
$f = fopen($file, "rb");
if (!$f)
die("Cannot open file\n");
header("Content-Length: " . filesize($file));
header("Content-Type: application/octet-stream");
do
{
$s = fread($f, 4096);
print($s);
} while (!feof($f));
closefile($f);
exit;
?>
Then make folder subs with CMOD 777

Then add this in bittorent.php or config.php
Code:
//Directory for subs
$SUBSPATH = "subs"; # local path to subs dir, chmod 777
Thanks to morala7667 @ tbdev.net for this mod :X
Enjoy !
Attached Files
File Type: php subtitles.php (13.1 KB, 337 views)

Last edited by sammygo; 01-05-09 at 16:03.
Reply With Quote
The Following 7 Users Say Thank You to sammygo For This Useful Post:
al-jodtv (28-02-10), blkmaster (02-09-09), bodo97 (27-09-09), komyomy (21-09-09), Marco (06-02-14), mft39 (19-02-13), Tibys08 (29-05-11)
  #2  
Old 01-08-09, 22:16
crztz's Avatar
crztz crztz is offline
Senior Member
 
Join Date: Apr 2009
P2P
Posts: 34
Default top subtitle uploaders
does anyone have a top subtitles uploaders ?

A top where it can be seen who uploaded most subtitles ?

I sincerely tried and had no luck :(

Thank you very much
Reply With Quote
  #3  
Old 28-01-17, 22:05
miralsplet's Avatar
miralsplet miralsplet is offline
Member
 
Join Date: Nov 2013
Slovenia
Posts: 6
Default
Reply With Quote
Reply

Tags
subtitles

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[TBDev] shoutcast radio for tbdev Slatkis TBDev 14 03-06-17 09:08
TorrentStrike theme engine to TBdev Kotafi Mods & Themes 6 13-05-12 04:42
[TBDEV] Pets Scripts for TBDev BacKUP TBDev 4 07-09-11 15:36
[YSE] Subtitles ibizaland YSE 2 21-06-09 00:12
[REQ] Subtitles svenxxx Template Shares 0 30-04-09 12:06



All times are GMT +2. The time now is 02:10. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.