Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2005-11-08 08:33:02

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

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

Infi: I’ve got one idea: Have you really changed <txp:comments_form /> in the form “comments_display” to <txp:nhn_comments_form />?

Last edited by Skubidu (2005-11-08 08:34:02)

Offline

#74 2005-11-08 22:13:28

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

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

Installed it, works wonderfully on 4.0.2 with one problem — when a double-quotation mark is followed by any other character (including another double-quotation), it’s replaced with a question mark. A single double-quotation mark show up fine, though. Strange. Any thoughts?

Offline

#75 2005-11-08 22:41:53

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

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

Did you follow that link http://www.nilshoerrmann.de/file_download/8? The version your using on your website is not the beta, it seems to be version 0.3.1. The quotation mark problem should be fixed in the beta.

Greetings,
Nils

Offline

#76 2005-11-09 00:28:50

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

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

Thanks. I’ll update it asap.

Fantastic work on the plugin, BTW.

Offline

#77 2005-11-09 00:35:26

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

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

> Skubidu wrote:

> Infi: I’ve got one idea: Have you really changed <txp:comments_form /> in the form “comments_display” to <txp:nhn_comments_form />?

I have. If I’m the only one experiencing it, must be in my setup. Sent the goods to you.

Offline

#78 2005-11-09 03:24:59

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

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

So, I updated to the beta you pointed me to, aaaand… the comments won’t submit.

I’ve rolled back to the version I was using until the problem is resolved. Anything I can do to help?

Offline

#79 2005-11-09 08:29:41

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

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

Please try these two things:
  1. please turn on debug mode and tell me if you get any notices
  2. please do not insert the javascript tag <txp:nhn_livecommentpreview_js /> and tell me if this changes anything concerning the submit problem.

Are you using the standard preview/submit system or are you using <txp:nhn_comment_submit />? I can’t reproduce your problem – that’s my problem :(

Offline

#80 2005-11-09 08:32:42

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

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

By the way: Is there anybody using the version 0.4 beta without problems as I do?

Offline

#81 2005-11-09 14:51:25

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

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

Here’s how things are set up…

This is my comment form (with most of the layout stuff stripped out):

<div class="small">Name</div>
<txp:comment_name_input />
<div class="small"><txp:comment_remember /></div>
<div class="small"><txp:text item="email" /></div>
<txp:comment_email_input />
<div class="small">http://</div>
<txp:comment_web_input />
<div class="small">
<txp:text item="message" /><br/>
<txp:comments_help />
</div>
<txp:comment_message_input />
<div class="small">
<txp:nhn_comment_spamsave /><br/>
<txp:nhn_comment_submit />
</div>
<div class="small">
<strong>Live preview</strong>
</div>
<txp:nhn_livecommentpreview />

This code works fine with 0.3.1.

I’ve tested the new version again and when I submit a post, it brings me back to the same page with the same form (with the form content retained). There’s no debug strangeness. The state of the spam checkbox doesn’t change anything.

Enabling / disabling the JS code still doesn’t have an effect on posting.

Last edited by ashground (2005-11-09 16:56:08)

Offline

#82 2005-11-09 23:13:35

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

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

Hi
I can’t get the live comment to work on this page:
http://www.pieman.net/clients/beatbreakaz/audio/electro-magnetic

comments_display
<code><txp:if_comments>
<h3>Comments</h3>
<txp:comments />
<txp:else />
<p>No Current Comments</p>
</txp:if_comments>

<txp:if_comments_allowed>
<txp:comments_form />
<txp:else />
<p><txp:text item=“comments_closed” /></p>
</txp:if_comments_allowed></code>

comment_form
<code><div id=“commentform”> <h3>Add Your Comment</h3> <p>You may use <a target=”_blank” href=“http://www.textpattern.com/help/?item=textile_comments” onclick=“window.open(this.href, ‘popupwindow’, ‘width=300,height=400,scrollbars,resizable’); return false;”>textile</a> in your comment. <a class=“external” href=“http://gravatar.com”>Gravatars</a> are enabled. Your email will not be displayed and will remain private. Open and honest communication is encouraged, but I reserve the right to edit or delete comments.</p>

<label for=“name”>Your Name:</label>
<input type=“text” id=“name” name=“name” value=”<?php echo pcs(‘name’); ?>” size=“25” tabindex=“1” /><br />
<label for=“email”>Your Email: (will be hidden)</label>
<input type=“text” id=“email” name=“email” value=”<?php echo pcs(‘email’); ?>” size=“25” tabindex=“2” /><br />
<label for=“web”>Your Website: (optional) http://</label>
<input type=“text” id=“web” name=“web” value=”<?php echo pcs(‘web’); ?>” size=“25” tabindex=“3” /><br />
<label for=“message”>Your Comment:</label>
<textarea id=“message” name=“message” cols=“30” rows=“12” tabindex=“4”><?php echo pcs(‘message’); ?></textarea><br />
<txp:nhn_livecommentpreview />
<txp:comment_preview />
<txp:comment_submit />
</div></code>

the nhn_livecommentpreview reads <code><h3>preview</h3> <txp:nhn_lcp_preview /></code>

And <code><txp:nhn_livecommentpreview_js /></code> is in the head

The <code><div id=“TextDisplay”></div></code> div is being written below the form as expected but when i type into the field the preview doesn’t show.

Perhaps there is something wrong with the JavaScript? I am pretty clueless about JS ;) but i checked it in the FF dev toolbar JavaScript Console and it’s giving a lot of errors.

Any advice appreciated.

Offline

#83 2005-11-09 23:26:26

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

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

Hey pieman!
Your problem is a javascript problem: You have inserted the javascript twice:

  • <script src="http://www.pieman.net/clients/beatbreakaz/inc/js/livePreview.js" type="text/javascript"></script> – if you attach the javascript like that, you have to delete the <script>-tag in the external file.
  • The other one is inserted directly.

By the way: You’re using the version 0.3.1 and not the new 0.4 beta I mentioned above.
Please clean up your javascript and tell me if it works.

Nils

Last edited by Skubidu (2005-11-09 23:26:40)

Offline

#84 2005-11-10 09:29:00

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

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

Thanks Skubidu

Well spotted! I removed the old <code><script></code> tag, leaving the <code><txp:nhn_livecommentpreview_js /></code> in the head, and I upgraded the plugin to 0.4 beta. But still no preview appears :(

I thought it may be a browser issue but it works ok on other sites.

by the way… I’d prefer to keep the javascript out of the markup. Is there a way in Txp to do this?

thanks again
Stu

Offline

Board footer

Powered by FluxBB