Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #1  
Old 20th June 2008, 11:46
Fynnon's Avatar
Fynnon Fynnon is offline
xxx
 
Join Date: Nov 2007
P2P
Posts: 984
Default 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
Reply With Quote
  #2  
Old 20th June 2008, 14:17
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default Re: RSS Error
you dont have any torrents there to generate a list :D:
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #3  
Old 12th July 2008, 09:27
demonbogdan demonbogdan is offline
Member
 
Join Date: Jul 2008
Posts: 10
Default 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:
Reply With Quote
  #4  
Old 12th July 2008, 10:14
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default 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.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #5  
Old 12th July 2008, 18:27
demonbogdan demonbogdan is offline
Member
 
Join Date: Jul 2008
Posts: 10
Default 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 :|



pls help me, sorry for my english !
Reply With Quote
  #6  
Old 12th July 2008, 19:21
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default Re: RSS Error
please give me link so I may check!
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #7  
Old 13th July 2008, 03:12
demonbogdan demonbogdan is offline
Member
 
Join Date: Jul 2008
Posts: 10
Default Re: RSS Error
Quote:
Originally Posted by joeroberts
please give me link so I may check!
Reply With Quote
  #8  
Old 13th July 2008, 04:48
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default 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:
<?php
/*
*-------------------------------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 .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>'.$sitename.'</title>
    <link>'.$siteurl.'/</link>
    <description>'.$descr.'</description>
    <language>en-us</language>';

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 = "&lt;font size=\"3\"&gt;&lt;b&gt;Category:&lt;/b&gt;&lt;/font&gt; ".$cat3["name"]."&lt;br /&gt;&lt;font size=\"3\"&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;br /&gt;&lt;/font&gt; ".htmlspecialchars($row["descr"])."&lt;br /&gt; &lt;font size=\"3\"&gt;&lt;b&gt;Seeders: &lt;/b&gt;&lt;/font&gt;".$row["seeders"]."&lt;br /&gt; &lt;font size=\"3\"&gt;&lt;b&gt;Leeches: &lt;/b&gt;&lt;/font&gt;".$row["leechers"];
$rss .='<item>
      <title>'.$names.'</title>
      <link>'.$siteurl.'/details.php?id='.$ids.'</link>
      <description>'.$descrption.'</description>
	  <dc:creator>'.$owner['username'].'</dc:creator>
    </item>';
      }
$rss .='  </channel>
</rss>';

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

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

echo ($rss);

die();
?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #9  
Old 13th July 2008, 11:26
demonbogdan demonbogdan is offline
Member
 
Join Date: Jul 2008
Posts: 10
Default 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
Reply With Quote
  #10  
Old 13th July 2008, 15:09
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default 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
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
Reply

Tags
error , rss

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
help error, http error and invalid passkey thereal Torrent Strike 0 9th April 2009 02:07
URGENT !! Parse error: syntax error sharpe Torrent Strike 8 24th September 2008 15:10



All times are GMT +2. The time now is 17:42. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.