Discussion board
RSS: Beginner's Aid
01-07-2010 14:21:20
max78
Hello, I am a beginner and do not understand languages at all. I want to integrate an RSS player on my site, but I didn't quite understand what approach to follow. What code do I need to integrate? Is there a file that also needs to be inserted? I just want to show 1 article from the rss feed with the title, date, description and the ability to customize the size of the text. Thank you for all of your help! see you shortly!
02-07-2010 19:53:00
webmaster
Hello Need an RSS file (the URL of which we will pass as a parameter) and include the rsslib.php library in it: The procedure is given as an example in the demo (included in the archive): https://www.iqlevsha.ru/rss/rss-direct.phpRSS Direct [/url] We place the rsslib.php library in the directory of the page displaying the feed, and use it like this:
<?php require_once("rsslib.php"); $url = "http://www.scriptol.com/rss.xml"; echo RSS_Display($url, 15, false, true); ?>Replace URL with the URL of the stream being displayed.
06-07-2010 08:21:35
max78
Good morning, thanks for the quick response! Therefore, I put the file "rsslib.php" in the root of the site and put a piece of code on the page in php, as above, with its own built-in URL. It works great, but in terms of addresses in xml, I tried a different url classic rss, it doesn't work. Do I need to change something? integrate another bookstore? or is my code not complete? And for the size and color of the text, it is on the "rsslib.php" file that you need to change the settings or on the code of the page you want to show? Thank you so much for your help and website, soon!
06-07-2010 18:18:31
webmaster
The size and color of the text changes in the CSS file. An example is given in rss-style.css in the archive (it was missing, I updated it). The demonstration is conducted in RSS Direct/If you are good about the extension. "xml" I tried with the extension stream ".rss" and this also works well. Is this an RSS 2.0 file? There are other stream formats. Bookstore RSS Common acknowledges the three.
Discussion board
Add Publish Dates to rss Feed
11-11-2008 12:53:44
Francoisle
Hello, first of all thanks for this script that is so easy to set up. On the other hand, I would like to know how to restore the display of the publication date, which is in the RSS feed. Many thanks in advance. François
13-11-2008 14:50:05
webmaster
Hi Date in 2.0 format is in the pubDate tag. Therefore, we add these few lines to the RSS_Tags function:
$tnl = $item->getElementsByTagName("pubDate"); $tnl = $tnl->item(0); $date = $tnl->firstChild->data; $y["date"] = $date;then in the RSS_Display mapping function:
$date = $article["date"]; $page .= "<span class='d'>$date</span>This is with the CSS descriptors we want. This code must work with both rsslib and commonlib.
Discussion board
RSS Error Message
09-04-2008 18:47:42
Tom
Good morning I searched, thought php5 was in question, turned on php5 on the Internet, but I have nothing to do, I still have the same error message Warning: DOMDocument:: load (http://www.lapanse.com/pages/archive_blog/rss.xml) [function.DOMDocument-load]: failed to open stream: Connection denied in/var/www. Test on YOUR site works very well with YOUR XML file Test on YOUR site works very well with MY XML file Test on MY site works very well with YOUR XML file Test does NOT WORK on MY site with MY XML file This, it seems not a question of rights, since it runs on my XML file from your site I am very worried because the result of the demonstration was exactly that, what I'm trying to do without going through an outside parser with ads. Can you help me here? Thanks, Tom
10-04-2008 10:52:36
webmaster
This is an Atom file, so it must work with an Atom player or shared. However, an error message indicates that the connection failed, either because the file could not be found or because you do not have permission to read the file. I will do a local validation of the XML file to see.
10-04-2008 12:08:53
webmaster
In fact, your feed is perfectly displayed if you are using an RSS player (not an Atom player). Obviously, the file is in RSS 2.0 format with the atom extension on the atom namespace: id! If the thread does not appear with rsslib, see the file path.
10-04-2008 23:23:39
Tom
Thanks. In fact, I dug out your suggestion of a link. The RSS player is really correct. On the site itself, the link only works with a relative link and does not work with the full link http ://www... Thank you for all of your help