Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   the [img][/img] tag doesn't work? (http://www.bvlist.com/showthread.php?t=510)

roland1000 25th June 2008 09:55

the [img][/img] tag doesn't work?
 
1 Attachment(s)
When I put the tag to the description of a torrent, it appears exactly how I wrote it. The tracker URL is:

http://www.xpreed.com/filezone

A random uploader account is:
USERNAME: 12345678
Password: 87654321
From that account you can upload something and you can see that it doesen't work when you want to insert an image, a swf file or something like this in the description of the torrent. What is wrong with the source code?

[attachment=0:1133353e]upl.jpg[/attachment:1133353e]

joeroberts 27th June 2008 07:00

Re: Why the [img][/img] tag doesn't work?
 
try using lower case

roland1000 27th June 2008 14:01

Re: Why the [img][/img] tag doesn't work?
 
It still don't work. There is a problem with details.php. Please check it out.


[code]
ob_start("ob_gzhandler");

require_once("include/bittorrent.php");


function getagent($httpagent, $peer_id="")
{
if (preg_match("/^Azureus ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]\_B([0-9][0-9|*])(.+)$)/", $httpagent, $matches))
return "Azureus/$matches[1]";
elseif (preg_match("/^Azureus ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]\_CVS)/", $httpagent, $matches))
return "Azureus/$matches[1]";
elseif (preg_match("/^Java\/([0-9]+\.[0-9]+\.[0-9]+)/", $httpagent, $matches))
return "Azureus/<2.0.7.0";
elseif (preg_match("/^Azureus ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $httpagent, $matches))
return "Azureus/$matches[1]";
elseif (preg_match("/BitTorrent\/S-([0-9]+\.[0-9]+(\.[0-9]+)*)/", $httpagent, $matches))
return "Shadow's/$matches[1]";
elseif (preg_match("/BitTorrent\/U-([0-9]+\.[0-9]+\.[0-9]+)/", $httpagent, $matches))
return "UPnP/$matches[1]";
elseif (preg_match("/^BitTor(rent|nado)\\/T-(.+)$/", $httpagent, $matches))
return "BitTornado/$matches[2]";
elseif (preg_match("/^BitTornado\\/T-(.+)$/", $httpagent, $matches))
return "BitTornado/$matches[1]";
elseif (preg_match("/^BitTorrent\/ABC-([0-9]+\.[0-9]+(\.[0-9]+)*)/", $httpagent, $matches))
return "ABC/$matches[1]";
elseif (preg_match("/^ABC ([0-9]+\.[0-9]+(\.[0-9]+)*)\/ABC-([0-9]+\.[0-9]+(\.[0-9]+)*)/", $httpagent, $matches))
return "ABC/$matches[1]";
elseif (preg_match("/^Python-urllib\/.+?, BitTorrent\/([0-9]+\.[0-9]+(\.[0-9]+)*)/", $httpagent, $matches))
return "BitTorrent/$matches[1]";
elseif (preg_match("/^BitTorrent\/brst(.+)/", $httpagent, $matches))
return "Burst";
elseif (preg_match("/^RAZA (.+)$/", $httpagent, $matches))
return "Shareaza/$matches[1]";
elseif (preg_match("/Rufus\/([0-9]+\.[0-9]+\.[0-9]+)/", $httpagent, $matches))
return "Rufus/$matches[1]";
elseif (preg_match("/^Python-urllib\\/([0-9]+\\.[0-9]+(\\.[0-9]+)*)/", $httpagent, $matches))
return "G3 Torrent";
elseif (preg_match("/MLDonkey\/([0-9]+).([0-9]+).([0-9]+)*/", $httpagent, $matches))
return "MLDonkey/$matches[1].$matches[2].$matches[3]";
elseif (preg_match("/ed2k_plugin v([0-9]+\\.[0-9]+).*/", $httpagent, $matches))
return "eDonkey/$matches[1]";
elseif (preg_match("/uTorrent\/([0-9]+)([0-9]+)([0-9]+)([0-9A-Z]+)/", $httpagent, $matches))
return "uTorrent/$matches[1].$matches[2].$matches[3].$matches[4]";
elseif (preg_match("/CT([0-9]+)([0-9]+)([0-9]+)([0-9]+)/", $peer_id, $matches))
return "cTorrent/$matches[1].$matches[2].$matches[3].$matches[4]";
elseif (preg_match("/Transmission\/([0-9]+).([0-9]+)/", $httpagent, $matches))
return "Transmission/$matches[1].$matches[2]";
elseif (preg_match("/KT([0-9]+)([0-9]+)([0-9]+)([0-9]+)/", $peer_id, $matches))
return "KTorrent/$matches[1].$matches[2].$matches[3].$matches[4]";
elseif (preg_match("/rtorrent\/([0-9]+\\.[0-9]+(\\.[0-9]+)*)/", $httpagent, $matches))
return "rTorrent/$matches[1]";
elseif (preg_match("/^ABC\/Tribler_ABC-([0-9]+\.[0-9]+(\.[0-9]+)*)/", $httpagent, $matches))
return "Tribler/$matches[1]";
elseif (preg_match("/^BitsOnWheels( |\/)([0-9]+\\.[0-9]+).*/", $httpagent, $matches))
return "BitsOnWheels/$matches[2]";
elseif (preg_match("/BitTorrentPlus\/(.+)$/", $httpagent, $matches))
return "BitTorrent Plus!/$matches[1]";
elseif (ereg("^Deadman Walking", $httpagent))
return "Deadman Walking";
elseif (preg_match("/^eXeem( |\/)([0-9]+\\.[0-9]+).*/", $httpagent, $matches))
return "eXeem$matches[1]$matches[2]";
elseif (preg_match("/^libtorrent\/(.+)$/", $httpagent, $matches))
return "libtorrent/$matches[1]";
elseif (substr($peer_id, 0, 12) == "d0c")
return "Mainline";
elseif (substr($peer_id, 0, 1) == "M")
return "Mainline/Decoded";
elseif (substr($peer_id, 0, 3) == "-BB")
return "BitBuddy";
elseif (substr($peer_id, 0, 8) == "-AR1001-")
return "Arctic Torrent/1.2.3";
elseif (substr($peer_id, 0, 6) == "exbc\08")
return "BitComet/0.56";
elseif (substr($peer_id, 0, 6) == "exbc\09")
return "BitComet/0.57";
elseif (substr($peer_id, 0, 6) == "exbc\0:")
return "BitComet/0.58";
elseif (substr($peer_id, 0,4) == "-BC0")
return "BitComet/0.".substr($peer_id,5,2);
elseif (substr($peer_id, 0, 7) == "exbc\0L")
return "BitLord/1.0";
elseif (substr($peer_id, 0, 7) == "exbcL")
return "BitLord/1.1";
elseif (substr($peer_id, 0, 3) == "346")
return "TorrenTopia";
elseif (substr($peer_id, 0, 8) == "-MP130n-")
return "MooPolice";
elseif (substr($peer_id, 0, 8) == "-SZ2210-")
return "Shareaza/2.2.1.0";
elseif (ereg("^0P3R4H", $httpagent))
return "Opera BT Client";
elseif (substr($peer_id, 0, 6) == "A310--")
return "ABC/3.1";
elseif (ereg("^XBT Client", $httpagent))
return "XBT Client";
elseif (ereg("^BitTorrent\/BitSpirit$", $httpagent))
return "BitSpirit";
elseif (ereg("^DansClient", $httpagent))
return "XanTorrent";

else
return "Unknow";
}

function dltable($name, $arr, $torrent)
{

global $CURUSER;
$s = "" . count($arr) . " $name\n";
if (!count($arr))
return $s;
$s .= "\n";
$s .= "\n";
$s .= "" .
"".
"".
"".
"" .
"" .
"" .
"" .
"" .
"" .
"\n";
$now = time();
$moderator = (isset($CURUSER) && get_user_class() >= UC_MODERATOR);
$mod = get_user_class() >= UC_MODERATOR;
foreach ($arr as $e) {


// 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 .= "\n";
//$s .= "
\n";
if ($una["username"]) {

if (get_user_class() >= UC_MODERATOR || $torrent['anonymous'] != 'yes' || $e['userid'] != $torrent['owner']) {
// $s .= "\n";
$s .= "\n";
}
}
else
$s .= "\n";
$secs = max(1, ($now - $e["st"]) - ($now - $e["la"]));
$revived = $e["revived"] == "yes";
$s .= "\n";
$s .= "\n";
$s .= "\n";
$s .= "\n";
if ($e["seeder"] == "no")
$s .= "\n";
else
$s .= "\n";
if ($e["downloaded"])
{
$ratio = floor(($e["uploaded"] / $e["downloaded"]) * 1000) / 1000;
$s .= "\n";
}
else
if ($e["uploaded"])
$s .= "\n";
else
$s .= "\n";
$s .= "\n";
$s .= "\n";
$s .= "\n";
$s .= "\n";
$s .= "\n";
}
$s .= "
User/IPConnectableUploadedRateDownloadedRateRatioCompleteConnectedIdleClient
$una[username]$una[username]" . ($una["donor"] == "yes" ? "Donor" : "") . ($una["enabled"] == "no" ? "\"This" : ($una["warned"] == "yes" ? "\"Warned\"" : ""));
}
elseif (get_user_class() >= UC_MODERATOR || $torrent['anonymous'] = 'yes') {
$s .= "
Anonymous(unknown)" . ($e[connectable] == "yes" ? "Yes" : "No") . "" . mksize($e["uploaded"]) . "" . mksize(($e["uploaded"] - $e["uploadoffset"]) / $secs) . "/s" . mksize($e["downloaded"]) . "" . mksize(($e["downloaded"] - $e["downloadoffset"]) / $secs) . "/s" . mksize(($e["downloaded"] - $e["downloadoffset"]) / max(1, $e["finishedat"] - $e[st])) . "/s" . number_format($ratio, 3) . "Inf.---" . sprintf("%.2f%%", 100 * (1 - ($e["to_go"] / $torrent["size"]))) . "" . mkprettytime($now - $e["st"]) . "" . mkprettytime($now - $e["la"]) . "" . htmlspecialchars(getagent($e["agent"], $e["peer_id"])) . "
\n";
return $s;
}

dbconn(false);

loggedinorreturn();

$id = 0 + $_GET["id"];

if (!isset($id) || !$id)
die();

$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, torrents.description, IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.anonymous, categories.name AS cat_name, users.username FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id")
or sqlerr();
$row = mysql_fetch_array($res);

$owned = $moderator = 0;
if (get_user_class() >= UC_MODERATOR)
$owned = $moderator = 1;
elseif ($CURUSER["id"] == $row["owner"])
$owned = 1;
//}

if (!$row || ($row["banned"] == "yes" && !$moderator))
stderr("Error", "No torrent with ID $id.");
else {
if ($_GET["hit"]) {
mysql_query("UPDATE torrents SET views = views + 1 WHERE id = $id");
if ($_GET["tocomm"])
header("Location: $BASEURL/details.php?id=$id&page=0#startcomments");
elseif ($_GET["filelist"])
header("Location: $BASEURL/details.php?id=$id&filelist=1#filelist");
elseif ($_GET["toseeders"])
header("Location: $BASEURL/details.php?id=$id&dllist=1#seeders");
elseif ($_GET["todlers"])
header("Location: $BASEURL/details.php?id=$id&dllist=1#leechers");
else
header("Location: $BASEURL/details.php?id=$id");
exit();
}

if (!isset($_GET["page"])) {
stdhead("Details for torrent \"" . $row["name"] . "\"");

if ($CURUSER["id"] == $row["owner"] || get_user_class() >= UC_MODERATOR)
$owned = 1;
else
$owned = 0;

$spacer = "";

if ($_GET["uploaded"]) {
print("

Successfully uploaded!

\n");
print("

Torrent is changed to tracker standarts

\n");
print("

Please redownload torrent and start seeding. Note that the torrent won't be visible until you do that!

\n");
}
elseif ($_GET["edited"]) {
print("

Successfully edited!

\n");
if (isset($_GET["returnto"]))
print("

Go back to whence you came.

\n");
}
elseif (isset($_GET["searched"])) {
print("

Your search for \"" . htmlspecialchars($_GET["searched"]) . "\" gave a single result:

\n");
}
elseif ($_GET["rated"])
print("

Rating added!

\n");

$s=$row["name"];
$descrs = $row["description"];
print("

$s

\n");
print("\n");

$url = "edit.php?id=" . $row["id"];
if (isset($_GET["returnto"])) {
$addthis = "&returnto=" . urlencode($_GET["returnto"]);
$url .= $addthis;
$keepget .= $addthis;
}
$editlink = "a href=\"$url\" class=\"sublink\"";

// $s = "" . htmlspecialchars($row["name"]) . "";
// if ($owned)
// $s .= " $spacer<$editlink>[Edit torrent]";
// tr("Name", $s, 1);

print("");
if (!empty($row["description"]))
print("");
// tr("Downloadsas", $row["save_as"]);

function hex_esc($matches) {
return sprintf("%02x", ord($matches[0]));
}
tr("Info hash", preg_replace_callback('/./s', "hex_esc", hash_pad($row["info_hash"])));

if (!empty($row["descr"]))
tr("Description", str_replace(array("\n", " ", "?", " ", "U^", " ", "^(2)", " ",
"U", " ", "?", " ", "Y", " ", "
Download" . htmlspecialchars($row["filename"]) . "
Small Description$descrs

Pinduur 11th July 2008 18:15

Re: the [img][/img] tag doesn't work?
 
Replace this

[code]tr("Description", str_replace(array("\n", " ", "?", " ", "U^", " ", "^(2)", " ",
"U", " ", "?", " ", "Y", " ", "

darknirvana 23rd July 2008 22:43

Re: the [img][/img] tag doesn't work?
 
[code]tr("Description", str_replace(array("\n", " ", "?", " ", "U^", " ", "^(2)", " ",
"U", " ", "?", " ", "Y", " ", "


All times are GMT +2. The time now is 00:28.

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