Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Anonymous in browse.php (http://www.bvlist.com/showthread.php?t=4685)

\n");
        else
            print("
lovebeer 16th March 2010 20:58

Anonymous in browse.php
 
Hi, I want that all classes lower than VIP to see Anonymous in browse on the upped by column, but I can't make it to work.
In details.php shows anonymous.
This is my code from details.php
Code:

$row["owner"] = "";

  $uprow = (isset($row["username"]) ? ("" . $row["owner"] . "" . htmlspecialchars($row["username"]) . "
") : "Anonymous");
        if ($owned)
            $uprow .= " $spacer<$editlink>[Edit this torrent]";

if (get_user_class() >= UC_VIP){
tr("Upped by", $uprow, 1);
  }
else
if ($owned){
tr("Upped by", $uprow, 1);
}
else
tr("Upped by", "[Anonymous]", 1);

and this is the code from bittorrent.php :
Code:

        if ($variant == "index")
            print("
" . (isset($row["username"]) ? ("" . htmlspecialchars($row["username"]) . "") : "(unknown)") . " Anonymous");
But I can't make the code from details to work in bittorrent too.

Sorry for my bad english!

Daz 17th March 2010 03:10

PHP Code:

        if ($variant == "index" && (get_user_class() > UC_VIP))
        {
            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");
            }
        elseif (
$variant == "index" && (get_user_class() < UC_VIP))
        {
            print(
"<td align=center><i>Anonymous</i></td>");
            } 

Does that work? Have not tested it so backup...

lovebeer 17th March 2010 15:13

Thanks this works! :drink:


All times are GMT +2. The time now is 18:06.

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