Re: Has anyone found a way to get the rss feed working
Quote:
In the code (use the Get Source Link in the article), look for the line with the RSS file and just change it. The rest is to just render it.
Yes, the first thing I did was get the source code and I tried to look for the line where I should be putting in the URL to my RSS feed, but I don't know what line it is.
Would you be so kind as to copy and paste the line that needs to be changed? Would much appreciate it and how does one go about rendering it? I know I'm sounding like a total n0ob but this is all Greek to me.
Thankies.
Re: Has anyone found a way to get the rss feed working
They seemed to have changed the link since I was there last... Here is the code I am using. Please note the variable called $RSSFile about 4 lines down...
<table width=100%><tr><td width=100%>
<h2><a href=http://www.AltVenue.com>Currently on AltVenue.com</a></h2>
<dl>
<?php
$RSSFile = "http://www.altvenue.com/rss.php";
$insideitem = false;
$tag = "";
$title = "";
$description = "";
$link = "";
function startElement($parser, $name, $attrs) {
global $insideitem, $tag, $title, $description, $link;
if ($insideitem) {
$tag = $name;
} elseif ($name == "ITEM") {
$insideitem = true;
}
}
function endElement($parser, $name) {
global $insideitem, $tag, $title, $description, $link;
if ($name == "ITEM") {
printf("<dt>%s</dt>",
trim($link),htmlspecialchars(trim($title)));
//printf("<dd>%s</dd>",htmlspecialchars(trim($description)));
printf("<dd>%s</dd>",trim($description));
$title = "";
$description = "";
$link = "";
$insideitem = false;
}
}
function characterData($parser, $data) {
global $insideitem, $tag, $title, $description, $link;
if ($insideitem) {
switch ($tag) {
case "TITLE":
$title .= $data;
break;
case "DESCRIPTION":
$description .= $data;
break;
case "LINK":
$link .= $data;
break;
}
}
}
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
$fp = fopen($RSSFile,"r")
or die("Error reading RSS data.");
while ($data = fread($fp, 4096))
xml_parse($xml_parser, $data, feof($fp))
or die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
fclose($fp);
xml_parser_free($xml_parser);
?>
</dl>
</td></tr></table>
Re: Has anyone found a way to get the rss feed working
Re: Has anyone found a way to get the rss feed working
Oh poopie, what you sent is for PHP (which is freaking awesome btw) and the pages I want to put the integration on is HTML, so it looks like I have to stick with the RSS Integration thingie. But I've copied and pasted the code for future reference.
Now, another issue has arisen. The RSS integration has been working just fine until today when I uploaded new videos and they're not showing up on the site that has the integration. It's only showing that last videos I uploaded from several days ago, not the new ones I just did. What would cause the RSS to "all of a sudden" not work? And yes, in the rss/new the new videos are there (so it's not an issue with vshare script cos that part's working).
UPDATE: I think I got it. Aparantly I have to include "new.xml" when entering the URL into the form.
Re: Has anyone found a way to get the rss feed working
Good work nightmage,
This work very good on my site.
You can see it here:
http://worldadstv.com/rss1.php
edit: Why is the BBCode doesnt work for me ?
On my profile its on.
Re: Has anyone found a way to get the rss feed working
My BBCode is OFF too. It's a setting that admin has to "turn on".