[#2733] RSS/Atom feeds for mailboxes
Summary RSS/Atom feeds for mailboxes
Queue IMP
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester Marko Djukic <mdjukic (at) horde (dot) org>
Created 10/05/2005 (1059 days ago)
Due
Updated 01/12/2007 (595 days ago)
Assigned 10/05/2005 (1059 days ago)
Resolved 01/12/2007 (595 days ago)
Attachments rss[1].diff Download
Milestone IMP 4.2
Patch No

History
01/12/2007 Chuck Hagenbuch Comment #13
State ⇒ Resolved
Reply to this comment
Resolving, then. Thanks all!
01/12/2007 Michael Slusarz Comment #12 Reply to this comment
Cleaned this up (it wasn't namespace aware, check for invalid 
mailboxes, add code to force showing previews even if preview prefs 
aren't on) and committed.
01/12/2007 Michael Slusarz Deleted Attachment: rss.diff
 
01/06/2007 Jan Schneider Comment #11 Reply to this comment
Personally I think using PATH_INFO here is much nicer than other
solutions, esp. since we'd have to escape /'s even if we did
rss.php?INBOX/foo - unless / after ? aren't path characters?
I think path characters work in query strings, but I prefer PATH_INFO 
too. It's really a very advanced feature, so requiring certain server 
capabilities for it should be fine.
01/05/2007 ekg2002 (at) columbia (dot) edu Comment #10
New Attachment: rss[1].diff Download
Reply to this comment
Point taken.

Attached is a replacement patch that:

1. uses PATH_INFO, if possible, then tries REQUEST_URI, then just 
defaults to INBOX.
2. uses the /-/new syntax
3. handles vfolders properly
01/05/2007 Chuck Hagenbuch Comment #9 Reply to this comment
Okay. Another thing that comes to mind is that if a server doesn't 
support PATH_INFO in some cases, it won't recognize rss.php/whatever 
as referring to rss.php - it'll complain that it can't find "whatever" 
in the rss.php/ directory.

Personally I think using PATH_INFO here is much nicer than other 
solutions, esp. since we'd have to escape /'s even if we did 
rss.php?INBOX/foo - unless / after ? aren't path characters?

Thoughts? Opinions? Frogs?
01/05/2007 Jan Schneider Comment #8 Reply to this comment
01/05/2007 Chuck Hagenbuch Comment #7 Reply to this comment
According to http://us2.php.net/reserved.variables , REQUEST_URI is
from PHP 4.1.0
Not sure where you see that - $_SERVER is from 4.1.0 on, but 
REQUEST_URI comes from the sapi (apache, whatever), and is somewhat 
dependent on it.
01/04/2007 ekg2002 (at) columbia (dot) edu Comment #6 Reply to this comment
According to http://us2.php.net/reserved.variables , REQUEST_URI is 
from PHP 4.1.0
01/04/2007 Chuck Hagenbuch Comment #5 Reply to this comment
I've implemented RSS feeds for mailboxes in the attached patch. As
per a discussion with Chuck, the url scheme is:

http://server/horde/imp/rss.php - gives all mail in inbox
http://server/horde/imp/rss.php/new - gives new mail in inbox
There's a quirk in the GData query syntax, which I was thinking to 
base this on 
(http://code.google.com/apis/gdata/protocol.html#query-requests) that 
should take care of the /new problem. /new is a category, and 
categories should be preceded with /-/ to distinguish them from other 
path elements. So we'd have:

http://server/horde/imp/rss.php - gives all mail in inbox
http://server/horde/imp/rss.php/-/new - gives new mail in inbox

Also, rss.php/INBOX should work as well. I like the REQUEST_URI usage 
to avoid PATH_INFO; any sense how portable it is?
01/04/2007 ekg2002 (at) columbia (dot) edu Comment #4 Reply to this comment
Jan -- yes, I meant to include that potential problem with the 
submission. But...

As per Selsky's question in IRC, the code doesn't handle vfolders 
because I was using MailboxCache directly. The fix is trivial, using 
Mailbox's buildMailboxArray(), but then there is no clean way of 
retrieving only new messages.

Perhaps the /new idea isn't a good one, and that functionality should 
be relegated to a vfolder?
01/04/2007 Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
That would mean that people can't subscribe to folders called "new". 
Can't we use a character that is not allowed in IMAP folder names 
instead, or at least one that's supposed to be less common than "new"?
01/04/2007 ekg2002 (at) columbia (dot) edu Comment #2
New Attachment: rss.diff
Reply to this comment
I've implemented RSS feeds for mailboxes in the attached patch. As per 
a discussion with Chuck, the url scheme is:

http://server/horde/imp/rss.php - gives all mail in inbox
http://server/horde/imp/rss.php/new - gives new mail in inbox
http://server/horde/imp/rss.php/A/B - gives all mail in folder A.B
http://server/horde/imp/rss.php/A/B/new - gives new mail in folder A.B

(...where "all mail" is the last 20 messages regardless of status).

The proposed file in /imp/templates/rss/mailbox.rss is identical to 
the file in /whups/templates/rss/ticket.rss, and similarly 
/imp/themes/feed-rss.xsl to /whups/themes/feed-rss.xsl.

Please let me know any changes or enhancements that should be made.
11/16/2006 Chuck Hagenbuch Summary ⇒ RSS/Atom feeds for mailboxes
 
03/25/2006 Chuck Hagenbuch State ⇒ Accepted
Taken from Marko Djukic
 
10/05/2005 Chuck Hagenbuch Assigned to Marko Djukic
Taken from Horde DevelopersHorde Developers
 
10/05/2005 Marko Djukic Comment #1
Type ⇒ Enhancement
Summary ⇒ RSS feed for mailboxes
Priority ⇒ 1. Low
State ⇒ Assigned
Queue ⇒ IMP
Assigned to Horde DevelopersHorde Developers
Reply to this comment
Something like whups/rss.php, but showing content like 
imp/lib/Block/tree_folders.php, so that a summary of all the folders 
and new mail can be fetched through RSS.