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 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
|