[pmwiki-users] 3 WebFeeds questions

Roman romat2 at gmail.com
Thu Sep 7 03:57:31 CDT 2006


Thank you very much for answers.

> > 2. My feeds are generated by using a combination of various parameters
> > (group=, order=, count=, link=). Is there a way to specify feed
> > parameters somehow internally instead of specifying them in URL?
>
> Yes.  In a local customization file, the following sets the default
> options for a feed.  (They can still be overridden by url parameters.)
>
>    $FeedPageListOpt = array(
>      'group' => '-PmWiki,-Site',
>      'order' => '-time',
>      'count' => '50',
>      'link' => 'Category.CoolNewStuff');


I was not successful with this one. I have working feeds generated this way:
http://server/Main/HomePage?action=rss&group=News&link=Category.FrontPageNews&order=-time&count=10

and I want to have only simple URL like
http://server/Main/HomePage?action=rss. Based on your suggestion I put
this to config.php

$group = FmtPageName('$Group', $pagename);
if ($action == 'rss') {
  include_once("$FarmD/scripts/feeds.php");
  if ($group=='Main') {
    $FeedPageListOpt = array(
      'group' => 'News',
      'link' => 'Category.FrontPageNews'
      'order' => '-time',
      'count' => '10');
    }
  else {
    $FeedPageListOpt = array(
      'group' => 'News',
      'link' => 'Category.$groupNews',
      'order' => '-time',
      'count' => '10');
    }
  }

but it does not generate any feed items (it looks like pagelist is
empty). When I  try http://server/Main/HomePage?action=rss&group=News
it works but does not use any of predefined parameters.

> > 3. Is there a way how to define channel image in $FeedFmt?
>
> Yes.  In a local customization file:
>
>   $FeedFmt['rss']['image'] =
>     "<image>
>       <title>Logo title</title>
>       <link>http://www.example.com/</link>
>       <url>http://www.example.com/images/logo.gif</url>
>       <width>120</width>
>       <height>60</height>
>      </image>";

Thank you, it worked for me only this way

$FeedFmt['rss']['feed']['image'] =
"<title>Logo title</title>
 <link>http://www.example.com/</link>
 <url>http://www.example.com/images/logo.gif</url>
 <width>120</width>
 <height>60</height>
";

Roman




More information about the pmwiki-users mailing list