Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   BT.Manager (phpMyBitTorrent) (http://www.bvlist.com/forumdisplay.php?f=23)
-   -   RSS Error (http://www.bvlist.com/showthread.php?t=484)

Fynnon 20th June 2008 11:46

RSS Error
 
I get this RSS Error on IE7:

Code:

Only one top level element is allowed in an XML document.
 Line: 3 Character: 2

Parse error:  syntax error, unexpected T_ELSE in /bvlist.com/phpmy/include/rss/backend-php5.php on line 33

:unknown:

http://www.bvlist.com/phpmy/backend.php?op=best

joeroberts 20th June 2008 14:17

Re: RSS Error
 
you dont have any torrents there to generate a list :D:

demonbogdan 12th July 2008 09:27

another problem
 
when i try to view my profile and my uploaded torrents apear this:

Torrents by

Code:

Catchable fatal error: Object of class User could not be converted to string in /home/demon/public_html/torrent/include/bittorrent.php on line 84
:warrior:

joeroberts 12th July 2008 10:14

Re: RSS Error
 
open bittorrent.php find
Code:

        if ($variant == "index") {
                OpenTable("Torrents");
        } elseif ($variant == "mytorrents") {
                OpenTable(_btmytorrents);
        } elseif ($variant == "usertorrent") {
                OpenTable(str_replace("**user**",$user,_btusertorrents));
        }

and remove it then go down to bottom and find
Code:

        CloseTable();
and remove it.

demonbogdan 12th July 2008 18:27

Re: RSS Error
 
thanks a lot :)

at me appear :
Code:

Parse error: syntax error, unexpected T_ELSE in /home/demon/public_html/torrent/include/rss/backend-php5.php on line 33
but i have torrents :|

:happy:

pls help me, sorry for my english !

joeroberts 12th July 2008 19:21

Re: RSS Error
 
please give me link so I may check!

demonbogdan 13th July 2008 03:12

Re: RSS Error
 
Quote:

Originally Posted by joeroberts
please give me link so I may check!


joeroberts 13th July 2008 04:48

Re: RSS Error
 
We well start with please replace the footer with copy rite info as stated in the rules.
then you can replace your backend.php with
Code:

/*
*-------------------------------phpMyBitTorrent--------------------------------*
*--- 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              -----------*
*------------------------------------------------------------------------------*
*/

require_once("include/config_lite.php");
function searchfield($s) {
        return preg_replace(array('/[^a-z0-9]/si', '/^\s*/s', '/\s*$/s', '/\s+/s'), array(" ", "", "", " "), $s);
}


//Last Torrents
if (!isset($op)) $op = "";
switch($op) {
        case "category": {
                $sql = "SELECT id, name, descr, seeders, leechers, category FROM ".$db_prefix."_torrents
                                WHERE banned = 'no' AND visible = 'yes' AND category = '".$cat."' AND password IS NULL
                                ORDER BY tot_peer, seeders, completed, added DESC LIMIT 10;";
                                $sql_cat = "SELECT name FROM ".$db_prefix."_categories
                                WHERE id = ".$cat."";
                $res = $db->sql_query($sql_cat);
                $cat_row = $db->sql_fetchrow($res);
                $descr = "Best 10 Torrents for Category ".$cat_row['name']." on ".$sitename."' (files feed)";
                break;
        }
        case "best": {
                $sql = "SELECT id, name, descr, seeders, leechers, category, owner, added FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible = 'yes' AND password IS NULL ORDER BY tot_peer, seeders, completed, added DESC LIMIT 10;";
                $descr = "Best 10 Torrents on ".$sitename."' (files feed)";
                break;
        }
        case "search": {
                        if(!isset($dead))
                                $rssdead ="AND visible = 'yes' ";
                                else
                                $rssdead = "";
                if (!isset($search)) $search = "";
                $cat = (isset($cat)) ? intval($cat) : 0;
                $orderby = (isset($orderby)) ? intval($orderby) : -1;
                $sql = "SELECT id, name, descr, seeders, leechers, category FROM ".$db_prefix."_torrents  WHERE banned = 'no' ".$rssdead." AND password IS NULL ";
                if (!empty($search)) $sql .= " AND search_text LIKE ('%".addslashes(searchfield($search))."%') ";
                if (!isset($ordertype) OR $ordertype != "ASC") $ordertype = "DESC";
                if (isset($incldead) AND $incldead != "true") $sql .= "AND visible = 'yes' ";
                if ($cat > 0) $sql .= " AND category = '".$cat."' ";

switch ($orderby) {
        case 0: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.added ".$ordertype;
                break;
        }
        case 1: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.seeders ".$ordertype;
                break;
        }
        case 2: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.leechers ".$ordertype;
                break;
        }
        case 3: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.tot_peer ".$ordertype;
                break;
        }
        case 4: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.downloaded ".$ordertype;
                break;
        }
       
        case 5: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.ratingsum ".$ordertype;
                break;
        }
        case 6: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.name ".$ordertype;
                break;
        }
        case 7: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.size ".$ordertype;
                break;
        }
        case 8: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.numfiles ".$ordertype;
                break;
        }
        default: {
                $sql .= "ORDER BY ".$db_prefix."_torrents.id ".$ordertype;
        }
                }
                $sql .= " LIMIT 10;";
                $descr = "Results for search term '".$search." on ".$sitename."' (files feed)";
                break;
        }
        case "last":
        default: {
                $sql = "SELECT id, name, descr, seeders, leechers, category, owner, added FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible = 'yes' AND password IS NULL ORDER BY added DESC LIMIT 10;";
                $descr = "The Latest 10 Torrents on ".$sitename." (files feed)";
        }
}


