Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-26 04:42:53

jtlapp
Member
From: Austin, TX
Registered: 2006-03-19
Posts: 59
Website

Feedback on comment control

My understanding is that the comment control in TXP is relatively new. I think it’s amazingly flexible and have been often surprised at what I’ve been able to get it to do. I especially like the anti-spam plugin feature.

But there were several things I wanted it to do that I couldn’t without modifying the code:

(1) Only having a Remember checkbox instead of switching between Remember and Forget.
(2) Showing the comment input form even after just posting a comment.
(3) Showing the “Thank you for commenting” in a location outside of the comment form.
(4) Jumping to my thank you notice in (3) when the page is reloaded after commenting.

Again, it’s amazing that this is all I had to change to get exactly what I wanted, but I’m wondering if in a later TXP rev we might be able to generalize even further.

Right now the comment forms are still slave to some hardcoded TXP logic. I’m wondering if we might be able to define a more abstract user-customizable template that is master to all this logic, along with more tags for inclusion in this master template. But this may be hard to get right, hard to figure out, too many new tags, though perhaps plugin developers could provide many of these tags (and tag variants).

Maybe a better idea is to define a comment base class that developers may subclass to provide different kinds of (possibly configurable) comment behavior. TXP would only communicate with the class via the fixed base class interface. There would be no need to tweak the core code, and non-programmers could select their behavior of choice (provided someone has coded it). This latter approach might be more appropriate, given that there is coordination across multiple page requests, since it might be hard to capture that in a template.

Just thinking out loud. I’m not complaining — just trying to help TXP get to the next level. I’ve got what I want out of TXP, though I am a bit worried about carrying my mods over with TXP upgrades.

~joe

Offline

#2 2006-03-26 04:59:55

jtlapp
Member
From: Austin, TX
Registered: 2006-03-19
Posts: 59
Website

Re: Feedback on comment control

Actually, looking through all the mods I made, it appears that they all could have been accomplished with strategically placed callbacks offering alternatives to default behavior. And (2) could have been done by writing an alternative to txp:comment_form.

Maybe it’s just a matter of figuring out all the places where people may want to customize behavior? That’s a piecemealwise, manageable way to get there, and very simple too. Maybe we don’t need a revolutionary change after all.

~joe

Offline

Board footer

Powered by FluxBB