Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 13th October 2010, 12:52
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default Split torrents by Days
This is for TBDev 2009

1.
run this sql:
PHP Code:
ALTER TABLE `usersADD split enum('yes','no'NOT NULL default 'yes'
2. open include torrenttable functions and find:
PHP Code:
while ($row mysql_fetch_assoc($res))      { 
directly bellow it add:
PHP Code:
if (($CURUSER['split'] == "yes") && ($_SERVER["REQUEST_URI"] == "/browse.php") && !isset($_GET["page"])) {            $day_added $row['added'];      $day_show date($day_added);      $thisdate date('M d Y'$day_show);    /** If date already exist, disable $cleandate varible **/   if (isset($prevdate) && $thisdate == $prevdate) {      $cleandate '';  /** If date does not exist, make some varibles **/ }else{  $day_added "{$lang['torrenttable_upped']}.date('l d M Y',$row['added']); // You can change this to something else $cleandate = "<tr><td colspan='15'><b>$day_added</b></td></tr>\n"; // This also... } /** Prevent that "torrents added..." wont appear again with the same date **/ $prevdate = $thisdate;  $man = array('Jan' => 'January',      'Feb' => 'February',      'Mar' => 'March',      'Apr' => 'April',      'May' => 'May',      'Jun' => 'June',      'Jul' => 'July',      'Aug' => 'August',      'Sep' => 'September',      'Oct' => 'October',      'Nov' => 'November',      'Dec' => 'December'      );  foreach($man as $eng => $ger){     $cleandate = str_replace($eng, $ger,$cleandate); }  $dag = array(     'Mon' => 'Monday',     'Tues' => 'Tuesday',     'Wednes' => 'Wednesday',     'Thurs' => 'Thursday',     'Fri' => 'Friday',     'Satur' => 'Saturday',     'Sun' => 'Sunday' );  foreach($dag as $eng => $ger){     $cleandate = str_replace($eng.'day', $ger.'',$cleandate); }  if ($row["sticky"] == "no") // delete this line if you dont have sticky torrents or you   $htmlout .= $cleandate."\n"; } 
3. open lang\en\lang_torrenttable_functions.php and add:

PHP Code:
'torrenttable_upped'         => 'Uploaded On '
4. open my.php and add wherever you want to show it:
PHP Code:
$HTMLOUT .=tr($lang['my_split'], "<input type='radio' name='split'" . ($CURUSER["split"] == "yes" " checked='checked'" "") . " value='yes' />yes <input type='radio' name='split'" . ($CURUSER["split"] == "no" " checked='checked'" "") . " value='no' />no" ,1); 
5. open takeprofileedit.php and find:
PHP Code:
$acceptpms $_POST["acceptpms"]; 
above it add:
PHP Code:
$split = ($_POST["split"] == "yes" "yes" "no"); $updateset[] = "split = " sqlesc($split); 
6. open lang\en\lang_my.php and add
PHP Code:
'my_split' => 'Split Torrents by Days'
Click image for larger version

Name:	split.png
Views:	376
Size:	25.4 KB
ID:	2584

FreakyNutz@tbdev.net/index.php?showtopic=22153
Reply With Quote
  #2  
Old 14th October 2010, 09:46
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
can this be made for tbdev2008 ?
Reply With Quote
  #3  
Old 15th April 2011, 01:24
bolzen bolzen is offline
Member
 
Join Date: Mar 2011
P2P
Posts: 6
Default
open bittorrent.php and search for

PHP Code:
<td class="colhead" align=right>Files</td>
<td class="colhead" align=right>Comm.</td>
<!--<td class="colhead" align="center">Rating</td>-->
<td class="colhead" align="center">Added</td>
<td class="colhead" align="center">TTL</td>
<td class="colhead" align="center">Size</td>
<!--
<td class="colhead" align=right>Views</td>
<td class="colhead" align=right>Hits</td>
-->
<td class="colhead" align="center">Snatched</td>
<td class="colhead" align=right>Seeders</td>
<td class="colhead" align=right>Leechers</td>
<?

    
if ($variant == "index")
        print(
"<td class=\"colhead\" align=center>Upped&nbsp;by</td>\n");

    print(
"</tr>\n");
below it add

PHP Code:
if (($CURUSER['split'] == "yes") && ($_SERVER["REQUEST_URI"] == "/browse.php") && !isset($_GET["page"]))
     {
         
$day_added $row['added'];
         
$day_show date($day_added);
         
$thisdate date('M d Y'$day_show);
          
/** If date already exist, disable $cleandate varible **/
          
if (isset($prevdate) && $thisdate == $prevdate) {
              
$cleandate '';
              
/** If date does not exist, make some varibles **/
              
}else{
                  
$day_added "Uploaded On" .date('l d M Y',$row['added']);
                  
// You can change this to something else $cleandate = "<tr><td colspan='15'><b>$day_added</b></td></tr>\n"; // This also... }
                  /** Prevent that "torrents added..." wont appear again with the same date **/
                  
$prevdate $thisdate;
                  
$man = array('Jan' => 'January',
                  
'Feb' => 'February',
                  
'Mar' => 'March',
                  
'Apr' => 'April',
                  
'May' => 'May',
                  
'Jun' => 'June',
                  
'Jul' => 'July',
                  
'Aug' => 'August',
                  
'Sep' => 'September',
                  
'Oct' => 'October',
                  
'Nov' => 'November',
                  
'Dec' => 'December'      );
                  foreach(
$man as $eng => $ger){
                      
$cleandate str_replace($eng,
                      
$ger,$cleandate); }
                      
$dag = array(
                      
'Mon' => 'Monday',
                      
'Tues' => 'Tuesday',
                      
'Wednes' => 'Wednesday',
                      
'Thurs' => 'Thursday',
                      
'Fri' => 'Friday',
                      
'Satur' => 'Saturday',
                      
'Sun' => 'Sunday' );
                       foreach(
$dag as $eng => $ger){
                           
$cleandate str_replace($eng.'day'$ger.'',$cleandate); }
                           if (
$row["sticky"] == "no")
                           
// delete this line if you dont have sticky torrents or you   $htmlout .= $cleandate."\n"; } 
now go on my.php and add where you want

PHP Code:
tr("Split Torrents by Days"], "<input type='radio' name='split'" . ($CURUSER["split"] == "yes" " checked='checked'" "") . " value='yes' />yes <input type='radio' name='split'" . ($CURUSER["split"] == "no" " checked='checked'" "") . " value='no' />no" ,1); 
i have it under

PHP Code:
tr("Torrents per page""<input type=text size=10 name=torrentsperpage value=$CURUSER[torrentsperpage]> (0=use default setting)",1); 

go in takeprofedit.php and search

PHP Code:
$acceptpms $_POST["acceptpms"]; 
above it add

PHP Code:
$split = ($_POST["split"] == "yes" "yes" "no"); $updateset[] = "split = " sqlesc($split); 

now run sql

Code:
ALTER TABLE `users` ADD split enum('yes','no') NOT NULL default 'yes';  

thats it
Reply With Quote
  #4  
Old 29th April 2011, 16:26
xrol xrol is offline
Member
 
Join Date: May 2010
P2P
Posts: 11
Default
i did that and the browse is the same... no split
can u help me?
Attached Files
File Type: php browse.php (11.1 KB, 10 views)
File Type: php bittorrent.php (73.9 KB, 13 views)
Reply With Quote
Reply

Tags
days , split , torrents

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



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