spacer Home  |  Manila  |  Radio  |  Support  |  News
spacer

Radio UserLand

Comments Feature

Posted by Jake Savin, 2/20/02 at 5:19:30 PM. Today we released the Comments feature for Radio UserLand.

Dave says: "The Comments feature adds a link to a popup window for each item on your weblog, allowing readers to discuss your observations, answer questions, or drag you down a notch or two with a nice juicy flame. spacer "

How to enable the feature spacer

1) Update Radio.root.

2) Go to the Item Template prefs page, and add a <%commentLink%> macro to your item template.

The macro can go anywhere you want, but by convention, most people put the comment link below the item text. In the default template, just before the <%when%> macro is a good place.

3) Go to the desktop website home page, and either edit an existing post or create a new one, so that your home page will be published.

Post your first comment spacer

Go to your public home page. You'll see a "comment" link for each of your posts. Click on one of the links.

A new browser window will open, with a form you can use to post a comment. Fill in the fields, and click the Submit button. When the window refreshes, you'll see your new comment at the top.

As more comments are created, they will appear below existing comments, in chronological order.

Customizing the feature spacer

The Comments feature has its own prefs page.

You can turn the comment links on and off, and specify the text for the link including an image, a macro or any HTML string.

Many people like to see a count of the number of comments as part of the link. If you want a counter, you can add a <%commentCount%> macro to the comment text.

By default, Radio uses a UserLand-hosted Manila site to manage comments. Any Manila site can host comments for Radio weblogs.

If you have a Manila site, you can host the comments as discussion threads in your site. Change the Comments page URL to the corresponding page in your own Manila site.

Notes for Manila users spacer

On Manila's Radio Hosting prefs page, you can enable or disable Comment-hosting, and modify the templates so that Comment popup windows hosted on your site have the appearance you want.

Comments will appear as threads in your discussion group.

This feature is enabled now on all UserLand servers. If your site is on another server, the server administrator will have to enable the Radio Hosting feature before you can use it in your site.

Notes for Manila server administrators spacer

If you're a Manila server administrator, here's how to enable the Radio Hosting feature for sites on your server:

1) Update Manila.root -- Choose Manila.root from the Window menu, and then choose Update Manila.root from the Main menu.

2) Use the Jump command (Ctrl-J) to Jump to config.manila.prefs.

3) Change the value of flRadioHostingEnabled from false to true, and Save the database.

Now all of the Manila sites on your server will have the new Radio Hosting prefs page. The feature will need to be enabled for each site individually.

How to create a Radio-compatible Comments service spacer

It's simple to implement your own Radio-compatible Comments system. All the information you need is in the popup window's URL.

When a reader clicks the comment link on a Radio weblog, the browser loads a URL in a new window that looks like this:

radiocomments.userland.com/comments?u=1000&p=316&link=radio.weblogs.com/0001000/2002/02/17.html#a316

The first part before the '?' character is the URL of the page that manages the comments. This URL is configurable in Radio's prefs system.

The second part consists of three parameters which are sent to that URL, u, p and link.

u is the Radio user's usernum. It is unique for each Radio weblog.

p is the ID number of the post to comment on. It is unique for each post in a Radio weblog.

link is an optional parameter that is the permalink for the post. It's possible the link won't be included in the URL.

Since Radio takes care of the deatails of opening a new browser window, and making the request, all you have to do to be compatible, is accept the POSTed comments, store them in a database, and render the comments as HTML.

Your comments service should store and render comment threads, based on these two pieces of information -- each thread should be uniquely identified by the values of the u and p parameters.

See also spacer

Radio UserLand: radio.macros.commentOnThisPage

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.