Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-13 16:10:41

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

php like $_POST['submit'] on comments form

Hi folks,

All is in the title : do you know (I think you know :) how to test within <txp:php> tags the submit comments event?

Tanks for your help.

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2008-10-13 19:21:56

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: php like $_POST['submit'] on comments form

	if (gps('parentid') && gps('submit')) {
		// Comment posted
	}

This condition is true when the comment is previewed or posted.

You can also create a callback function attached to the “comment.save” event. This event is fired before the comment is saved (not fired on preview).

Offline

#3 2008-10-13 20:23:18

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: php like $_POST['submit'] on comments form

Hi Juanjo :)

Thanks lot for you help : it works perfectly!

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB