[typo] Comment box hiding?

Trejkaz trejkaz at trypticon.org
Mon Sep 19 19:36:37 EDT 2005

> Uh, second question: How would I make the comment form not show up when
> comments are no longer accepted? Right now it seems to just swallow them
> without any notice at all.
> I assume that I just need to wrap an if-statement around most of
> app/views/articles/_comment_box.rhtml, but I'm not sure what it would
> be. I had a quick look in articles_controller to see what the code was
> producing the "swallowing" effect, but I couldn't seem to locate it.

You might have to watch out for the page cache.  If the cache stores a
copy of the page with the comment box on, then no code in Ruby land will
make the comment box hide itself.

I guess what I'm saying is that hiding the box from Ruby land might not be
enough.  It wouldn't hurt to also have a little message which says
comments are disabled, _after_ the user submits.

...unless the box can be somehow hidden from JavaScript land, like a lot
of the other enable/disable stuff does.


More information about the Typo-list mailing list