$res = $db->sql_query($sql);
$rss = '';
$rss .= '
 
    '.$sitename.'
    '.$siteurl.'/
    '.$descr.'
    en-us';

while ($row = $db->sql_fetchrow($res)) {
                $cat = "SELECT name FROM ".$db_prefix."_categories WHERE id = ".$row["category"]." ;";
$cat2 = $db->sql_query($cat);
$cat3 = $db->sql_fetchrow($cat2);
                $sql_own = "SELECT username FROM ".$db_prefix."_users WHERE id = ".$row["owner"]." ;";
$sql_own1 = $db->sql_query($sql_own);
$owner = $db->sql_fetchrow($sql_own1);


        $ids = $row["id"];
        $names = $row["name"];
        $descrption = "<font size=\"3\"><b>Category:</b></font> ".$cat3["name"]."<br /><font size=\"3\"><b>Description:</b><br /></font> ".htmlspecialchars($row["descr"])."<br /> <font size=\"3\"><b>Seeders: </b></font>".$row["seeders"]."<br /> <font size=\"3\"><b>Leeches: </b></font>".$row["leechers"];
$rss .='
      '.$names.'
      '.$siteurl.'/details.php?id='.$ids.'
      '.$descrption.'
          '.$owner['username'].'
   
';
      }
$rss .=' 

';

$db->sql_freeresult($res);
$db->sql_freeresult($cat2);
$db->sql_freeresult($sql_own1);

if (!$persistency) $db->sql_close();

echo ($rss);

die();
?>


demonbogdan 13th July 2008 11:26

Re: RSS Error
 
Code:

Fatal error: Cannot redeclare get_elapsed_time() (previously declared in /home/demon/public_html/torrent/votesview.php:16) in /home/demon/public_html/torrent/include/functions.php on line 72

joeroberts 13th July 2008 15:09

Re: RSS Error
 
Quote:

Originally Posted by demonbogdan
Code:

Fatal error: Cannot redeclare get_elapsed_time() (previously declared in /home/demon/public_html/torrent/votesview.php:16) in /home/demon/public_html/torrent/include/functions.php on line 72

please read viewtopic.php?f=58&t=770

demonbogdan 13th July 2008 21:01

Re: RSS Error
 
sorry man.. i edit the footer :)

pls help me
appear another error when i try to give a pm mass

Code:

Fatal error: Call to undefined function sqlesc() in /home/demon/public_html/torrent/admin/files/staffmess.php on line 36

joeroberts 13th July 2008 21:11

Re: RSS Error
 
Quote:

Originally Posted by demonbogdan
sorry man.. i edit the footer :)

pls help me
appear another error when i try to give a pm mass

Code:

Fatal error: Call to undefined function sqlesc() in /home/demon/public_html/torrent/admin/files/staffmess.php on line 36

remove line 36
Code:

$dt = sqlesc(get_date_time());

Quote:

Originally Posted by demonbogdan
Code:

Fatal error: Cannot redeclare get_elapsed_time() (previously declared in /home/demon/public_html/torrent/votesview.php:16) in /home/demon/public_html/torrent/include/functions.php on line 72

remove from line 16-35
Code:

function get_elapsed_time($ts)
{
  $mins = floor((gmtime() - $ts) / 60);
  $hours = floor($mins / 60);
  $mins -= $hours * 60;
  $days = floor($hours / 24);
  $hours -= $days * 24;
  $weeks = floor($days / 7);
  $days -= $weeks * 7;
  $t = "";
  if ($weeks)
    return "$weeks week" . ($weeks > 1 ? "s" : "");
  if ($days)
    return "$days day" . ($days > 1 ? "s" : "");
  if ($hours)
    return "$hours hour" . ($hours > 1 ? "s" : "");
  if ($mins)
    return "$mins min" . ($mins > 1 ? "s" : "");
  return "< 1 min";
}


demonbogdan 13th July 2008 23:47

Re: RSS Error
 
i dont have in my phpmybittorrent in torrent vitesiteview.php
and in functions ... at line 16-35 appear
Code:

}


function mkglobal($vars) {
    if (!is_array($vars))
        $vars = explode(":", $vars);
    foreach ($vars as $v) {
        if (isset($_GET[$v]))
            $GLOBALS[$v] = unesc($_GET[$v]);
        elseif (isset($_POST[$v]))
            $GLOBALS[$v] = unesc($_POST[$v]);
        else
            return 0;
    }
    return 1;
}

function btsqlerror($sql) { //Returns SQL Error
        global $db, $db_prefix;
        $err = Array();


i try the link from your tracker and appear
Code:

Fatal error: Cannot redeclare get_elapsed_time() (previously declared in /home/joerobe/domains/moviegamesmore.net/public_html/votesview.php:16) in /home/joerobe/domains/moviegamesmore.net/public_html/include/functions.php on line 163

joeroberts 14th July 2008 02:55

Re: RSS Error
 
open votesview.php and remove lines 16-35
Code:

function get_elapsed_time($ts)
{
  $mins = floor((gmtime() - $ts) / 60);
  $hours = floor($mins / 60);
  $mins -= $hours * 60;
  $days = floor($hours / 24);
  $hours -= $days * 24;
  $weeks = floor($days / 7);
  $days -= $weeks * 7;
  $t = "";
  if ($weeks)
    return "$weeks week" . ($weeks > 1 ? "s" : "");
  if ($days)
    return "$days day" . ($days > 1 ? "s" : "");
  if ($hours)
    return "$hours hour" . ($hours > 1 ? "s" : "");
  if ($mins)
    return "$mins min" . ($mins > 1 ? "s" : "");
  return "< 1 min";
}



All times are GMT +2. The time now is 21:43.

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