"wolfnet, post: 42755":Hi all!
This is my new code:
(with a new.png)
$timezone = $row["added"];// NEW MOD by wolfnet
if (sql_timestamp_to_unix_timestamp($row["added"]) >= $last_browse)
$dispname = "<b>" . $smallname . "</b> <img src=" . $site_config['SITEURL'] . "/images/new.png border=0 alt=\"
ALTER TABLE `users` ADD `seedbonus` DECIMAL( 10, 1 ) NOT NULL;
DROP TABLE IF EXISTS `bonus`;
CREATE TABLE `bonus` (
`id` int(5) NOT NULL auto_increment,
`bonusname` varchar(50) NOT NULL default '',
`points` decimal(4,1) NOT NULL default '000.0',
`description` text NOT NULL,
`art` varchar(10) NOT NULL default 'traffic',
`menge` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11;
INSERT INTO `bonus` VALUES (1, '1.0GB Uploaded', 75.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 1073741824);
INSERT INTO `bonus` VALUES (2, '2.5GB Uploaded', 150.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 2684354560);
INSERT INTO `bonus` VALUES (3, '5GB Uploaded', 250.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 5368709120);
INSERT INTO `bonus` VALUES (7, '3 Invites', 20.0, 'Trade your points in for invites to the site.', 'invite', 3);
INSERT INTO `bonus` VALUES (6, '1 Invite', 10.0, 'Trade your points in for invites to the site.', 'invite', 1);
INSERT INTO `bonus` VALUES (8, '10 Invites', 50.0, 'Trade your points in for invites to the site.', 'invite', 10);
INSERT INTO `bonus` VALUES (9, '15 Invites', 75.0, 'Trade your points in for invites to the site.', 'invite', 15);
INSERT INTO `bonus` VALUES (10, '25 Invites', 100.0, 'Trade your points in for invites to the site.', 'invite', 25);
INSERT INTO `bonus` VALUES (4, '10GB Uploaded', 400.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 10737418240);
INSERT INTO `bonus` VALUES (5, '25GB Uploaded', 1000.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 26843545600); "cursed, post: 47585":First post update.Now must work!!maybe something like
ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';
ps im not 2 gd at this lol
"piop, post: 47580":Maybe for announce.php ;) Find:
Replace with:$torrentfields = "id, name, info_hash, category, banned, freeleech, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
$torrentfields = "id, name, info_hash, category, banned, freeleech, silver, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
Find:
}else{
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
Add before:
}elseif ($torrent["silver"] == 2){
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + ($downthis/2) WHERE id=$userid") or err("Tracker error: Unable to update stats");
"cursed, post: 47561":thanks,can someone make the mysql and announce??you could add the code to index,,browse and torrent search
ALTER TABLE torrents ADD silver ENUM ('yes','no') DEFAULT 'no';open functions.phpif ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0'>";
after:
if ($row["silver"] == 2)
$dispname .= " <img src='images/silver.gif' border='0'>";
save and upload
open torrents.php
find:
$query = "SELECT torrents.id, torrents.anon, torrents.announce, 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.freeleech,torrents.silver, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
in this line:
torrents.owner, torrents.external, torrents.freeleech,
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver
find:
case 'freeleech': $sort = "torrents.freeleech"; $addparam .= "sort=freeleech&"; break;
add after:
case 'silver': $sort = "torrents.silver"; $addparam .= "sort=silver&"; break;
find:
echo "<option value='freeleech'" . ($_GET["sort"] == "freeleech" ? "selected" : "") . ">Freeleech</option>";
add after
echo "<option value='silver'" . ($_GET["sort"] == "silver" ? "selected" : "") . ">silver</option>";
save and upload
open torrent-edit
find:
$updateset[] = "freeleech = '".$_POST["freeleech"]."'";
after:
$updateset[] = "silver = '".$_POST["silver"]."'";
also in torrents-edit(i'm not sure for this if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td align=right><B>Free Leech: </b></TD><TD><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />Leeching is free? (Only Uploading Counts)<br>";
after:
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td align=right><B>silver: </b></TD><TD><input type=\"checkbox\" name=\"silver\"" . (($row["silver"] == "2") ? " checked=\"checked\"" : "" ) . " value=\"2\" />Leeching is 50% free? (Only 50% downloading Counts)<br>";
open index.php and find
$query = "SELECT torrents.id, torrents.anon, torrents.announce, 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.freeleech,torrents,silver, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25";
in this line:
torrents.owner, torrents.external, torrents.freeleech
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver
close and save
open torrents-search and find:
$wherea[] = "freeleech = '1'";
add after:
$wherea[] = "silver = '2'";
find:
$query = "SELECT torrents.id, torrents.anon, torrents.announce, 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.freeleech,torrents.silver, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
in this line:
torrents.owner, torrents.external, torrents.freeleech
change to this:
torrents.owner, torrents.external, torrents.freeleech,torrents.silver,
find:
<option value="3">Free Leech</option>
add after:
<option value="4">silver</option>
save and upload
open announce.php and find:
$torrentfields = "id, name, info_hash, category, banned, freeleech, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
Replace with:
$torrentfields = "id, name, info_hash, category, banned, freeleech, silver, seeders + leechers AS numpeers, UNIX_TIMESTAMP(added) AS ts, seeders, leechers, times_completed"; //torrent details to get
Find:
}else{
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
Add before:
}elseif ($torrent["silver"] == 2){
mysql_query("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + ($downthis/2) WHERE id=$userid") or err("Tracker error: Unable to update stats");
But:
if ($row["silver"]
$dispname .= " <img src='images/silver.gif' border='0'>";<?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("months's Torrents");
begin_frame("months's Torrents");
$date_time=get_date_time(gmtime()-(3600*720)); // the 720 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.anon, 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.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();
?>In block/navigate_block.phpif ($CURUSER["view_torrents"]=="yes" || !$site_config["MEMBERSONLY"]) echo "- <a href=torrents-month.php>monthly torrents</a><BR>";"PsykoAcidBurn, post: 38552":Hello, everybody!
I just bbcodes create the most commonly used and that are in: Comments, Upload, MP, Shoutbox !
Here is my changes:
My shoutbox.php, My bbcode.php And my functions.php:
Screens and my 3 .php:
"avi-torrents, post: 34144":Small hack i made, posting incase its usefull for anyone else..
upload
banners_block.php & banners.txt
to
YOUR_TRACKER_DIR/blocks/
CMOD banners.txt to 644
edit your banners.txt via ftp
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=1678"]banners.rar[/url]