WackoWiki: Вам запрещён доступDev/PatchesHacks/RSSAtomFeed ...

Home Page | Изменения | Новые Комменты | Пользователи | Каталог | Регистрация | Вход:  Пароль:  

Action: RSS/Atom Feed Integration

Sources and Versionlog: http://wackofork.cvs.sourceforge.net/wackofork/wiki/actions/feed.phpSebastian Dietzold


{{feed url="http://..." [title=no] [max="x"] [style="css-style"] [time=yes]}}


This simple Wacko Action is based on magpierss, an easy to use php api.
The action displays a feed in the typical WackoWiki style or in a new div-container-style if divclass-option is used.
It uses the Wacko functions for the links.
It has these these parameters:


  • url="http://..." assigns the URL of the feed.
  • divclass="xxx" – produces a <div class="xxx"><div class="inner">...</div></div> code instead of the ugly fieldsets (so you can use floating feed-boxes)
  • title="no" turns the title off (default is yes).
  • title=xxx – set title to #xxx#
  • max=X limits the output to X items.
  • style="css-style" applies the css-style to the item-paragraphs (not used with divclass-option)
  • time=yes turns a time index on (default is no).
Оглавление документа

The result can be checked at my Workpage. The del.icio.us links are created with
{{feed url="http://del.icio.us/rss/seebi/rdf" divclass="floatbox" title="Last RDF Links" time=yes max=5}}

Installation

To use this action in your WackoWiki, you need to put the sources in your actions folder and a magpierss distribution to actions/magpierss.

To Do / Errors

Encoding problems

Vlad Janvarev: When I using this script on Russian RSS (in LiveJournal autogeneric feeds), I had a problem with symbol encodings – all Russian symbols looks like '?'. Intuitively I find the solution: you must wrap into tryUtfDecode() function all output from RSS parser. For example, use not

<?php echo $desc?>

but
<?php echo $this->tryUtfDecode($desc); ?>

I don't khow why, but it works :)

Parse Problems

If there are problems with the parser, update to a newer magpierss version.

gmmktime


Страницы, ссылающиеся на данную: Dev/PatchesHacks
WackoDocDeutsch/Artikel/ExterneFeedsEinbinden
WackoDocDeutsch/Probleme/WackoIdeen


 
Файлов нет. [Показать файлы/форму]
Комментариев нет. [Показать комментарии/форму]
Donate
Время работы: 8.281 s
Использовано памяти: 2.901 Mb