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
[ADDON] Torrents uploaded this week
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-09-09 14:50:19
i , try this if you want a torrent of week page , like torrent today.

Create this page torrents-week.php :

<?php
//

//  TorrentTrader v2.x

// This file was last updated: 7/septembre/2008

//

// [url="http://www.torrenttrader.org"]http://www.torrenttrader.org[/url]

//

//

require_once("backend/functions.php");

dbconn(false);

//check permissions

if ($site_config["MEMBERSONLY"]){

loggedinonly();

if($CURUSER["view_torrents"]=="no")

show_error_msg("Error","You do not have permission to view torrents",1);

}

stdhead("Torrents de la semaine");

begin_frame("Torrents de la semaine");

$date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed

$catresult = mysql_query("SELECT id, name FROM categories ORDER BY sort_index");

while($cat = mysql_fetch_array($catresult))

{

$orderby = "ORDER BY torrents.id DESC"; //Order

$where = "WHERE banned = 'no' AND category='$cat[id]' AND visible='yes'";

//$limit = "LIMIT 50"; //Limit

$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.safe, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND safe='yes' AND torrents.added>='$date_time' $orderby $limit";

$res = mysql_query($query);

$numtor = mysql_num_rows($res);

if ($numtor != 0) {

echo "<B><a href=torrents.php?cat=".$cat[id].">$cat[name]</a></B>";

list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "torrents.php?" . $addparam); //adjust pager to match LIMIT

torrenttable($res);

echo "<BR>";

}

}

end_frame();

stdfoot();

?>

or put this file a the root of your site:

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2836"]torrents_week.php[/url]
torrents_week.php
Download
Unknown User
2008-09-10 01:49:30
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /homepages/12/********/htdocs/torrents-week.php on line 37

line 37

$numtor = mysql_num_rows($res);
Unknown User
2008-09-10 02:23:03
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

on line 37

$numtor = mysql_num_rows($res);
Unknown User
2008-09-10 03:37:21
hi , i dont know why you have this error beceause i take exactly the same page and code of torrents-today.php  , i have only change the time to take the torrents :  $date_time=get_date_time(time()-(3600*168)); // the 24 is the hours you want listed

what version of TT you have?
Unknown User
2008-09-10 12:41:58
2.x
Unknown User
2008-09-10 17:35:19
remove "torrents.safe,"

for v2.04+:

<?php

//

//  TorrentTrader v2.x

// This file was last updated: 26/June/2007

//

// http://www.torrenttrader.org

//

//

require_once("backend/functions.php");

dbconn(false);



//check permissions

if ($site_config["MEMBERSONLY"]){

loggedinonly();



if($CURUSER["view_torrents"]=="no")

show_error_msg("Error","You do not have permission to view torrents",1);

}



stdhead("This Week's Torrents");



begin_frame("This Week's Torrents");



$date_time=get_date_time(gmtime()-(3600*168)); // the 24 is the hours you want listed



$catresult = mysql_query("SELECT id, name FROM categories ORDER BY sort_index");



while($cat = mysql_fetch_array($catresult))

{

$orderby = "ORDER BY torrents.id DESC"; //Order

$where = "WHERE banned = 'no' AND category='$cat[id]' AND visible='yes'";

//$limit = "LIMIT 10"; //Limit



$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.anon, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where AND torrents.added>='$date_time' $orderby $limit";



$res = mysql_query($query);

$numtor = mysql_num_rows($res);



if ($numtor != 0) {

echo "<B><a href=torrents.php?cat=".$cat[id].">$cat[name]</a></B>";

list($pagertop, $pagerbottom, $limit) = pager(1000, $count, "torrents.php?" . $addparam); //adjust pager to match LIMIT

torrenttable($res);

echo "<BR>";

}





}

end_frame();

stdfoot();

?>
Unknown User
2008-09-13 17:27:05
working for me....greet thank you
Unknown User
2010-09-08 20:35:42
The 2x version already has the Mod Torrent_Week, only the name changes to Torrents-today. Check that personal best ... Hugs
2011-03-15 17:01:11
Thanks you! TorrentialStorm #1 v2.06 :lol:
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728