I'm trying to use Radiant as a blogging platform, and one of my
requirements is that visitors can add comments on certain pages.

I found Ryan Heneise's comments extension (
http://github.com/artofmission/radiant-comments/ ), and it's working
well. However, there is currently no notification to inform the user
that the comment was received and is now awaiting approval. Instead,
for a user, pressing "Submit" just seems to reload the page and clear
out the comment form, which will be frustrating and confusing for
them. They'll probably end up trying to post the comment again and
again, until they finally give up and send me an angry email telling
me that my site is broken. ;-)

So, I want to have some way of notifying the user that the comment was
received. The lazy, bad way to do this would be to put some permanent
text underneath, such as, "Don't worry if it doesn't seem to submit,
your comment was probably received perfectly!". But hopefully there is
a better solution than that!

1.  My first idea was to use Rails' flash notification, to have a
pretty text box magically appear, "Thanks for the comment! It'll be
approved soon." But, embedding ERb in a Radiant page doesn't work, and
there doesn't seem to be a Radius tag for the flash box. I was
thinking of writing an extension to add a tag to do that, but then I
found a post from last August where Mario T. Lanza suggested that
dynamic elements like that would be a bad idea, because it would work
against Radiant's page caching. (
http://lists.radiantcms.org/pipermail/radiant/2007-August/006002.html
)

I'm not sure a flash would disrupt page caching (is it AJAX?), but I
decided to look for another possible solution.

2.  My second idea was to simply redirect to a page which displays the
notification to the user, along with a link to go back to the article.
Ideally this would be a true Radiant page, so that the notification
can be changed easily, and so the page uses the same layout/style as
the rest of the site. The problem is, I haven't found any way to make
a link back to the referring page from within Radiant (and I'm not
even sure how I'd do it outside of Radiant). I suppose the user could
just press the Back button, but that feels like a weak solution.

So it seems to me that both of these solutions would involve creating
or modifying a Radiant extension to add a new tag(s). I don't mind the
work there, but I wanted to get some feedback or tips before I
started. Which solution would you recommend? Is there a better
solution I haven't thought of? Any pointers on where to start?

 - John Croisant
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to