Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 1st May 2009, 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, 355 views)

Last edited by sammygo; 1st May 2009 at 16:03.
Reply With Quote
The Following 7 Users Say Thank You to sammygo For This Useful Post:
al-jodtv (28th February 2010), blkmaster (2nd September 2009), bodo97 (27th September 2009), komyomy (21st September 2009), Marco (6th February 2014), mft39 (19th February 2013), Tibys08 (29th May 2011)
  #2  
Old 1st August 2009, 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 28th January 2017, 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 3rd June 2017 09:08
TorrentStrike theme engine to TBdev Kotafi Mods & Themes 6 13th May 2012 04:42
[TBDEV] Pets Scripts for TBDev BacKUP TBDev 4 7th September 2011 15:36
[YSE] Subtitles ibizaland Yuna Scatari Edition (YSE) 2 21st June 2009 00:12
[REQ] Subtitles svenxxx Template Shares 0 30th April 2009 12:06



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