Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Subtitles page for 2.08
You don't have permission for this action!
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2013-02-08 04:15:26
[size=18px]I modified an old mod from tbdev to work for TT 2.08. I've tested it and on my tracker works perfectly.[/size]

Run in yor database:



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;

Add in backend/config.php the next line:




$site_config['subs_dir'] = '/uploads/subs';



This is the default directory for subtitles, If you change this location subtitles.php will not work anymore...

Create into uploads directory a new folder called subs and set file permission to 777 in your FTP client.

Download the attached archive subtitles and upload the included files in your root.





[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6608"]subtitles.zip[/url]
subs.png
subs.png
delsub.png
delsub.png
subtitles.zip
Download
Unknown User
2013-02-08 19:00:48
Tnx a Lot..Needed This mod..:)
2013-02-09 02:51:06
Thanks you!! #1 :)
2013-02-09 21:04:22
upload a 1GB ?

if ($file["size"] > 1073741824)


I change the following line to the low number but it would not upload !?..
Unknown User
2013-02-09 22:17:11
you might have to do this too

ALTER TABLE `subs` CHANGE `size` `size` INT( 12 ) UNSIGNED NOT NULL DEFAULT '0';

int 10 might be too small for 1gig sizes..
2013-02-10 01:49:00
"ArcticWolf, post: 88712":
you might have to do this too

ALTER TABLE `subs` CHANGE `size` `size` INT( 12 ) UNSIGNED NOT NULL DEFAULT '0';

int 10 might be too small for 1gig sizes..

No,

I'll put a place 500MB = 5368709

if ($file["size"] > 5368709)

if (get_user_class() < 1 && filesize("$subs_dir/$filename") > 5368709*5368709)

and I put   in  20

Not work! -_-
Unknown User
2013-02-10 03:26:33
Why do you want to upload files so big? is not realistic,  are huge for subtitles and this script was not built to upload such files ...

However, I forgot to change some old code from tbdev in downloadsubs.php, this is the new one:



<?

require_once("backend/functions.php");

dbconn();



if (!$CURUSER)

{

Header("");

die;

}



$subs_dir = "".str_replace("","/",getcwd())."".$site_config['subs_dir']."";

$filename = substr($HTTP_SERVER_VARS["PATH_INFO"], strrpos($HTTP_SERVER_VARS["PATH_INFO"], "/") + 1);



if (!$filename)

die("File name missingn");



$filename = sqlesc($filename);

$res = SQL_Query_exec("SELECT * FROM subs WHERE filename=$filename");

$arr = mysql_fetch_assoc($res);

if (!$arr)

die("Not foundn");



SQL_Query_exec("UPDATE subs SET hits=hits+1 WHERE id=$arr[id]");

$file = "$subs_dir/$arr[filename]";

if (!is_file($file))

die("File not foundn");



$f = fopen($file, "rb");

if (!$f)

die("Cannot open filen");



header("Content-Length: " . filesize($file));

header("Content-Type: application/octet-stream");

do

{

$s = fread($f, 4096);

print($s);

}

while (!feof($f));



exit;

?>



[size=18px]I updated the attached archive in the first post[/size]
2013-02-10 05:00:29
ok! thanks you BigMAX1 :)
Unknown User
2013-02-19 13:08:47
is it possible to add: If any subtitle is available on uploads/subs  with the same name of the the movie then the subs will show anywhere in the torrent detail.php . For example: like similar torrent mod

Thanks in advance
Unknown User
2013-02-26 10:06:39
Cool!

THANKS!

issue while deleting subtitles - it dels always the last uploaded torrent not the one you choose...

Can language option be added to?

and if possible to ad a link in to torrent-details when/if title is available for that movie/series...
Unknown User
2013-02-27 05:23:06
You're right darknova, into "delete subtitles" code is a mistake and I corrected that issue. You must replace this code:



$del = SQL_Query_exec("SELECT * FROM subs WHERE $query");

 while ($arr3 = mysql_fetch_assoc($del))

 {

   $delsub = $_GET["delsub"];

   if (is_valid_id($delsub))

   {

 show_error_msg("Delete Subtitle","<br /><font size=2>Are you sure you want to delete this subtitle?</font>

 <div style=margin-top:5px align=center><font color=#0080FF>".htmlspecialchars($arr3["title"])."</font></div>

 <div style='margin-top:10px' align=center><a href=?delete=$arr3[id]>Yes</a> &nbsp;|&nbsp; <a href=subtitles.php>No</a></div>", 1);

   }

 }

With this one:




$delsub = $_GET["delsub"];

$del = SQL_Query_exec("SELECT * FROM subs WHERE id ='$delsub' AND $query");

 while ($arr3 = mysql_fetch_assoc($del))

 {

   if (is_valid_id($delsub))

   {

 show_error_msg("Delete Subtitle","<br /><font size=2>Are you sure you want to delete this subtitle?</font>

 <div style=margin-top:5px align=center><font size=2 color=#0080FF>".htmlspecialchars($arr3["title"])."</font></div>

 <div style='margin-top:10px' align=center><a href=?delete=$delsub>Yes</a> &nbsp;|&nbsp; <a href=subtitles.php>No</a></div>", 1);

   }

 }




[size=18px]I updated the attached archive from the first post.[/size]
Unknown User
2013-02-27 11:36:34
Tnx, now works fine ! :)
2013-02-28 01:32:10
Thank you for your update bigmax1 :)
2014-07-18 21:17:39
I need some help here.   :rolleyes:  I can not make this work at all lol.  When i try to upload a file nothing happends. No error, nothing in datbase.  :(
Unknown User
2014-07-19 04:19:42
"UFFENO1, post: 92904":

I need some help here.   :rolleyes:  I can not make this work at all lol.  When i try to upload a file nothing happends. No error, nothing in datbase.  :(

Same probleme
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 4
  • Members: 0
  • Guests online: 4
  • Comments: 3
  • Messages: 1,728