Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2009-07-03 19:49:21

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: Improving...

Doh!

I just assumed that I still needed to approve my post (I didn’t even look at the comment status when I was messing around), but you’re absolutely right!

Excellent work, Juanjo – this is going to make a lot of people very happy..!


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#26 2009-07-03 20:37:11

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

Re: Improving...

Gocom wrote:

Remember to escape the insert queries. Currently the web, email and name…

Ok.

Maybe you don’t need to define globals for every page when they don’t do anything. Actually you don’t even need them for anything, because the code always calls the function directly (or could).

Globals? What do you mean?

The txp_discuss.php include is not required if you just point the form to the comment edit page with correct inputs.

Using a “Location” Header? The problem is that I cannot send the confirmation message to be printed using a redirect. Do I?

Offline

#27 2009-07-03 23:28:40

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Improving...

juanjonavarro wrote:

Globals? What do you mean?

$textarrray. You could either define it inside the function (not outside of it) or then by just tranfering the form data with post from preview to submit ect. Currently the global is defined for whole backend.

juanjonavarro wrote:

Using a “Location” Header? The problem is that I cannot send the confirmation message to be printed using a redirect. Do I?

Well you could redirect, but not required. You only need to send the form to the correct page – for example to the same comment edit dialog was used to write the comment.

Yes, you can’t use pagetop() nor the inbuild message system. But you could use own message that is shown somewhere alongside the form content, for example. Not as fancy tho.

Offline

#28 2009-07-04 08:57:15

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

Re: Improving...

Gocom wrote:

$textarrray. You could either define it inside the function (not outside of it) or then by just tranfering the form data with post from preview to submit ect. Currently the global is defined for whole backend.

$textarray is the array of “literals” of textpattern. I’m just defining new literals so I can use them later with gTxt. I define them at the top so:

  1. It’s easier to translate it to your language when you install de plugin.
  1. Can be modified later by another plugin . I think I saw a plugin that let you modify these literals.

Well you could redirect, but not required. You only need to send the form to the correct page – for example to the same comment edit dialog was used to write the comment.
Yes, you can’t use pagetop() nor the inbuild message system. But you could use own message that is shown somewhere alongside the form content, for example. Not as fancy tho.

The problem is that I want to show the messages list after submit. And the message list function is not defined because we are not in the discuss “event”, so the txp_discuss.php (where it is defined) is not included by textpattern. That’s why I include the file here, so I can call discuss_list().

Offline

#29 2009-07-06 18:40:06

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

Re: Improving...

Here is the 0.3 version (first public version) and individual thread: jnm_reply_comments

Offline

Board footer

Powered by FluxBB