Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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