Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2005-11-11 07:32:05

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

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

Pieman: You don’t have to create a new form called “nhn_comment_form”! The plugin uses the standard form “comment_form”, it just handels it differently and inserts some JavaScript calls. For that reasons you have to use <txp:comment_message /> in that form for example – otherwise there will be no live preview because there is no JavaScript call to start it.

For example:

  1. Your comment form has the following output for the comment message: <textarea id="message" name="message" cols="30" rows="12" tabindex="4"></textarea>
  2. If it’s handled by the plugin it would be: <textarea name="message" cols="25" rows="5" class="txpCommentInputMessage" id="nhn_message" onkeyup="ReloadTextDiv();"></textarea>

The minimum you have to do to get it work is to add the id and the onkeyup event.

Please read the plugin help again – that might help.

Nils

Last edited by Skubidu (2005-11-11 08:11:00)

Offline

#92 2005-11-11 08:16:41

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

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

tkn: You don’t have inserted the javascript anywhere in your page. Please place <txp:nhn_livecommentpreview_js /> in the head of your page.

Back to topic: the beta release. Anybody using it without having problems. The discussed problems (beside the submit/spamsave problems) don’t seem to have anything to do with that release.

Last edited by Skubidu (2005-11-11 09:21:50)

Offline

#93 2005-11-11 08:51:45

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

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

Thanks for your help Skubidu… its much appreciated.

Offline

#94 2005-11-11 19:04:14

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

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

Okay… I found a bug… Shame on me for that one:
Try 0.4 beta 2, please.

Offline

#95 2005-11-13 17:28:37

Infi
Member
Registered: 2005-05-28
Posts: 75

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

Yay! It works. Thanks so much. Only thing remaining (as far as I can see) is validation, remembrance and display.

A few of the the tags aren’t properly closed in the script. I’d fixed that and thought to send you a copy before you changed it again, but you were too fast for me. :)

1. Where returned, the input fields and check boxes need to be closed with “ />”

2. language=“javascript” in the script tag can go. (It’s not necessary and doesn’t validate.)

3. Unchecking remember doesn’t seem to prevent being remembered, but the forget box works just great.

<strike>4. nhn_comments_form doesn’t display the comments approved. (Neither does the txp version, so it may be unrelated. Checking.)</strike>

All other issues appear to be fixed. Comment is submitted, checks done and errors appear inline. (Found number 4. Strike that one.)

Really fantastic job. One for the books. :)

Last edited by Infi (2005-11-13 20:45:39)

Offline

#96 2005-11-13 21:32:23

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

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

Hi Infi!

1. and 2. are easy to fix.
Concerning No. 3: Does this happen only if you use the plugin? I can’t remember having changed anything in this part of the script…

By the way: Thanks for testing :)

Nils

Offline

#97 2005-11-13 21:41:11

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

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

An other question to all the users of the 0.4 beta:
Do you have any suggestions for changes in the help text? I know how to use the plugin so I’m perhaps not the right one to explain how it should be used. Are there problems and basics that should be mentioned?

Nils

Offline

#98 2005-11-14 00:56:51

Infi
Member
Registered: 2005-05-28
Posts: 75

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

> Skubidu wrote:

> 1. and 2. are easy to fix. Concerning No. 3: Does this happen only if you use the plugin? I can’t remember having changed anything in this part of the script… By the way: Thanks for testing :)

My pleasure. This plugin rocks! :)

As for no. 3: Since “Forget” is not native, I thought perhaps the two just don’t get along together, but don’t have time right now to reverse everything and see, so I’ll have to let you know on that one. This is a tiny one, too, though. People can easily “forget themselves” later. heh

In regards to the documentation, I don’t see how it could be improved. Everything seems very straightforward to me. If someone just skims it, they might have problems. Otherwise, implementing it should go off without a hitch.

Offline

#99 2005-11-18 16:38:21

Dragan
Member
From: Novi Sad, Serbia
Registered: 2005-10-26
Posts: 100
Website

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

Hi skubidu, I have just installed your plugin (v0.3.1) and my HTML won’t validate anymore because of some error in the javascript.Here’s the link .

Now here are my questions:
  • Can I safely instal the 0.4 version without things falling apart?
  • I have a problem which I can’t seem to fix. When I was testing this, I have tried to publish the comment without checking the box, now I have got the warning message (I have previously translated it to Serbian) and a < br / > element witch I don’t want there, and I haven’t succeeded to remove it from there.
  • I also fear that someone will try to submit a comment in a rush and lose it. I wonder if some client side validation could be implemented?

That’s all, works like a charm, feel free to test it on my site.

Offline

#100 2005-11-30 10:55:58

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

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

Hi Skubidu

Your 0.4 beta 2 is running well, with only one problem:
The form remembers the previous name/email details that were entered. That much seems fine.
If you enter new details and check the spamsave box all is well.
But if you change the name/email details and submit the comment without checking the spamsave box, the warning message is displayed OK, but the name and email fields revert to whatever old name/email details were stored during the previous comment, so you have to enter them again if you want them saved correctly. The actual comment remains correct.
The strange thing is, if you then abandon the comment at that stage and load the page again, the new name/email details are remembered in the form, even though the comment was never saved.

you can see it in action <a href=“http://www.pieman.net/clients/beatbreakaz/audio/batanova”>here</a>

Offline

#101 2005-11-30 18:14:29

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

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

Hi!

Thanks for the feedback. I hadn’t enough time the last weeks to work on the plugin. I’m going to look at your problems the next few days.

Nils

Offline

#102 2005-12-04 14:11:32

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

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

It worked in TXP 4.2 but the number of comments won’t update.

Offline

#103 2005-12-04 18:09:25

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

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

Any chance of some AJAX guru out there want to tackle this so that the page doesn’t actually need to reload when the comment is submitted?

Offline

#104 2005-12-24 08:24:14

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

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

There have been some serious spam problems with textpattern’s standard comment system over the last weeks. I just wanted you to know that it is possible to skip the preview button with my plugin: this option is NOT recommended if you want to prevent spam!

Version 0.4 final won’t be released until I know which steps will be taken against spam by the development team. There are some changes in the core that will be interesting for this plugin.

By the way: Merry Christmas to everyone :)
Nils

Offline

#105 2006-01-05 03:37:52

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

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

Anyone else find that a blank line is being inserted at the start of each comment ?

So what ends up happening is that you have:


comment starts here…
text
text
text”

Last edited by magicRob (2006-01-05 03:54:42)

Offline

Board footer

Powered by FluxBB