Hello
just want to include my ebay auction @ b2evo:
<?php
/*
* This is the template that displays myEbay for a blog
*
* This file is not meant to be called directly.
* It is meant to be called by an include in the _main.php template.
* To display the stats, you should call a stub AND pass the right parameters
* For example: /blogs/index.php?disp=impressum
*/
if(substr(basename($_SERVER['SCRIPT_FILENAME']),0,1)=='_')
die("Please, do not access this page directly.");
if( $disp == 'auction' )
{ ?>
<h1 id="pageTitle" align="left"><font color="#4081B7">Meine eBay Auktionen</font></h1>
<?PHP
$ebayname="xankele";
$file="http://rss.api.ebay.com/ws/rssapi?FeedName=SearchResults&siteId=77&language=de-DE&output=RSS20&fsop=1&fsoo=1&sass=".$ebayname;
?>
<body>
<div align="center">
<table width="728" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td colspan="2"><h1>Meine Artikel bei eBay</h1></td>
</tr>
<tr valign="top">
<td colspan="2"><?php include("rss.inc"); ?></td>
</tr>
<tr>
</table>
<div class="clear"></div>
<?php
}
?>
File rss.inc:
<?php
$rss_channel = array();
$currently_writing = "";
$main = "";
$item_counter = 0;
function startElement($parser, $name, $attrs) {
global $rss_channel, $currently_writing, $main;
switch($name) {
case "RSS":
case "RDF:RDF":
case "ITEMS":
$currently_writing = "";
break;
case "CHANNEL":
$main = "CHANNEL";
break;
case "IMAGE":
$main = "IMAGE";
$rss_channel["IMAGE"] = array();
break;
case "ITEM":
$main = "ITEMS";
break;
default:
$currently_writing = $name;
break;
}
}
function endElement($parser, $name) {
global $rss_channel, $currently_writing, $item_counter;
$currently_writing = "";
if ($name == "ITEM") {
$item_counter++;
}
}
function characterData($parser, $data) {
global $rss_channel, $currently_writing, $main, $item_counter;
if ($currently_writing != "") {
switch($main) {
case "CHANNEL":
if (isset($rss_channel[$currently_writing])) {
$rss_channel[$currently_writing] .= $data;
} else {
$rss_channel[$currently_writing] = $data;
}
break;
case "IMAGE":
if (isset($rss_channel[$main][$currently_writing])) {
$rss_channel[$main][$currently_writing] .= $data;
} else {
$rss_channel[$main][$currently_writing] = $data;
}
break;
case "ITEMS":
if (isset($rss_channel[$main][$item_counter][$currently_writing])) {
$rss_channel[$main][$item_counter][$currently_writing] .= $data;
} else {
$rss_channel[$main][$item_counter][$currently_writing] = $data;
}
break;
}
}
}
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
xml_parser_free($xml_parser);
// output HTML
// print ("<div class=\"channelname\">" . $rss_channel["TITLE"] . "</div>");
if (isset($rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) {
if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
print ("\n<div class=\"itemtitle\"><a href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\" target=\"_blank\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");
} else {
print ("\n<div class=\"itemtitle\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</div>");
}
print ("<div class=\"itemdescription\">" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />"); }
} else {
print ("<b>There are no articles in this feed.</b>");
}
}
?>
Link http://www.snigles.de/index.php?disp=auction
It makes my skin completly damaged :( What could be wrong?
I don't know what happens when you do this, but you've got two body tags in there. Plus a table laying on top of background images might be part of it too. It might be that the forced table width is why the sidebar is popping down, but rather than fix that how about going a different way? Check out http://forums.b2evolution.net/viewtopic.php?t=9981 and see if that'll work for you. You can still read the feed, only dress them up like they were posts in a blog instead of cells in a table.