Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2005-12-07 21:52:56
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Removing preview button in comments TXP 4
I quite like Jon’s ‘this is not spam’ checkbox. But, that, I think may be pretty easy to work around, from the spammer point of view, so doesn’t do much except make you think you’re safer from spam than you actually are?
It’s like those things people stick on their antennas so they can find their car in the parking lot: they work ok as long as you’re the only one who does it.
Alex
Offline
#14 2005-12-07 22:56:01
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Removing preview button in comments TXP 4
I appreciate the dev’s thoughts regarging spam… epsecially after using WordPress for a long while now. The preview function is a good idea, but I think ultimately, it should be up to the user if he/she wants to implement this spam blocking technique at the cost of the site’s usability. The site I am working on, http://www.aquestionablefaith.com/, looks good and works well too, minus the comment preview page which I cannot figure out how to edit, and removing it is not an option at the moment.
If it’s a simple patch, I would love to see it made available.
If not, I am stillloving txp more and more as I learn it, kudos to the devs for creating a great product.
-stirman
Offline
#15 2005-12-08 21:37:50
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Removing preview button in comments TXP 4
After playing around, I installed the nhn_hicks_live_preview plugin and modified the code a bit to remove the “live preview” part, and I set the spam checkbox to “checked” and it’s visibility to hidden… which leaves me with a working “submit” button sans preview!
If anyone wants to see the needed code changes, lemme know and I’ll post ‘em here.
-stirman
Offline
Re: Removing preview button in comments TXP 4
Stirman, I do.
One thing. Are the comments counting been updated? When I tried nhn_hicks_live_preview they weren’t.
Offline
#17 2005-12-08 23:13:53
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Removing preview button in comments TXP 4
Dunno, I don’t want to display the comment count, so I hacked that out of there!
code changes to follow…
Offline
#18 2005-12-08 23:18:28
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Removing preview button in comments TXP 4
in the plugin js file, I changed:
<code>
$spamwarn.checkbox(‘nhn_comment_spamsave’,‘spamsave’,0).‘this is not Spam.’
</code>
to…
<code>
$spamwarn.checkbox(‘nhn_comment_spamsave’,‘spamsave’,1).‘this is not Spam.’
</code>
commented out the following lines:
<code>
//return ‘<div class=“comment”>’.$nhn_form.’</div>’;
//return ‘<p class=“author”><a href=”#” id=“NameDisplay”>’.pcs(‘name’).’</a>’;
</code>
and also modified this little chunk by hardcoding the backpage variable to allow for cleaner urls that don’t display comment count in the url:
<code>
$backpage = “/”;
//$backpage = substr($backpage, 0, $prefs[‘max_url_len’]);
//$backpage = preg_replace(“/[\x0a\x0d#].*$/s”,’‘,$backpage);
//$backpage .= ((strstr($backpage,’?’)) ? ‘&’ : ‘?’) . ‘commented=1’;
if($comments_moderate) {
header(‘Location: ‘.$backpage.’#txpCommentInputForm’);
//header(‘Location: ‘.$backpage’);
}
else {
//header(‘Location: ‘.$backpage.’#c’.sprintf(“%06s”,$rs));
header(‘Location: ‘.$backpage);
</code>
see next post for form/style mods
Offline
#19 2005-12-08 23:20:52
- stirman
- Member
- Registered: 2005-12-02
- Posts: 36
Re: Removing preview button in comments TXP 4
in the comment_form form…
I added a div around the spamsave stuff, so it looks like
<code>
<div id=“comm-spam”><txp:nhn_comment_spamsave /></div>
</code>
and then in the style, I added:
<code>
#comm-spam
{
visibility: hidden;
}
</code>
So, basically, I am auto-checking the checkbox and then making it invisible… make sense?
Offline
Re: Removing preview button in comments TXP 4
It’s been a long time since this thread has started.
Since then, I’m still willing to get rid of the mandatory PREVIEW button. I completely understand it prevents SPAM, witch is a good thing, but it’s not the best way to do it. This approach to avoid SPAM goes against usability. Most of the people who post comments just press the button they see and consider it posted. It’s how it work’s. Lots of comments are lost because of the mandatory PREVIEW button. Having to press a submit button twice to post once isn’t a logic thing.
I can’t find nhn_hicks_live_preview anymore.
Does anyone have one solution working in 4.0.4 ?
Offline
Re: Removing preview button in comments TXP 4
Because the name was changed ;): nhn_livecommentpreview. Textpattern.org is your friend :).
Last edited by jm (2007-01-05 18:16:52)
Offline