Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   Split torrents by Days (http://www.bvlist.com/showthread.php?t=5515)

Fynnon 13th October 2010 12:52

Split torrents by Days
 
1 Attachment(s)
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'

Attachment 2584

FreakyNutz@tbdev.net/index.php?showtopic=22153

DND 14th October 2010 09:46

can this be made for tbdev2008 ?

bolzen 15th April 2011 01:24

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

xrol 29th April 2011 16:26

2 Attachment(s)
i did that and the browse is the same... no split
can u help me?


All times are GMT +2. The time now is 12:11.

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