Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#151 2006-08-11 06:07:29

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

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

Hm – I’m not sure because I don’t know what exactly is causing this weird error. The code of version 0.5 is reduced to the JavaScript stuff (it does no longer provides a copy of the original comment code) so you would not able to skip the preview or adjust the tab index anymore.

You may try it, but I’m not sure if it solves the problem :|

Offline

#152 2006-08-11 10:15:07

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

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

Skubidu – I’ve finally got to the bottom of this problem, and I’m afraid it wasn’t to do with your plugin. I hadn’t noticed that I was still using a < ? php tag to output the ‘name’ value. My apologies!


Cheers,
Jon VC#9

Offline

#153 2006-08-11 10:24:49

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

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

No problem :)

Offline

#154 2006-11-01 06:13:55

casual
New Member
Registered: 2006-11-01
Posts: 6

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

I’m having a problem with version .5 of nhn_ with the newest textpattern release. I get this error on the actual “presentation”>>“forms” page…

Warning: Duplicate entry 'nhn_livecommentpreview' for key 1 insert into txp_form set Form='
Preview
\n

:
\n\n

', type='comment', name='nhn_livecommentpreview' textpattern/lib/txplib_misc.php(512) : 
eval()'d code:13 safe_insert() in .../textpattern/lib/txplib_db.php on line 84

Not really sure how to fix that in the code after taking a look at it… is it from the “name=” inside the safe_insert…or from the tag itself…

Offline

#155 2006-11-01 06:37:34

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

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

Hmm…

First of all: it’s just a warning that should disappear if you are in live mode. Is that correct? Does your site work as expected?
I have to investigate what this message is all about. Not sure if I’ll have the time today.

Nils

Offline

#156 2006-11-01 08:17:03

casual
New Member
Registered: 2006-11-01
Posts: 6

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

whoa, quick response!
The warning shows up on all modes, testing, debugging, live. The site functions normally except for the comment preview doesn’t work.

Offline

#157 2006-11-01 08:26:57

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

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

Can you please change these lines in the plugin source code

// -------------------------------------------------------------
// create live preview form
function nhn_save_form() {
	if(!safe_row("name", "txp_form", "'name' LIKE 'nhn_livecommentpreview'")) {
		$Form = '<h3>'.gTxt('preview').'</h3>\n<p class="author"><txp:nhn_lcp_author />:</p>\n<txp:nhn_lcp_preview />\n<p class="posted"><txp:nhn_lcp_date /></p>';
		safe_insert("txp_form", "Form='$Form', type='comment', name='nhn_livecommentpreview'");
	}
}

to

// -------------------------------------------------------------
// create live preview form
function nhn_save_form() {
#	if(!safe_row("name", "txp_form", "'name' LIKE 'nhn_livecommentpreview'")) {
#		$Form = '<h3>'.gTxt('preview').'</h3>\n<p class="author"><txp:nhn_lcp_author />:</p>\n<txp:nhn_lcp_preview />\n<p class="posted"><txp:nhn_lcp_date /></p>';
#		safe_insert("txp_form", "Form='$Form', type='comment', name='nhn_livecommentpreview'");
#	}
}

and tell me if this solves your problem?

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

Offline

#158 2006-11-01 08:42:59

casual
New Member
Registered: 2006-11-01
Posts: 6

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

yea I tried that a bit ago, it takes away the errors but still doesn’t allow the preview to work.

Offline

#159 2006-11-01 08:46:23

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

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

Can you please post the comment form you’re using.
By the way: Does the form “nhn_livecommentpreview” exist in your admin panel?

Offline

#160 2006-11-01 08:53:18

casual
New Member
Registered: 2006-11-01
Posts: 6

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

<txp:comments_error wraptag="ul" break="li" />

<fieldset><legend>Enter Your Info</legend>
<txp:comments_help />
		<label for="name"><txp:text item="comment_name" /></label>	
		<txp:comment_name_input />
<label for="email"><txp:text item="comment_email" /></label>	
		<txp:comment_email_input />
	<label for="web"><txp:text item="comment_web" /></label>	
		<txp:comment_web_input />
</fieldset>


<fieldset><legend>Type Your Comment</legend>

		<label for="message"><txp:text item="comment_message" /></label>
	<txp:comment_remember />	
	<txp:comment_message_input />
<txp:comment_preview />
<txp:comment_submit />
</fieldset>


<fieldset><legend>Preview Your Comment</legend>
<txp:nhn_livecommentpreview />
</fieldset>

that’s my comment form. “nhn_livecommentpreview” is there in my forms. I left it as is.
It must just be with the javascript, I noticed that after those lines of code are commented out, the “nhn_livecommentpreview” form shows up on the pages source code (it didn’t at first).

Last edited by casual (2006-11-01 09:01:16)

Offline

#161 2006-11-01 08:57:38

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

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

That’s looking fine.
Do you have a link to the live website?

I’m still not sure what this problem is all about – I can’t reproduce it.

Offline

#162 2006-11-01 11:20:48

casual
New Member
Registered: 2006-11-01
Posts: 6

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

sure, here is the page i’m testing it on http://www.threedozen.com/about/about-three-dozen

thanks for all your help by the way, i really appreciate it.

Offline

#163 2006-11-01 11:43:34

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

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

I’m not sure if this is one of the problems, but could you use different ids for your contact form. You’ve got id="message" for the comments and id="Message" in your contact form.

Offline

#164 2006-11-01 18:08:42

casual
New Member
Registered: 2006-11-01
Posts: 6

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

nope, still no good after changing it.

Offline

#165 2007-01-04 20:43:47

uselessness
Member
From: Albuquerque, NM
Registered: 2006-11-06
Posts: 17
Website

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

What is the status on this plugin? Does it work on Txp 4.0.4? I’d love to install it but I have a busy site and don’t want to screw anything up for the users if it doesn’t work. Thanks a lot, this will be perfect if it does work.

Offline

Board footer

Powered by FluxBB