|
#1
|
|||
|
|||
Anonymous Uploader
This is the complete anonymous uploading mod.
In upload.php uploader can choose to hide their name. Code:
ALTER TABLE `torrents` ADD `anonymous` ENUM( 'yes', 'no' ) DEFAULT 'no' NOT NULL; Code:
tr("Show uploader", "<input type=checkbox name=uplver value=yes>Don't show my username in 'Uploaded By' field in browse.", 1); Code:
$f = $_FILES["file"]; $fname = unesc($f["name"]); if (empty($fname)) bark("Empty filename!"); Code:
$f = $_FILES["file"]; $fname = unesc($f["name"]); if (empty($fname)) bark("Empty filename!"); if ($_POST['uplver'] == 'yes') { $anonymous = "yes"; $anon = "Anonymous"; } else { $anonymous = "no"; $anon = $CURUSER["username"]; } Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, anonymous, info_hash, name, Code:
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", Code:
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $anonymous, $infohash, Find: Code:
torrents.filename,torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," . Code:
torrents.filename,torrents.anonymous,torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," . Code:
// user/ip/port // check if anyone has this ip ($unr = mysql_query("SELECT username, privacy FROM users WHERE id=$e[userid] ORDER BY last_access DESC LIMIT 1")) or die; $una = mysql_fetch_array($unr); if ($una["privacy"] == "strong") continue; $s .= "<tr>\n"; if ($una["username"]) $s .= "<td><a href=userdetails.php?id=$e[userid]><b>$una[username]</b></a></td>\n"; else $s .= "<td>" . ($mod ? $e["ip"] : preg_replace('/\.\d+$/', ".xxx", $e["ip"])) . "</td>\n"; Code:
// user/ip/port // check if anyone has this ip ($unr = mysql_query("SELECT id, username, privacy, warned, donor FROM users WHERE id=$e[userid] ORDER BY last_access DESC LIMIT 1")) or die; $una = mysql_fetch_array($unr); if ($una["privacy"] == "strong") continue; ++$num; $highlight = $CURUSER["id"] == $una["id"] ? " bgcolor=#BBAF9B" : ""; $s .= "<tr$highlight>\n"; //$s .= "<tr>\n"; if ($una["username"]) { if (get_user_class() >= UC_MODERATOR || $torrent['anonymous'] != 'yes' || $e['userid'] != $torrent['owner']) { // $s .= "<td><a href=userdetails.php?id=$e[userid]><b>$una[username]</b></a></td>\n"; $s .= "<td><a href=userdetails.php?id=$e[userid]><b>$una[username]</b></a>" . ($una["donor"] == "yes" ? "<img src=". "/pic/star.gif alt='Donor'>" : "") . ($una["enabled"] == "no" ? "<img src=". "/pic/disabled.gif alt=\"This account is disabled\" style='margin-left: 2px'>" : ($una["warned"] == "yes" ? "<a href=rules.php#warning class=altlink><img src=/pic/warned.gif alt=\"Warned\" border=0></a>" : "")); } elseif (get_user_class() >= UC_MODERATOR || $torrent['anonymous'] = 'yes') { $s .= "<td><i>Anonymous</i></a></td>\n"; } } else $s .= "<td>(unknown)</td>\n"; inline, like: Code:
torrents.anonymous, categories.name AS cat_name, users.username Code:
$keepget = ""; if($row['anonymous'] == 'yes') { if (get_user_class() < UC_UPLOADER) $uprow = "<i>Anonymous</i>"; else $uprow = "<i>Anonymous</i> (<a href=userdetails.php?id=$row[owner]><b>$row[username]</b></a>)"; } else { $uprow = (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>"); } if ($owned) Code:
if ($variant == "index") print("<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>") . "</td>\n"); Code:
if ($variant == "index") { if ($row["anonymous"] == "yes") { print("<td align=center><i>Anonymous</i></td>\n"); } else { print("<td align=center>" . (isset($row["username"]) ? ("<a href=userdetails.php?id=" . $row["owner"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>") : "<i>(unknown)</i>") . "</td>\n"); } } Code:
tr("Visible", "<input type=\"checkbox\" name=\"visible\"" . (($row["visible"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> Visible on main page<br /><table border=0 cellspacing=0 cellpadding=0 width=420><tr><td class=embedded>Note that the torrent will automatically become visible when there's a seeder, and will become automatically invisible (dead) when there has been no seeder for a while. Use this switch to speed the process up manually. Also note that invisible (dead) torrents can still be viewed or searched for, it's just not the default.</td></tr></table>", 1); Code:
tr("Anonymous uploader", "<input type=\"checkbox\" name=\"anonymous\"" . (($row["anonymous"] == "yes") ? " checked=\"checked\"" : "" ) . " value=\"1\" /> Check this box to hide the uploader of the torrent", 1); Code:
$updateset[] = "name = " . sqlesc($name); Code:
$updateset[] = "anonymous = '" . ($_POST["anonymous"] ? "yes" : "no") . "'"; |
Tags |
anonymous , uploader |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Request to be Uploader | sammygo | Mods & Themes | 21 | 7th June 2013 10:52 |
Anonymous Uploader | dyzzy | Mods & Themes | 1 | 7th November 2012 15:45 |
Uploader application | Nilsons | Mods & Themes | 7 | 18th October 2012 22:34 |
Anonymous Comments | Rendevous | Mods & Themes | 0 | 4th May 2010 12:17 |
Anonymous mod | netdsl | Yuna Scatari Edition (YSE) | 0 | 21st September 2008 13:24 |