Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Subtitles (http://www.bvlist.com/showthread.php?t=2538)

sammygo 1st May 2009 15:46

Subtitles
 
1 Attachment(s)
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 :drink:
Enjoy !

crztz 1st August 2009 22:16

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

miralsplet 28th January 2017 22:05

:wallbash:


All times are GMT +2. The time now is 01:06.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.