Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2006-01-05 21:17:17

magicRob
Member
Registered: 2005-12-26
Posts: 14

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

Shall do, if you look at the very first comment… the one posted by textpattern, it’s the only one that is correct…

EDIT: actually it seems to do the same thing with the default comments form… not good… it’s a problem elsewhere then… will see if anyone else is having issues with 4.03-

I finally did what i should have and had a look at the rows being inserted into the DB. You are right, TXP seems to be inserting <p></p> around comments in the database… (apologies for all the hassles, i’m new :) )

Last edited by magicRob (2006-01-05 21:51:48)

Offline

#110 2006-01-15 11:22:56

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I’ve been working on the plugin the last weeks und tried to simplify its handling. Due to the latest spam problems a lot of things changed in textpatterns core and so the plugin code has to change too.

I’m thinking about separating the the live comment preview and the possibility to skip the forced preview into two plugins. That’s why I have a question on how you are using the plugin:

  1. Are you just using the live preview?
  2. Are you using the live preview and do skip the preview?
  3. Are you just using the plugin because you want to skip the preview?

Until now the plugin copies a lot of code to change the comment behaviour especially to skip the preview. I like to reduce these code duplications. If anybody has an idea how to skip the preview and use the possibility to check the comment for spam feel free to post it here or mail me. I’d like the plugin to behave like this, if you skip the preview:

  • guest is writing a comment and hits the submit button
  • txp checks the comment for spam
  • if if seems to be spam, redirect to the normal txp comment preview
  • if it seems not to be spam, save the comment

Best regards,
Nils

Offline

#111 2006-01-21 20:05:24

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

Skubidu, IMHO that proposed method seems quite idiosyncratic…

Would probably confuse the users. Why not just keep the preview, and if the content of the comment is analyzed to be spam, force it to approval-mode, or just plain reject the comment with some feedback to the user a la “sorry, but your comment seems to be spam”?

Last edited by raveoli (2006-01-21 20:08:02)

Offline

#112 2006-01-23 01:13:06

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

And a bug report:
I can’t get past the preview. I write a test comment, click preview, the preview shows up, but the submit function seems to be broken. The comment is never added. The preview is eternal ;-)

So, going to the comments_display form, and reverting <txp:nhn_comments_form /> back to <txp:comments_form /> solves the problem. But then this plugin does not work …

Offline

#113 2006-01-23 02:03:35

stdmedia
Member
From: Canada
Registered: 2006-01-05
Posts: 51

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I have to wonder, since I’ve not tried myself, but does this comment system validate?

Offline

#114 2006-01-23 10:18:00

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

New version 0.5 beta for Textpattern 4.0.3

Please download and test

IF YOU’RE UPDATING from previous versions:

Please revert <txp:nhn_comments_form /> in <i>comments_display</i> under &quot;presentation&quot; &gt; &quot;forms&quot; back to <txp:comments_form />.

Changes:

  • The plugin no longer contains a copy of Textpattern’s comment functions.
  • Due to this change the optional tags <txp:nhn_comment_submit /> and <txp:nhn_comment_spamsave /> have been dropped and will be released as a separate plugin as soon as I know how.
  • Due to this change some extra features, like the customizable tab-index, are dropped. These are changes that have to be done in Textpattern’s core – otherwise the plugin would probably break everytime the developers release a new version.
  • The call of the live preview is now handled by JavaScript itself. This should minimize problems, if a new version of Textpattern is released.

More information can be found in the plugin help.

Last edited by Skubidu (2006-01-24 10:53:45)

Offline

#115 2006-01-23 11:35:44

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I can’t install 0.5 beta – I get:

Notice: unserialize() [function.unserialize]: Error at offset 67 of 9531 bytes in txp_plugin.php on line 155

Badly formed or empty plugin code

Offline

#116 2006-01-23 13:44:36

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I recompiled the plugin – please try again.
Thanks!

Nils

Offline

#117 2006-01-23 19:45:13

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

Now it seems to work like a charm – thanks for the fast fix!

Offline

#118 2006-02-08 05:55:29

sominty
Member
Registered: 2005-12-27
Posts: 16

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I tried installing it and got this error > tag_error <txp:nhn_comments_form/> -> Textpattern Warning: unknown_tag

Also should we be using <txp:nhn_comments_form /> or <txp:comments_form />?

Last edited by sominty (2006-02-08 06:14:00)

Offline

#119 2006-02-08 05:58:52

sominty
Member
Registered: 2005-12-27
Posts: 16

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

I also get this javascript error:

Error: obj has no properties
Source File: http://thewebsite/index.php?file=nhn_livecommentpreview
Line: 14

Offline

#120 2006-02-08 08:37:27

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: [plugin] [ORPHAN] nhn_livecommentpreview: JavaScript live comment preview

Also should we be using <txp:nhn_comments_form /> or <txp:comments_form />?

As I posted above: Please use <txp:comments_form /> if you’re running the newest version.
Can you please post your comment related forms?

Thanks,
Nils

Last edited by Skubidu (2006-02-08 08:38:04)

Offline

Board footer

Powered by FluxBB