Search the web
Sign In
New User? Sign Up
radio-dev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
RFC: comment notification for Radio via email   Message List  
Reply | Forward Message #7942 of 8443 |
In conjunction with a similar feature for Manila, we're working on a
feature for notifying Radio users via email when new comments are
posted to their sites.

We'd like to give developers an opportunity to comment on the
implementation before releasing the feature.

This message is cross-posted to manila-dev because Manila hosts the
comments for Radio users, and some of the implementation of this
feature will be in Manila.


*** Preferences in Radio

There's only one new preference for this feature -- a checkbox for
whether to send comment notification via email. On the Prefs -> Weblog
-> Comments page:

[x] Check this box to receive notification via email when new comments
are posted.

The default is checked. The value of the pref is stored at
weblogData.prefs.flCommentNotificationEnabled.

Comments are sent to the email address specified on the Prefs -> Basic
Preferences -> User Identity page, which is stored at
weblogData.prefs.authorMailAddress.


*** Connecting to the comments site

Any Manila site can host comments for a Radio weblog, and Manila
currently has no direct way of knowing where to send the emails, or
whether to send them at all. Radio needs a way to send this information
to the Manila site that hosts its comments.

The most flexible way to do this is for Radio to make an XML-RPC call
to the Manila site, but first Radio needs enough information about the
site to make the RPC call. Radio does this by making a request to the
comments page, whose URL is the one bit of data that Radio has about
the comments site. The request has an argument in the URL c=getRpcInfo,
which means "send me your XML-RPC information". Here's an example
request:

GET /comments?c=getRpcInfo HTTP/1.0
Host: radiocomments.userland.com

The body of the response is XML. It contains information needed to call
the Manila site using XML-RPC. Here's an example response:

HTTP/1.1 200 OK
Connection: close
Content-Length: 139
Content-Type: text/xml

<rpcInfo>
<server>radiocomments.userland.com</server>
<port>80</port>
<path>/RPC2</path>
<methodName>manila.radioHosting.setPrefs</methodName>
<siteName>radioComments</siteName>
</rpcInfo>

This request is made by radio.thread.agents.pingCloud, and the data is
stored in a table at weblogData.prefs.commentServer. (The request is
made only once.)

Once Radio has the XML-RPC information, it makes the following XML-RPC
call to the Manila site, also from radio.thread.agents.pingCloud, to
set preferences for comment notification:

manila.radioHosting.setPrefs (siteName, usernum, data) -- returns true

siteName is the canonical name of the Manila site that hosts comments
for the Radio weblog, as returned in XML in the above request.

usernum is the Radio user's usernum, which corresponds to the "u"
argument in the comment pop-up window URLs.

data is a struct which contains the following sub-elements:

flNotifyNewComments -- a boolean, true if the user wants comment
notification via email (corresponding to the new preference described
above)

sendNotificationTo -- a string, the email address notification will be
sent to

We're using a struct for the data parameter in case more information
needs to be sent to Manila using the setPrefs call in the future.


*** Manila implementation

Manila stores metadata about comments in the radioHosting sub-table of
the site's #newsSite table.

A new sub-table of the radioHosting table named userPrefs will store
preferences for the Radio users whose comments the Manila site is
hosting. This sub-table is populated by calls from Radio to
manila.radioHosting.setPrefs, and contains two sub-items,
flNotifyNewComments and sendNotificationTo.

When a new comment is posted to a Radio site, Manila checks to see if
the corresponding usernum has preferences defined in the
["#newsSite"].radioHosting.userPrefs sub-table. If defined, and if the
value of flNotifyNewComments is true, then Manila will send email
notification of the new comment to the email address defined by
sendNotificationTo.


*** Comments and Questions

If you have comments or questions, please post them as a response to
this message.

Thanks,
-Jake




Fri Aug 29, 2003 7:52 pm

jsavin
Offline Offline
Send Email Send Email

Forward
Message #7942 of 8443 |
Expand Messages Author Sort by Date

In conjunction with a similar feature for Manila, we're working on a feature for notifying Radio users via email when new comments are posted to their sites. ...
Jake Savin
jsavin
Offline Send Email
Aug 29, 2003
7:52 pm

... You might want to think about putting in some sort of authentication, otherwise people could do something like this: import xmlrpclib s =...
Phillip Pearson
phillip_pear...
Online Now Send Email
Aug 29, 2003
10:16 pm

Hi Phil, Thanks for the input. Do you have any particular ideas in mind for how to authenticate, keeping in mind that Manila doesn't know anything about the...
Jake Savin
jsavin
Offline Send Email
Aug 29, 2003
10:43 pm

... I implemented something for Python Community Server a while ago that isn't being used yet (the idea is that you'd use it to authenticate to a search engine...
Phillip Pearson
phillip_pear...
Online Now Send Email
Aug 30, 2003
12:40 am

Hi Philip, Yes -- this makes sense. It's a bit more complicated than I'd hoped for however. The two other possible solutions I'm thinking of are: 1. Have...
Jake Savin
jsavin
Offline Send Email
Aug 30, 2003
1:19 am

I'd stay clear of option #1 as a) you can't change your e-mail address and b) if someone hijacks your notifications *before* you sign up yourself, you're...
Phillip Pearson
phillip_pear...
Online Now Send Email
Aug 30, 2003
1:57 am

option 2 gets my vote ... address and ... password to ... PyCS, as we ... function and...
mlmauller
Offline Send Email
Aug 30, 2003
6:18 pm

I nominiate Option 2 as well ... address and ... password to ... PyCS, as we ... function and...
mlmauller
Offline Send Email
Aug 30, 2003
6:35 pm

don't know why my first reply didn't post - trying again. Option 2 gets my vote...
mlmauller
Offline Send Email
Aug 30, 2003
6:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help