Discussion board
RSS Reader: Display Settings
03-06-2010 11:43:27
trouble
Hello, I would like to be able to work with channel tags [b] <link> <title> <description> [/b] to make changes to the format/format. But I can't find out at what point this information is shown:
foreach($recents as $article) { $type = $article["type"]; if($type == 0) { if($chanopt != true) continue; if($opened == true) { //$page .="</ul>\n"; $page .=""; // utilisation de <p> à la place de <li> $opened = false; } $page .="<b>"; } else { if($opened == false && $chanopt == true) { //$page .= "<ul>\n"; $page .= "<br />"; // utilisation de <p> à la place de <li> $opened = true; } } $title = $article["title"]; $link = $article["link"]; $page .= "<".$Common_Style." id=\"ole\"><a rel=\"gb_page_fs[]\" href=\"$link\">$title</a>"; if($descopt != false) { $description = $article["description"]; if($description != false) { $page .= "<br>$description"; } } if($dateopt != false) { $updated = $article["updated"]; if($updated != false) { $page .= "<br /><font $Common_Date_Font>$updated</font>"; } } $page .= "</".$Common_Style.">\n";I used to use Magpierss and set up each thread with a simple switch testing the parameter. There I dry out to find out where they are and how they are displayed. Thanks in advance.
03-06-2010 20:17:39
webmaster
Formatting was added in the latest version of rsslib. A demonstration was conducted, it is the fourth on the list: https://www.iqlevsha.ru/rss/rss-direct.php The source code shows how to associate a CSS descriptor with a stream element such as a date, etc., acting on tag names, ul, li, etc. If you have something more thoughtful, feel free to ask.
03-06-2010 20:46:25
trouble
Sorry, but it's not about CSS. The question is how to access the <link> <title> <description> tags of the [b] channel itself [/b], not the object tags. Thanks.
04-06-2010 17:19:14
webmaster
In fact, this is already being done by RSS_Tags function. This function returns an associative array containing the type as a key, e.g. "title," "description," etc. This table is extracted from the RSS_Channel function:
function RSS_Channel($channel) { global $RSS_Content; $items = $channel->getElementsByTagName("item"); // Processing channel $y = RSS_Tags($channel, 0); ...At this time, you can access each element, for example...
$desc = $y["description"];"I would like to be able to work with <link> <title> <description> channel tags to change the format/format." This is done in CSS. "But I can't figure out at what point this information is shown." Everything is combined into a variable $ page, which is globally displayed by the echo command.
05-06-2010 15:25:58
trouble
Thanks, I am digging this up and will provide you with general code and even for inclusion in the script if it suits you. Sincerely.
Discussion board
Customizing and Customizing the Display with RSS Reader PHP
17-05-2010 13:43:51
didier_91
Hello, First of all, a real thank you for this RSS script and explanation in French. Being an "amateur," I managed to easily install this script on my website and, therefore, on my hoster. I would like to know if (and how?): 1 - show the date (franchise), but not the time at present: 2010-05-12T15:12:45 ideally: 12-05-2010 2- Description: show only the first "x" characters of each description (for example, the first 120) 3 - Aggregate multiple sources, not just 1. I understand that some questions may go beyond the strict scope of this site, thanks in this case to point me to the URL for finding information (icing on the cake: in French!) Cdt, Didier
17-05-2010 20:07:06
webmaster
Good morning to convert the date... Delete time with substation: $ date = substr ($ date, 0, 10); Changing the order of elements is more difficult:
date = substr($date, 0, 10); $d = explode("-", $date); $date = $d[2]."-".$d[1]."-".$d[0];Summarize the description, always with substr:
$desc = substr($desc, 0, 120);For multiple channels, the script supports them if they are built into one stream, but in fact I have not tested it. If there are multiple sources, the RSS_display function will be called several times instead.
18-05-2010 12:23:03
didier_91
THANK YOU so much for this quick response; it works nickel! I just changed the $ desc for the $ description as it is "described" in the rsslib uploaded to your site. For stream 2, I wrote the 2nd call on the rss-direct.php webpage, it works. But the date should not be formatted in the same way as at the beginning of the stream, and therefore re-scheduling is not valid (and the date is in English!). However, firefox shows them all 2 the same. http://www.lemoniteur.fr/cache/X_articles_rss2_121.xml http://feeds2.feedburner.com/Pixfan with the exception of the "miracle" recipe, I am not asking you for a solution for these two streams, knowing that I want to "aggregate" at least 8-10 streams from different sources and that these dates may again be bad... Thanks again Didier
Discussion board
Publish Stream Description Only
22-09-2008 08:01:06
Tom
Hello, I use scriptol with a big joke and it works very well. Thanks very much. Today I would like to adapt this script so that I can only publish the xml stream description field. Would that be possible? I believe that you will need to create a suitable rsslib_bis and a special call to a new function on the php page, despite my modest attempts, this clearly did not work...: ((Can you help me? Thanks
25-09-2008 19:54:42
webmaster
Hi Indeed, the RSS lib library, has one function to show only the title and link, and another to also show the description, but to get other parameters, you must add a function and remove lines of code corresponding to what you do not want to show. The modified function code RSS_display () must have the following lines:
$link = $article["link"]; $description = $article["description"]; $page .= "<li><a href=\"$link\">$description</a>";In addition, the universal RSS player has the same features, but more features.
05-10-2008 18:30:02
Tom
Thank you very much It works great
Photo in RSS article
07-11-2009 23:32:01
Marchdenny
Hello, I have installed the RSS wire example given in RSS tuto. I would like to add photos to articles, but I can't. Thanks for your assistance. Hearty Mark
08-11-2009 17:06:23
webmaster
Hi Does the image tag not work?
<channel> <title> </title> <link> </link> <image> <url>http:///www.iqlevsha.ru/scriptol.gif</url> <link>http:///www.iqlevsha.ru/index.php</link> </image> </channel>Otherwise, the easiest way would be to have a simple image link within the article description.
<img src="image.gif" />