Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=93)
-   -   Modded Torrent table (http://www.bvlist.com/showthread.php?t=4448)

joeroberts 8th February 2010 01:45

Modded Torrent table
 
this is to make your torrent tables match your themes.

http://www.phpmybittorrent.com/forum/index.php/t/814/6

open include/bittorrent.php and find:

PHP Code:

 <?php
function torrenttable($res$variant "index"$user ""$block "") { 
        global 
$db$name$search$user$download_level$torrent_global_privacy$onlysearch$db_prefix$autoscrape$theme$btback1$btback2$btback3$free_dl;
?>

add after that:

PHP Code:

<?php
if(function_exists('theme_torrenttable'))return theme_torrenttable($res$variant$user$block);
?>

Now go the your themes folder ((Themes/pmbt))
create new file bittorrrent.php and add to it:

PHP Code:

 <?php 
/* 
*----------------------------phpMyBitTorrent V 2.0.4---------------------------* 
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent  Management System) ---* 
*--------------   Created By Antonio Anzivino (aka DJ Echelon)    --------------* 
*-------------               http://www.p2pmania.it                -------------* 
*------------ Based on the Bit Torrent Protocol made by  Bram Cohen ------------* 
*-------------              http://www.bittorrent.com              -------------* 
 *----------------------------------------------------------- -------------------* 
 *----------------------------------------------------------- -------------------* 
*--   This program is free software; you can redistribute  it and/or modify   --* 
*--   it under the terms of the GNU General Public License  as published by   --* 
*--   the Free Software Foundation; either version 2 of  the License, or      --* 
*--   (at your option) any later version.                                     --* 
*--                                                                           --* 
*--   This program is distributed in the hope that it  will be useful,        --* 
*--   but WITHOUT ANY WARRANTY; without even the implied  warranty of         --* 
*--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the          --* 
*--   GNU General Public License for more details.                            --* 
*--                                                                           --* 
*--   You should have received a copy of the GNU General  Public License      --* 
*--   along with this program; if not, write to the  Free Software            --* 
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston,  MA  02111-1307 USA --* 
*--                                                                           --* 
 *----------------------------------------------------------- -------------------* 
*------              ©2005 phpMyBitTorrent Development Team               ------* 
*-----------               http://phpmybittorrent.com                -----------* 
 *----------------------------------------------------------- -------------------* 
*-----------------   Sunday, September 14, 2008 9:05 PM    ---------------------* 
*/ 
function theme_torrenttable($res$variant "index"$user ""$block "") { 
        global 
$db$name$search$user$download_level$torrent_global_privacy$onlysearch$db_prefix$autoscrape$theme$btback1$btback2$btback3$free_dl$prev$pages$pager$next
$utc $btback1
$phpself $_SERVER['PHP_SELF']; 
echo <<<
EOF 
<script type="text/javascript" language="JavaScript"
var 
expanded 0
function 
expand(id) { 
        if (
expanded == id) return; 
        var 
obj
        var 
obj2
        
obj document.getElementById("userpanel_"+id); 
        
obj.className 'show'
        if (
expanded != 0) { 
                
obj2 document.getElementById("userpanel_"+expanded); 
                
obj2.className 'hide'
        } 
        
expanded id

function 
toggle(nome) { 
if(
document.getElementById(nome).style.display=='none'

document.getElementById(nome).style.display ''
 
document.getElementById(nome+"img").src="http://bvlist.com/i mages/collapse.png"
} else { 
document.getElementById(nome).style.display 'none'
 
document.getElementById(nome+"img").src="http://bvlist.com/i mages/expand.png"



</script> 
EOF; 
?> 
<?php 
$count_get 
0

foreach (
$_GET as $get_name => $get_value) { 
if (
$get_name != "sort" && $get_name != "type") { 
if (
$count_get 0) { 
$oldlink $oldlink "&" $get_name "=" $get_value
} else { 
$oldlink $oldlink $get_name "=" $get_value

$count_get++; 
}} 

if (
$count_get 0) { 
$oldlink "?" $oldlink "&"
}else{ 
$oldlink "?"

if (
$_GET['sort'] == "1") { 
if (
$_GET['type'] == "desc") { 
$link1 "asc"
} else { 
$link1 "desc"



if (
$_GET['sort'] == "2") { 
if (
$_GET['type'] == "desc") { 
$link2 "asc"
} else { 
$link2 "desc"



if (
$_GET['sort'] == "3") { 
if (
$_GET['type'] == "desc") { 
$link3 "asc"
} else { 
$link3 "desc"



if (
$_GET['sort'] == "4") { 
if (
$_GET['type'] == "desc") { 
$link4 "asc"
} else { 
$link4 "desc"



if (
$_GET['sort'] == "5") { 
if (
$_GET['type'] == "desc") { 
$link5 "asc"
} else { 
$link5 "desc"



if (
$_GET['sort'] == "6") { 
if (
$_GET['type'] == "desc") { 
$link6 "asc"
} else { 
$link6 "desc"



if (
$_GET['sort'] == "7") { 
if (
$_GET['type'] == "desc") { 
$link7 "asc"
} else { 
$link7 "desc"



if (
$_GET['sort'] == "8") { 
if (
$_GET['type'] == "desc") { 
$link8 "asc"
} else { 
$link8 "desc"



if (
$_GET['sort'] == "9") { 
if (
$_GET['type'] == "desc") { 
$link9 "asc"
} else { 
$link9 "desc"



if (
$link1 == "") { $link1 "asc"; } // for torrent name 
if ($link2 == "") { $link2 "desc"; } 
if (
$link3 == "") { $link3 "desc"; } 
if (
$link4 == "") { $link4 "desc"; } 
if (
$link5 == "") { $link5 "desc"; } 
if (
$link6 == "") { $link6 "desc"; } 
if (
$link7 == "") { $link7 "desc"; } 
if (
$link8 == "") { $link8 "desc"; } 
if (
$link9 == "") { $link9 "desc"; } 
if (
$variant == "index"

OpenTable("&nbsp;"); 
        echo 
"<p class=\"explane\">"._btmfreetorrentexplain."</p>"
        echo 
"<p class=\"explane\">"._btmnuketorrentexplain."</p>"
CloseTable(); 


echo 
"<table border=\"0\" width=\"100%\"><tr><td align=\"left\" ><p>".$prev."</p></td><td align=\"center\"><p>".(($pages 1) ? $pager "")."</p></td><td align=\"right\"><p>".$next."</p></td></tr></table>"
echo  
"<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\" >\n"
echo
"<tbody><tr>\n"
echo
"<td class=\"colhead\" align=\"center\"><a href=\"$phpself?sort=4&type=$link4\" title=\"Sort by "._bttype." ".$link4."\">"._bttype."</a></td>\n"
echo
"<td class=\"colhead\" align=\"left\"><a href=\"$phpself".$oldlink."sort=1&type=$link1\" title=\"Sort by "._btname." ".$link1."\">"._btname."</a></td>\n"
echo
"<!--<td class=\"heading\" align=left>DL</td>-->\n"

echo
"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">".pic("completed.gif",null,_btnfile)."</a></td>\n"

echo
"<td class=\"colhead\" align=\"right\">".pic("icon_comment.png",null,_bt_offers_comments)."</td>\n"
echo
"<td class=\"colhead\" align=\"center\">".pic("icon_rating.png",null,_btvote)."</td>\n"
echo
"<td class=\"colhead\" align=\"center\">"._btadded."</td>\n"

//echo"<td class=\"colhead\" align=\"center\"><a href=\"browse.php?sort=added&h=7&d=DESC\"  >Time Alive</a></td>\n"; 
echo"<td class=\"colhead\" align=\"center\">".pic("pic_ratio.gif",null,_btpeerspeed)."</td>\n"
echo
"<td class=\"colhead\" align=\"center\"><a href=\"$phpself".$oldlink."sort=5&type=$link5\" title=\"Sort by Number of files ".$link5."\">".pic("icon_size.png",null,_btsize)."</a></td>\n"
echo
"<!--\n"
echo
"<td class=\"colhead\" align=right>Views</td>\n"
echo
"<td class=\"colhead\" align=right>Hits</td>\n"
echo
"-->\n"
echo
"<td class=\"colhead\" align=\"center\">"._bthits."</td>\n"
echo
"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=7&type=$link7\" title=\"Sort by "._btseeders." ".$link7."\">".pic("pic_uploaded.gif",null,_btseeders)."</a></td>\n"
echo
"<td class=\"colhead\" align=\"right\"><a href=\"$phpself".$oldlink."sort=8&type=$link8\" title=\"Sort by "._btleechers." ".$link8."\">".pic("pic_downloaded.gif",null,_btleechers)."</a></td>\n"
if (
$variant == "index")echo"<td class=\"colhead\" align=\"center\">"._btaddedby."</td>\n"
echo
"</tr>\n"
        while (
$row $db->sql_fetchrow($res)) { 
                
$id $row["id"]; 
echo
"<tr>\n"
echo
"<td style=\"padding: 0px;\" align=\"center\">"
                if (isset(
$row["cat_name"])) { 
                        if (!
$onlysearch AND $variant == "index") echo "<a href=\"$phpself?cat=".$row["category"]."\">"
                        if (isset(
$row["cat_pic"]) AND $row["cat_pic"] != "" AND is_readable("themes/".$theme."/pics/cat_pics/".$row["cat_pic"])) 
                                echo 
"<img border=\"0\" src=\"themes/" $theme "/pics/cat_pics/"$row["cat_pic"] . "\" alt=\"" $row["cat_name"] . "\" >"
                                elseif (isset(
$row["cat_pic"]) AND $row["cat_pic"] != "" AND is_readable("cat_pics/".$row["cat_pic"])) 
                                echo 
"<img border=\"0\" src=\"cat_pics/" $row["cat_pic"] . "\" alt=\"" $row["cat_name"] . "\" >"
                        else 
                                echo 
$row["cat_name"]; 
                        if (!
$onlysearch AND $variant == "index") echo "</a>"
                } else echo 
"-"
echo
"</td>\n"
echo
"<td align=\"left\">"
                
$imgs 0
                
//help(pic ("help.gif","",null),preg_replace("/[^0-9a-z -< >._#]/i",'',$row["descr"]),$dispname); 
                
if($row["ratiobuild"] == "yes" || $free_dl) {help(pic ("magic.gif","",null),"This File Is Set As A Ratio Builder Yuor Download Is  Not Counted Only your Upload");$imgs++; } 
                if(
$row["nuked"] == "yes") {help(pic ("nuked.gif","",null),"This File Has Been Nuked. Wich meens It may have parts   missing Sound is off time or some other troubles so   download at your own risk"); $imgs++; } 
                if (
$row["evidence"] != 0) { echo pic("sticky.gif",null,_btalt_sticky); $imgs++; } 
        if (
$row["banned"] == "yes") { echo pic("banned.png",null,_btalt_banned); $imgs++; } 
        if (
$row["type"]=="link") { echo pic("minidonkey.gif",$row["ed2k"],_btalternatesource); $imgs++; } 
        if (
$row["tracker"] != "" AND $row["tracker"] != "dht:") { echo pic("external.gif",null,_btalt_external); $imgs++; } 
                if (
$imgs == 2) { echo ""$imgs 0; } 
                if (
$row["dht"] == "yes" AND $variant != "mytorrents") { help(pic("dht.gif","",null),_btdhtexplanation,_btdht); $imgs++; } 
                
$dispname htmlspecialchars($row["name"]); 
                
$dispname str_replace("_"" "$dispname); 
                
$dispname str_replace("."" "$dispname); 
        echo 
"<nobr><p class=\"title\"><a STYLE=\"text-decoration:none\"  href=\"details.php?id=".$id
                if (
$row["owner"] != $user->id
                        echo 
"&hit=1"

                echo 
"\"  title=\"".$dispname."\"><nobr>".((strlen($dispname) <= 37) ? search_word($dispname$search): search_word(substr($dispname,0,36)."..."$search))."</a></p>"
if ((
checkaccess("download")) AND $row["type"] != "link") echo"<a class=\"index\" href=\"download.php?id=".$row["id"]."\"><img style=\"border: medium none ;\" alt=\"download\"   src=\"themes/acidtech/pics/download2.gif\" align=\"right\" >"
echo
"</nobr></a>"
                if (
$variant == "index" OR $variant == "usertorrent") echo ""
                
//Edit & Delete 
                
if ($user->moderator OR ($row["owner"] == $user->id AND $row["owner"] != "0")) echo pic("edit.gif","edit.php?id=".$row["id"],_btalt_edit).pic("drop.gif","edit.php?op=delete&id=".$row["id"],_btalt_drop); 
        
// Ban 
        
if ($user->moderator AND $row["banned"] != "yes"){ 
            echo 
pic("ban.png","edit.php?op=ban&id=".$row["id"],_btban); 
        } 
        
//Scrape 
        
if ($row["tracker"] != "") { 
            if (
$user->user){ 
                if (
time()- sql_timestamp_to_unix_timestamp($row["tracker_update"])> 1800) { 
                     echo 
pic("refresh.png","scrape-external.php?id=".$row["id"]."&tracker=".$row["tracker"]."&return="urlencode($_SERVER["REQUEST_URI"]),_btalt_scrape); 
                }else{ 
                    echo 
pic("refresh_gray.png",NULL,_btalt_noscrape); 
                } 
             
            }elseif (
$user->moderator){ 
                echo 
pic("refresh.png","scrape-external.php?id=".$row["id"]."&tracker=".$row["tracker"]."&return="urlencode($_SERVER["REQUEST_URI"]),_btalt_scrape); 
            }else{ 
                echo 
pic("refresh_gray.png","scrape-external.php",_btalt_logintoscrape); 
                       } 
        } 
                
//Permission Administration 
                
if ($torrent_global_privacy AND $user->user AND $row["type"] != "link") { 
                        if (
$row["owner"] == $user->id) { 
                                
$pic "auth_none.gif"
                                
$authsql "SELECT status FROM ".$db_prefix."_privacy_file WHERE torrent = '".$row["id"]."' AND status = 'pending';"
                                
$authres $db->sql_query($authsql) or btsqlerror($authsql); 
                                if (
$db->sql_numrows($authres) > 0$pic "auth_pending.gif"
                                echo 
pic($pic,"mytorrents.php?op=displaytorrent&id=".$row["id"]); 
                        } elseif (!
can_download($user,$row)) { 
                                
$authres $db->sql_query("SELECT status FROM ".$db_prefix."_privacy_file WHERE torrent = '".$row["id"]."' AND slave = '".$user->id."' LIMIT 1;"); 
                                if (
$db->sql_numrows($authres) == 0) echo pic("lock_request.gif","details.php?op=authorization&id=".$row["id"],_btalt_lock_request); 
                                else echo 
pic("lock.gif",null,_btalt_lock); 
                        } 
                } 
                if (
$variant == "index")echo"<span id=ID" $row["id"] . "><a onclick=\"sndReq('op=view_details&torrent=" $row["id"] . "', 'ID" $row["id"] . "')\">".pic("plus.gif","",_btddetails)."</a></span>"
echo
"</td>\n"
echo
"<td align=\"right\">"
                if (
$variant == "index" OR $variant == "usertorrent") { 
                        
//Size 

                        
if ($row["type"] == "single" OR $row["numfiles"] <= 1
                                echo(
"<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" .$row["numfiles"]."</a>"); 
                        else { 
                                if (
$row["owner"] != $user->id
                                        echo 
"<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" $row["numfiles"] . "</a>"
                                else 
                                        echo 
"<a href=\"$phpself".$oldlink."sort=2&type=$link2\" title=\"Sort by Number of files ".$link2."\">" $row["numfiles"] . "</a>"
                        } 
                } 
echo
"</td>\n"
echo
"<td align=\"right\">"
                if (!
$row["comments"]) 
                        print(
$row["comments"] . ""); 
                else { 
                        
$hit = ($row["owner"] == $user->id) ? "" "&hit=1"
                        echo 
"<b><a href=\"details.php?id=".$row["id"].$hit."&comm=startcomments\">" $row["comments"] . "</a></b>"
                } 
echo
"</td>\n"
echo
"<td align=\"center\">"
                if (!isset(
$row["rating"])) 
                        echo 
"---"
                else { 
                        
$rating round($row["rating"] * 2) / 2
                        
$rating ratingpic($row["rating"]); 
                        if (!isset(
$rating)) 
                                echo 
"---"
                        else 
                                echo (
$rating); 
                } 
echo
"</td>\n"
echo
"<td align=\"center\">".$row['added']."</td>\n"

//echo"<td align=\"center\">10hours</td>\n"; 
echo"<td align=\"center\">"
                if (
$row["type"] != "link" AND $row["tracker"] == "") { 
                        if (
$row["leechers"] > AND $row["speed"] > 0) { 
                                
$ro $row["seeders"]/$row["leechers"]; 
                                
$speed_leech = ($ro == 0) ? round($row["speed"]/$row["leechers"]) : min($row["speed"],round($row["speed"]*$ro)); 
                                
$edt_m = ($row["size"] / $speed_leech)/60//to minutes 
                                
$edt = ($edt_m 60)."m"//minutes 
                                
$edt_h floor($edt_m 60); 
                                if (
$edt_h>0$edt $edt_h."h ".$edt
                                
$speed_leech mksize($speed_leech)."/s"
                        } else { 
                                
$speed_leech "--"
                                
$edt "--"
                        } 
                } 
echo
"".mksize($row["speed"])."/s</td>\n"
echo
"<td align=\"center\">".mksize($row["size"])."</td>\n"
$totsql "SELECT count(`torrentid`)as `snatch` FROM `torrent_snatched`  WHERE `torrentid` = '".$row["id"]."'"
$totres $db->sql_query($totsql); 
$sncount $db->sql_fetchrow($totres); 
echo
"<td align=\"center\">".$sncount['snatch']."times</td>\n"
echo
"<td align=\"right\"><b>".$row["seeders"]."</b></td>\n"
echo
"<td align=\"right\"><b>".$row["leechers"]."</b></td>\n"
if (
$variant == "index"){ 
echo
"<td align=\"center\">"
                if (
$variant == "index") { 
                        if (isset(
$row["username"]) AND $row["ownertype"]==0) { 
                                echo 
"<a href=\"user.php?op=profile&username=".$row["username"]."\"><font color=\"".getusercolor($row["can_do"])."\">" htmlspecialchars($row["user_name"])."</font></a>"
                        } else 
                        echo 
"(<i>"._btunknown."</i>)"
                } 

echo
"</a></td>\n"

echo
"</tr>\n"

return; 

?>

Now in same folder open main.php and find:

PHP Code:

<?php
function OpenTable(
?>

and add before
PHP Code:

 <?php
include_once'themes/'.$theme.'/bittorrent.php';
?>

You may need a few images for the one I made if so let me know I well post them

pwnage 8th February 2010 02:03

How you get 1px lines(super thin lines)

joeroberts 8th February 2010 02:18

PHP Code:

echo  "<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n"

gives Me it

ahmedtm1 18th April 2010 04:43

Thank you Mr.joeroberts

Working with me

Hasan 5th May 2010 13:50

I did step by step but got this error:
Code:

Warning:  include_once(themes/1thank/bittorrent.php) [function.include-once]:  failed to open stream: No such file or directory in /home2/utorrent/public_html/themes/1thank/main.php  on line 42

Warning:  include_once() [function.include]:  Failed opening 'themes/1thank/bittorrent.php' for inclusion  (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/utorrent/public_html/themes/1thank/main.php  on line 42

Thanks in advance!

joeroberts 6th May 2010 04:04

Please read My first POST a little closer
Quote:

Now go the your themes folder ((Themes/pmbt))
create new file bittorrrent.php and add to it
In your theme would be themes/1thank:drink:

Hasan 6th May 2010 12:17

Quote:

Originally Posted by joeroberts (Post 22865)
Please read My first POST a little closer

In your theme would be themes/1thank:drink:

I did go into the folder (Theme/1thank) and did step by step what u tol me to do, still gave me the error. :P

daffy 6th May 2010 13:18

did you make sure to create new file bittorrrent.php and add to themes/ithank

Hasan 6th May 2010 14:41

Quote:

Originally Posted by daffy (Post 22869)
did you make sure to create new file bittorrrent.php and add to themes/ithank

Yes, i did that as well.

joeroberts 7th May 2010 05:42

If your getting file not found then you put it in the wrong place have a chmod problem or you misslabled it.

Hasan 7th May 2010 14:36

Quote:

Originally Posted by joeroberts (Post 22892)
If your getting file not found then you put it in the wrong place have a chmod problem or you misslabled it.

hmm

Step1

I open include/bittorrent.php
found and added the code u said, so its loo lie this
PHP Code:

function torrenttable($res$variant "index"$user ""$block =  "") {
        global 
$db$name$search$user$download_level,  $torrent_global_privacy$onlysearch$db_prefix$autoscrape$theme,  $btback1$btback2$btback3$free_dl;
if(
function_exists('theme_torrenttable'))return theme_torrenttable($res,  $variant$user$block); 


Then I made the bittorrent.php and added to theme/1thank

Then I found main.php at the same folder and edited

this, so its looked like this

PHP Code:

include_once'themes/'.$theme.'/bittorrent.php'
function 
OpenTable

I did everything as u wrote, but did not do chmod? What file shuold i do 777 on then ?

daffy 7th May 2010 14:54

post your main.php

Hasan 7th May 2010 22:27

Quote:

Originally Posted by daffy (Post 22914)
post your main.php

sure here mate

But I did not edit anything on main.php because it gave error last time..

PHP Code:

<?php
/*
*----------------------------phpMyBitTorrent V 2.0-----------------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*--------------   Created By Antonio Anzivino (aka DJ Echelon)   --------------*
*-------------               http://www.p2pmania.it               -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*-------------              http://www.bittorrent.com             -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*--   This program is free software; you can redistribute it and/or modify   --*
*--   it under the terms of the GNU General Public License as published by   --*
*--   the Free Software Foundation; either version 2 of the License, or      --*
*--   (at your option) any later version.                                    --*
*--                                                                          --*
*--   This program is distributed in the hope that it will be useful,        --*
*--   but WITHOUT ANY WARRANTY; without even the implied warranty of         --*
*--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          --*
*--   GNU General Public License for more details.                           --*
*--                                                                          --*
*--   You should have received a copy of the GNU General Public License      --*
*--   along with this program; if not, write to the Free Software            --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA --*
*--                                                                          --*
*------------------------------------------------------------------------------*
*------              �2005 phpMyBitTorrent Development Team              ------*
*-----------               http://phpmybittorrent.com               -----------*
*------------------------------------------------------------------------------*
*-----------------   Sunday, September 27, 2008 8:37 PM   ---------------------*
*/

if(eregi("main.php",$_SERVER["PHP_SELF"])) die ("You can't access this file directly");

$tableopen false;
$errtableopen false;
$table2open false;
$btback1 "ffffff";
$btback2 "ffffff";
$btback3 "ffffff";
                   

function 
OpenTable($title "title"$tablewidth "") {
        global 
$tableopen$siteurl;
        if (
$tableopen) return;
        if(
$tablewidth !=""$stylewidth "style=\"width: ".$tablewidth."px;\"";
        else 
$stylewidth '';
        echo 
'<div class="forabg">
            <div class="inner"><span class="corners-top"><span></span></span>
            
        
            <ul class="topiclist">
                <li class="header">
                    <dl class="icon">
                        <dt>'
.$title.'</dt>

                    </dl>
                </li>
            </ul>
<span class="corners-bottom"><span></span></span></div>    
</div>'
;
           
    
$tableopen true;
}

function 
CloseTable() {
        global 
$tableopen$siteurl;
        if (!
$tableopen) return;
        echo 
'<div style="height: 2px;"></div>';

        
$tableopen false;
}

function 
OpenTable2($title "") {
      global 
$tableopen2$siteurl;
        if (
$tableopen2) return;
        echo 
"<div id=\"messagebox\" > ";
    echo 
"<span class=\"messagebox-title\">".$title."</span><div style=\"margin: 0 auto;\">";
           
    
$tableopen2 true;
 }

function 
CloseTable2() {
          global 
$tableopen2$siteurl;
        if (!
$tableopen2) return;
        echo 
"</div></div>";

        
$tableopen2 false;
}

function 
OpenNewsTable($title "") {
      global 
$OpenNewsTable$siteurl;
        if (
$OpenNewsTable) return;
        echo 
"<div id=\"newsbox\" > ";
           
    
$OpenNewsTable true;
 }

function 
CloseNewsTable() {
          global 
$OpenNewsTable$siteurl;
        if (!
OpenNewsTable) return;
        echo 
"</div>";

        
$OpenNewsTable false;
}

function 
OpenMessTable($title "") {
      global 
$OpenMessTable$siteurl;
        if (
$OpenMessTable) return;
        echo 
"<div id=\"messagebox\"> ";
    echo 
"<span class=\"messagebox-title\">".$title."</span>";
           
    
$OpenMessTable true;
 }

function 
CloseMessTable() {
          global 
$OpenMessTable$siteurl;
        if (!
$OpenMessTable) return;
        echo 
"</div>";

        
$OpenMessTable false;
}

function 
OpenSuccTable($title "") {
      global 
$OpenSuccTable$siteurl;
        if (
$OpenSuccTable) return;
        echo 
"<div id=\"successbox\" > ";
    echo 
"<span class=\"successbox-title\">".$title."</span>";
           
    
$OpenSuccTable true;
 }

function 
CloseSuccTable() {
          global 
$OpenSuccTable$siteurl;
        if (!
$OpenSuccTable) return;
        echo 
"</div>";

        
$OpenSuccTable false;
}
function 
OpenErrTable($title) {
      global 
$OpenErrTable$siteurl;
        if (
$OpenErrTable) return;
        echo 
"<div id=\"errorbox\" > ";
    echo 
"<span class=\"errorbox-title\">".$title."</span>";
           
    
$OpenErrTable true;
 }

function 
CloseErrTable() {
          global 
$OpenErrTable$siteurl;
        if (!
$OpenErrTable) return;
        echo 
"</div>";

        
$OpenErrTable false;
}
function 
themechange(){
{
global 
$bttheme;
        
$themes = Array();
        
$thememaindir "themes";
        
$themehandle opendir($thememaindir);
        while (
$themedir readdir($themehandle)) {
                if (
is_dir($thememaindir."/".$themedir) AND $themedir != "." AND $themedir != ".." AND $themedir != "CVS")
                        
$themes[$themedir] = $themedir;
        }
        
closedir($themehandle);
        unset(
$thememaindir,$themedir);
}
        
$change '';
foreach (
$themes as $key=>$val) {
        
$change .= "<option ";
        if (
$bttheme == $key$change .="selected ";
        
$change .= "value=\"".$key."\">".$val."</option>\n";
}
unset(
$themes);
return 
$change;
}
function 
languagechange(){
{
global 
$language;
        
$languages = Array();
        
$langdir "language";
        
$langhandle opendir($langdir);
        while (
$langfile readdir($langhandle)) {
                if (
eregi("\.php$",$langfile) AND strtolower($langfile) != "mailtexts.php")
                        
$languages[str_replace(".php","",$langfile)] = ucwords(str_replace(".php","",$langfile));
        }
        
closedir($langhandle);
        unset(
$langdir,$langfile);
}
        
$change '';
foreach (
$languages as $key=>$val) {
        
$change .="<option ";
        if (
$language == $key$change .="selected";
        
$change .=" value=\"".$key."\">".$val."</option>\n";
}
unset(
$languages);
return 
$change;
}

function 
themeheader() {
global 
$db$db_prefix$theme$siteurl$user$upload_level$sitename$gfx_check$donations$INVITEONLY,$onlysearch$pivate_mode$forumshare$shout_config$PHP_SELF;

if (
$user->user) {
        
//Update online user list
        
$pagename substr($_SERVER["PHP_SELF"],strrpos($_SERVER["PHP_SELF"],"/")+1);
        
$sqlupdate "UPDATE ".$db_prefix."_online_users SET page = '".addslashes($pagename)."', last_action = NOW() WHERE id = ".$user->id.";";
        
$sqlinsert "INSERT INTO ".$db_prefix."_online_users VALUES ('".$user->id."','".addslashes($pagename)."', NOW(), NOW())";
        
$res $db->sql_query($sqlupdate);
        if (!
$db->sql_affectedrows($res)) $db->sql_query($sqlinsert);
}
$who "".getusername($btuser)."";
$timestamp=time();                                                                                            
$timeout=$timestamp-$timeoutseconds=86400;  


$vtd "INSERT INTO 24hourvist VALUES ('$who','$timestamp','".getip()."','".$PHP_SELF."')"
$vtdud "UPDATE 24hourvist SET user = '$who', timestamp = '$timestamp', file = '".$PHP_SELF."' WHERE ip = '".getip()."'"
        
$restd $db->sql_query($vtdud);
        if (!
$db->sql_affectedrows($restd)) $db->sql_query($vtd);
$db->sql_query("DELETE FROM 24hourvist WHERE timestamp<$timeout");

echo 
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo 
"<html>\n";
echo 
"<head>\n";
echo 
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" >\n";
echo 
"<meta name=\"generator\" content=\"PMBT 2.0.2\" >\n";
echo 
"<meta http-equiv=\"Pragma\" content=\"no-cache\" >\n";
echo 
"<meta http-equiv=\"Expires\" content=\"-1\" >\n";
echo 
"<meta http-equiv=\"Cache-Control\" content=\"no-cache\" >\n";
echo 
"<!--[if lt IE 7]>
<script defer type=\"text/javascript\" src=\"
$siteurl/pngfix.js\"></script><![endif]-->";
echo 
"<title>".$sitename."</title>\n";
?>
<script type="text/javascript">
pmbtsite_url = "<?php echo $siteurl?>";
tag_prompt = "<?php echo _bb_tag_prompt?>";
img_prompt = "<?php echo _bb_img_prompt?>";
font_formatter_prompt = "<?php echo _bb_font_formatter_prompt?>";
link_text_prompt = "<?php echo _bb_link_text_prompt?>";
link_url_prompt = "<?php echo _bb_link_url_prompt?>";
link_email_prompt = "<?php echo _bb_link_email_prompt?>";
list_type_prompt = "<?php echo _bb_list_type_prompt?>";
list_item_prompt = "<?php echo _bb_list_item_prompt?>";
_btshoutnowprivate = "<?php echo _btshoutnowprivate?>";
shoutrefresht = "<?php echo $shout_config['refresh_time']; ?>";
shoutidle = "<?php echo $shout_config['idle_time']; ?>";
</script>
<?php
if (is_readable("themes/$theme/favicon.ico")) {
        echo 
"<link REL=\"shortcut icon\" HREF=\"$siteurl/themes/".$theme."/favicon.ico\" TYPE=\"image/x-icon\">\n";
}

if (!
$onlysearch) {
        echo 
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Last Torrents\" href=\"$siteurl/backend.php?op=last\">\n";
        echo 
"<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Best Torrents\" href=\"$siteurl/backend.php?op=best\">\n";
}


if (
is_readable("themes/$theme/style.css")) {
        echo 
"<link rel=\"StyleSheet\" href=\"$siteurl/themes/$theme/style.css\" type=\"text/css\">\n<script type=\"text/javascript\" src=\"$siteurl/global.js\"></script>\n";
}
overlib_init();
$catmen '';
foreach (
catlist() as $cat){
$catmen .= "<div class = \"helpm\"><a class=\"forumtitle\" href=\"torrents.php?cat=".$cat['id']."\">".$cat['name']."</a></div>";
}
echo 
"</head>\n\n";

define("BT_SHARE",true);
$themepage false;
if(
$user->user)echo "<body onload=\"shoutthis_ajax()\">\n";
else
echo 
"<body>";
echo
"<noscript>
<center><h3><font color=red>Javascript is not available!</font></h3></center>
<center><h3><font color=red>This website cannot function correctly without JavaScript!</font></h3></center>
</noscript>\n"
;
echo 
"<div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div>\n";
echo
'<div id="bodybg">
    <div id="pmbtwrapper">
        <div id="pmbshad-l">
            <div id="pmbshad-r">
                <div id="header">

                    <div id="head-l">

                        <div id="head-r">
                            <div id="userarea" class="smalltext"><p class="right">It is currently '
.date("D M j G:i:s T Y").'</p>

                            </div>
                            <div  class="smalltext">
                                    <div id="search-box">

                <form action="./search.php" method="post" id="search">
                

                    <input name="search" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search" onclick="if(this.value==\'Search\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\'Search\';" >
                    <input class="button2" value="Search" type="submit" ><br >
                                     
                </form>
            </div>

        

                            </div>
                        <a href="./index.php" title=""><span id="pmbtlogo">&nbsp;</span></a>

                        </div>
                    </div>
                </div>
                <div id="toolbar">
                    
        <div id="topmenu">

            <ul>'
;
echo 
"            <li><a  href=\"./index.php\"><span>Index</span></a></li>\n";
echo 
"<li>";
help("<a  href=\"./torrents.php\"><span>Torrents</span></a>","<div class=\"forabg\"><div class=\"inner\"><span class=\"corners-top\"><span></span></span><ul class=\"topiclist\"><li class=\"header\"><dl class=\"icon\"><dt><span onclick=\"return nd();\">Menu(Close)</span></dt></dl></li></ul><span class=\"corners-bottom\"><span></span></span></div></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"torrents.php\">All Torrents</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"viewrequests.php\">View Requests</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"./offers.php\">Torrents Offered</a><div class=\"poptoolbar\">Category's</div></div>".$catmen."<div style=\"height: 2px;\"></div>",'test','test');
echo 
"</li>";
if (
$forumshare)echo "            <li><a  href=\"./phpBB.php\"><span>Forums</span></a></li>\n";
if(
$user->user)echo "            <li><a  href=\"./memberslist.php\"><span>Members</span></a></li>\n";
if(
$user->user) {
echo 
"            <li><a  href=\"./games.php\"><span>Games</span></a></li>\n";
echo 
"<li>";
help("<a  href=\"./user.php\"><span>My Profile</span></a>","<div class=\"forabg\"><div class=\"inner\"><span class=\"corners-top\"><span></span></span><ul class=\"topiclist\"><li class=\"header\"><dl class=\"icon\"><dt><span onclick=\"return nd();\">Menu(Close)</span></dt></dl></li></ul><span class=\"corners-bottom\"><span></span></span></div></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"mytorrents.php\">Your Torrents</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"pm.php\">Private Messages</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"./user.php?op=profile&id=" $user->id ."\">User Control Panel</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"./mybonus.php\">Seeding Bonus</a></div><div style=\"height: 2px;\"></div>",'test','test');
echo 
"</li>";
}
if(!
$user->user)echo "            <li><a  href=\"./user.php?op=register\"><span>Register</span></a></li>\n";
if(!
$user->user)echo "                <li><a  href=\"./user.php?op=profile\"><span>Login</span></a></li>\n";
if(
$user->user)echo "                <li><a  href=\"./user.php?op=logout\"><span>Logout</span></a></li>\n";
if((
$user->user OR $upload_level == "all"))echo "            <li><a  href=\"upload.php\"><span>Upload</span></a></li>\n";
if(
$user->admin)echo "            <li><a  href=\"admin.php\"><span>Admin</span></a></li>";
echo
"<li>\n";
help("<a  href=\"./chat.php\"><span>Help</span></a>","<div class=\"forabg\"><div class=\"inner\"><span class=\"corners-top\"><span></span></span><ul class=\"topiclist\"><li class=\"header\"><dl class=\"icon\"><dt><span onclick=\"return nd();\">Menu(Close)</span></dt></dl></li></ul><span class=\"corners-bottom\"><span></span></span></div></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"chat.php\">Chat</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"rules.php\">Rules</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"faq.php\">F.A.Q</a></div><div class = \"helpm\"><a class=\"forumtitle\" href=\"staff.php\">Staff</a></div><div style=\"height: 2px;\"></div>",'test','test');
echo 
'</li>';
echo 
'</ul>
        </div>
                </div>
<div id="bodyarea">
<br ><br >'
;
function 
newuserpage($page)
{
if(
eregi("user.php",$page))return true;
if(
eregi("takeconfirminvite.php",$page))return true;
if(
eregi("confirminvite.php",$page))return true;
return 
false;
}
if(
$pivate_mode AND !$user->user AND !newuserpage($_SERVER["PHP_SELF"])){
 
loginrequired("user"false);
include
'footer.php';
}
$reason "";
if (
is_banned($user$reason)) {
        echo 
"<p>&nbsp;</p>\n";
        echo 
"<p>&nbsp;</p>\n";
        echo 
"<h3 align=\"center\">".str_replace("**reason**",htmlspecialchars($reason),_btbannedmsg)."</p>\n";
        echo 
"<p>&nbsp;</p>\n";
        echo 
"<p>&nbsp;</p>\n";
        include(
"footer.php");
        die();
}

$has_newpm false;
$sql "SELECT id FROM ".$db_prefix."_private_messages WHERE recipient = '".$user->id."' AND is_read = 'false' LIMIT 1;";
$res $db->sql_query($sql) or btsqlerror($sql);
$has_newpm = ($db->sql_numrows($res) > 0) ? true false;
$db->sql_freeresult($res);
if (
$has_newpm)
{
  echo 
"<script type=\"text/javascript\" language=\"JavaScript\">";
  echo 
"sPath = window.location.pathname;";
  echo 
"sPage = sPath.substring(sPath.lastIndexOf('/') + 1);";
  
  echo 
"if (sPage != \"pm.php\"){ var answer = confirm (\""._jscriptconfirmtext."\");";
  echo 
"if (answer) window.location=\"pm.php?op=inbox\";";
  echo 
"}";
  echo 
"</script>";

}

}

function 
overlib_init() {
        echo 
"<script type=\"text/javascript\" src=\"overlib/overlib.js\"><!-- overLIB (c) Erik Bosrup --></script>\n";
        echo 
"<script type=\"text/javascript\" src=\"overlib/overlib_shadow.js\"><!-- overLIB (c) Erik Bosrup --></script>\n";
}
function 
themefooter(){
global 
$startpagetime;
echo
"</div>";#right hand collom here
echo'<div id="footer">
                    <div id="foot-l">
                        <div id="foot-r">
                            <div id="footerarea">
                <span class="smalltext">
                
        <span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif; color:#FFFFFF;">

<p>
 <!-- Feel free to add you custom disclaimer or copyright notice here -->
 <!-- YOU ARE NOT ALLOWED TO EDIT THE FOLLOWING COPYRIGHT NOTICE!!! -->

U-torrentz.org &copy; 2010 <a href="http://www.u-torrentz.org">U-torrentz</a>.
Original Code and Design By <a href="http://www.phpmybittorrent.com" target="_blank">PhpMyBitTorrent</a> 
The Development Team cannot be held responsible in any way for the results of the use of this software.

 <!-- END OF COPYRIGHT NOTICE -->
 Generated in ' 
abs(round(microtime()-$startpagetime,2)) . ' seconds
 </p>
        
        </span>
        </span>

        
                            </div>
                        </div>
                    </div>
                </div>
                <div>
    <a id="bottom" name="bottom" accesskey="z"></a>
    </div>
</div>
</div>
</div>
</div>
</body>
</html>'
;
}
function 
help($name,$help,$title "",$link "") {
        if (
$link != "") echo "<span class=\"overlib\" onclick=\"return overlib('".addslashes(str_replace(Array("\n","\""),Array("","'"),$help)),"'";
        if (
$link == "") echo "<span class=\"overlib\" onmouseover=\"return overlib('".addslashes(str_replace(Array("\n","\""),Array("","'"),$help)),"'";
        if (
$title != "" AND $link == "") echo ",CAPTION, '".addslashes(str_replace(Array("\n","\""),Array("","'"),$title))."'";
       
// if ($title != "" AND $link != "") echo ",CAPTION, '".addslashes(str_replace(Array("\n","\""),Array("","'"),$title))."'";
        
if ($link == "") echo ",TEXTFONT,'Verdana',TEXTCOLOR,'#FFFFFF',CAPTIONFONT,'Lucida Console, Verdana',CENTER,FGCOLOR,'#000000',BGCOLOR,'#6F7578',CAPICON,'themes/1thank/pics/help.png',BORDER,2,SHADOW,SHADOWOPACITY,40,SHADOWCOLOR,'#030303',SHADOWX,2,SHADOWY,2);\" onmouseout=\"return nd();\" style=\"cursor:help\">".$name."</span>";
        if (
$link != "") echo ",CELLPAD,'0',FOLLOWMOUSE,'0',TEXTFONT,'Verdana',TEXTCOLOR,'#FFFFFF',CAPTIONFONT,'Lucida Console, Verdana',CENTER,FGCOLOR,'#000000',BGCOLOR,'#6F7578',CAPICON,'themes/1thank/pics/help.png',SHADOW,SHADOWOPACITY,40,SHADOWCOLOR,'#030303',SHADOWX,2,SHADOWY,2);\"  >".$name."</span>";
}


daffy 7th May 2010 23:48

3 Attachment(s)
take these. bittorrent.php into your theme/1thank/ and main.php into theme/1thank/

replace existing main and bittorrent.php if asked. screen below matey. wasnt keen on this theme at first buts its quite attractive lol.

edit. you may need images, if so il post what i use what you can see. or you can edit in theme/1thank/bittorrent.php

Hasan 8th May 2010 12:01

Quote:

Originally Posted by daffy (Post 22925)
take these. bittorrent.php into your theme/1thank/ and main.php into theme/1thank/

replace existing main and bittorrent.php if asked. screen below matey. wasnt keen on this theme at first buts its quite attractive lol.

edit. you may need images, if so il post what i use what you can see. or you can edit in theme/1thank/bittorrent.php

Thanks alot Daffy but I figured out why it did not work..

Im an IDOIT, if you ever see me kill me...

I looked at the codes again and saw that that php file did not have the same as mine, thats why it could not find it... LOL...



But there is a problem the width is to much, any idea how to make it smaller so it fit to my site lol ?

and you more then welcome to send the images u use :)!

daffy 8th May 2010 17:13

for width alter how many display name charactors are shown.

Code:

echo "\"  title=\"".$dispname."\">".((strlen($dispname) <= 37) ? search_word($dispname, $search): search_word(substr($dispname,0,36)."...", $search))."

"
;

whilst im here, anyway we can get users color to show on torrent table.

joeroberts 9th May 2010 10:13

Quote:

Originally Posted by daffy (Post 22936)
whilst im here, anyway we can get users color to show on torrent table.

yea open torrents.php and find
PHP Code:

        $sql "SELECT ".$db_prefix."_torrents.*, IF(".$db_prefix."_torrents.numratings < '".$minvotes."', NULL, ROUND(".$db_prefix."_torrents.ratingsum / ".$db_prefix."_torrents.numratings, 1)) AS rating, ".$db_prefix."_categories.name AS cat_name, ".$db_prefix."_categories.image AS cat_pic, U.username, IF(U.name IS NULL, U.username, U.name) as user_name, U.level as user_level FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON category = ".$db_prefix."_categories.id LEFT JOIN ".$db_prefix."_users U ON ".$db_prefix."_torrents.owner = U.id WHERE ".$viswhere.$catwhere.$passwhere.$orderby.$db_prefix."_torrents.added DESC LIMIT ".$from.",".$torrent_per_page.";"

and replace with
PHP Code:

        $sql "SELECT ".$db_prefix."_torrents.*, IF(".$db_prefix."_torrents.numratings < '".$minvotes."', NULL, ROUND(".$db_prefix."_torrents.ratingsum / ".$db_prefix."_torrents.numratings, 1)) AS rating, ".$db_prefix."_categories.name AS cat_name, ".$db_prefix."_categories.image AS cat_pic, U.username, IF(U.name IS NULL, U.username, U.name) as user_name, U.level as user_level, U.can_do as can_do FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON category = ".$db_prefix."_categories.id LEFT JOIN ".$db_prefix."_users U ON ".$db_prefix."_torrents.owner = U.id WHERE ".$viswhere.$catwhere.$passwhere.$orderby.$db_prefix."_torrents.added DESC LIMIT ".$from.",".$torrent_per_page.";"


Hasan 11th May 2010 15:33

Everything works fine in firefox, expect in IE, some IMAGE/name are not shown in IE ? ( using 1thank theme)

Comments/Ratings and Size is not showing... www.u-torrentz.org. take a look.

How to fix that?

daffy 11th May 2010 15:42

The requested URL /themes/1thank/pics/icon_rating.png does not exist.


you dont have images. that is in ff

Hasan 11th May 2010 15:52

Quote:

Originally Posted by daffy (Post 22979)
The requested URL /themes/1thank/pics/icon_rating.png does not exist.

you dont have images. that is in ff

why do it work on Firefox not in EI then? ( its not a image sorry, its just written lol down?

\n";
you should be able to see what to remove for your other one.
daffy 11th May 2010 17:00

EI? i only use FireFox. you have it pointing to an image. that could be why it is not showing text. you need to remove the part what shows image.

change around line 154 for comments to this

Code:

echo"
comments

Hasan 11th May 2010 18:04

Quote:
\n";
you should be able to see what to remove for your other one.

Originally Posted by daffy (Post 22981)
EI? i only use FireFox. you have it pointing to an image. that could be why it is not showing text. you need to remove the part what shows image.

change around line 154 for comments to this

Code:

echo"
comments
yeap that worked, thanks !


All times are GMT +2. The time now is 05:29.

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