Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2011-03-21 12:22:01

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: mem_public_article

This is a not a bug as such…

I’ve got mem_public_article going to post an article (Title, Date only) to the database. I’m now trying to add an expiry date as well, but everything I have tried simply results in 00/00/0000 being posted to the database.

For example, if I just copy the fields from the back end form – exp_day, exp_month and exp_year – nothing happens. Is there some sort of post processing going on that converts the expiry date fields on the form to a true expiry date for the database?

It’s weird, because getting the article date into the database was really simply.

Offline

#38 2011-03-23 06:15:55

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: mem_public_article

aslsw66 wrote:

For example, if I just copy the fields from the back end form – exp_day, exp_month and exp_year – nothing happens. Is there some sort of post processing going on that converts the expiry date fields on the form to a true expiry date for the database?

I happen to have not worked, so I can not tell anything. I’ll try as soon as free time.

About the error: Undefined variable – mud is bad.

anyone tried to organize a preview with this plugin?
Share your experiences, please.
Thanks in advance.

Offline

#39 2011-12-09 20:23:47

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: mem_public_article

I’ve got this thus far:

<txp:mem_public_article article_id="31">
<txp:mem_form_text name="Title" label="Place Name" break="" />
<txp:mem_form_textarea name="Body" label="Place Description" break="" />
<txp:mem_form_secret name="Author" label="Author" value="somebody" />
<txp:mem_form_secret name="textile_body" value="1" label="textile body" />
<txp:mem_form_secret name="textile_excerpt" value="1" label="textile excerpt" />
<txp:mem_form_secret name="Section" value="places" label="Section" />
<txp:mem_form_secret name="Status" value="4" label="Status" /> 
<txp:mem_form_submit />
</txp:mem_public_article>

1. Using article_id="31" in <txp:mem_public_article article_id="31"> is enough to fill the form fields with the content from that article in the database but when submitting the form it returns The url_title must be unique. What can I do about this? It wants to create a new article every time.

2. Also, can we go higher than custom_10?

Last edited by whaleen (2011-12-13 23:53:04)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#40 2012-02-28 14:40:22

blur
Member
Registered: 2008-09-08
Posts: 18

Re: mem_public_article

There is a way to allow visitors to edit a field from a specific article? I’m trying something like:

<txp:mem_public_article form="my_form" success_form="success_form" article_id='<txp:article_id />' />

That works, but i don’t want mem_public_article to creates a new article. I just want to update/edit an existing article. Any ideas?

Offline

#41 2012-06-07 15:51:01

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

Re: mem_public_article

UP !
Same question as Blur.
That plugin does modify an existing article, or just create a new one?

If yes, how? I have not succeeded.
If no, what alternative can I use?

Thanks

Offline

#42 2012-10-26 19:38:43

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: mem_public_article

sacripant wrote:

Same question as Blur.
That plugin does modify an existing article, or just create a new one?

If I remember correctly it only creates new. I’ve successfully had front-end editing of existing articles working in the past. It went something like this:

<txp:smd_query query='SELECT title, id, body, excerpt FROM textpattern WHERE  id = "<txp:article_id />" '>

<txp:mem_simple_form table="textpattern" id_field="id" id_insert="0" success_form="some_form">

<txp:mem_form_text name="table_title" label="Title" break="" default="{title}" />
<txp:mem_form_textarea name="table_body" label="Body" break="" default="{body}" required="0" />
<txp:mem_form_textarea name="table_excerpt" label="Excerpt" break="" default="{excerpt}" required="0" />
<txp:mem_form_secret name="integer_id" value="{id}" />
<txp:mem_form_submit />

</txp:mem_simple_form>

</txp:smd_query>

I’ll post more when I get a chance to test out what I had working… have to find it. The above code should work as an article form:

Update: And it does.

Last edited by whaleen (2012-10-28 01:43:59)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

Board footer

Powered by FluxBB