[pmwiki-users] 3 WebFeeds questions

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 7 09:03:55 CDT 2006

On Thu, Sep 07, 2006 at 07:38:39AM -0500, Patrick R. Michaud wrote:
> On Thu, Sep 07, 2006 at 10:57:31AM +0200, Roman wrote:
> > I was not successful with this one. 
> OOOOPS!  In looking at the feeds.php code, I see that there's
> no way the above will work.  [...] I need to re-think the
> logic behind the way feed options are being set ...

Okay, I looked at the code, and while it's still got some
issues, I'm not quite ready to change it yet.  I want to think
about it a bit more.

So, here's another way to do what you want:

    if ($action == 'rss') {
      $pagename = ResolvePageName($pagename);
      $group = PageVar($pagename, '$Group');
      if ($group == 'Main') {
        SDVA($_REQUEST, array(
          'group' => 'News',
          'link' => 'Category.FrontPageNews',
          'order' => '-time',
          'count' => 10));
      } else {
        SDVA($_REQUEST, array(
          'group' => 'News',
          'link' => "Category.$groupNews",
          'order' => '-time',
          'count' => 10));

Essentially, this is just making it appear to feeds.php
as though the options were coming from the url in the first
place.  And options in the url will still override the
default settings here.

Hope this helps!


More information about the pmwiki-users mailing list