Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-16 00:58:29

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

mem_public_article

Edit: 2010-10-03

Please go to http://bitbucket.org/Manfre/txp-plugins if you…
  • are having a problem and want to report a bug
  • would like to request a new feature
  • are looking for documentation
  • are looking for the plugin code
  • are looking to download the latest ready to install plugin file

I do not regularly follow this thread anymore. Any problems or questions posted here will most likely only get answered by other forum members.

Original post

mem_public_article

This plugin allows for a site owner to create an article edit form on the public side of their site.

I had originally planned on ransoming this plugin, but after doing nothing with it for ~7 months I figured I might as well release it. Donations welcome

Last edited by Manfre (2010-10-03 16:20:12)

Offline

#2 2009-09-16 01:38:03

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: mem_public_article

Manfre,

Your link is wrong there ace. ;)

Here’s the correct link

Thanks for this!

Last edited by renobird (2009-09-16 01:40:03)

Offline

#3 2009-09-16 22:27:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: mem_public_article

Manfre, this looks like it might simplify the process I’d written to you about with smd_query and mem_simple_form a great deal. Thank you again.

Could it be that a key attribute – article_id – is missing from the help docs? Am I right in assuming by specifying this – or via a tag-in-tag – one can prepopulate the form with data from an existing article so that one can edit existing articles?


TXP Builders – finely-crafted code, design and txp

Offline

#4 2009-09-16 22:33:56

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_public_article

It’s missing from the documentation. article_id can be either a number or a txp tag that will yield an article id.

Offline

#5 2009-09-16 22:36:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: mem_public_article

Great, thanks for the rapid feedback. That makes the plugin a potential all-in-one solution :-)


TXP Builders – finely-crafted code, design and txp

Offline

#6 2009-09-22 03:25:52

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: mem_public_article

Hi Manfre,

I was doing a little test with the following code:

<txp:mem_public_article article_id="1">
<txp:mem_form_text name="Title" />
<txp:mem_form_textarea name="Body_html" />
<txp:mem_form_submit />
</txp:mem_public_article>

however i get this error on submit:

Tag error: <txp:mem_public_article article_id="1"> ->  Textpattern Notice: You must provide a table name as an attribute to mem_simple_form  on line 101

It loads the article, why does it ask me for a table when I press submit? Is it a bug or am I misunderstanding things?

Cheers – Jan


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#7 2009-09-22 09:54:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: mem_public_article

Tag error: <txp:mem_public_article article_id=“1”> -> Textpattern Notice: You must provide a table name as an attribute to mem_simple_form on line 101

Do you happen to have mem_simple_form also active on the same installation? If so, does the error occur when you deactivate mem_simple_form (which should not be needed for mem_public_article)?


TXP Builders – finely-crafted code, design and txp

Offline

#8 2009-09-22 13:49:00

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_public_article

@JanDW, you have an old version (v0.1 or v0.2) of mem_simple_form activated. Either update to v0.3 or deactivate the plugin.

Offline

#9 2009-09-25 03:14:51

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: mem_public_article

Thanks Jakob and Manfre. I did indeed have mem_simple_form v0.1 installed, I think it is still not working as supposed, but I’ll report on that later…

Last edited by JanDW (2009-09-25 03:15:23)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#10 2009-10-02 12:07:18

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: mem_public_article

Same problem with mem_simple_form 0.3 here. It’s now deactivated
No more “you must provide a table name” error.

But, when I fill and submit the form, it tries to open a page which doesn’t exist. And the article is not present in the admin.

here is the content of my “public-article” form:

<txp:mem_form_text name="title" label="Title" /> <br />
<txp:mem_form_text name="section" label="Section" />  <br />
<txp:mem_form_textarea name="body" label="Body" />  <br />
<txp:mem_form_text name="author" label="Auteur" />  <br />

<txp:mem_form_submit />

could someone please post only one working example, I’m spending my afternoon trying to figure out how to use and what are the relationships between Manfre’s temptating public side plugins !

Thanks!

Last edited by PascalL (2009-10-03 21:39:56)

Offline

#11 2009-10-03 21:39:28

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: mem_public_article

Ok, after many trials and errors, here is a working form called by the mem_public_article tag .
All the fields are required and their absence causes errors. The “Section” field is a bit more tolerant, but will cause an error in the write tab later on.

<txp:mem_form_text name="Title" label="Title" />
<br />
<txp:mem_form_textarea name="Body" label="Contenu" /> 
<br />
<txp:mem_form_select name="textile_body" label="Balises d'article" items="Utiliser textile,Convertir les retours à la ligne,Laisser le texte tel quel" values="1,2,3" />
<br />
<txp:mem_form_select name="textile_excerpt" label="Balises de résumé" items="Utiliser textile,Convertir les retours à la ligne,Laisser le texte tel quel" values="1,2,3" />
<br />
<txp:mem_form_text name="Author" label="Auteur" default="invité" /> 
<br />
<txp:mem_form_select_section name="Section" Label="Section" />
<br />
<txp:mem_form_select name="Status" label="Statut" items="Brouillon, En attente de validation,Publié" values="1,3,4" /> 
<br />
<txp:mem_form_submit />

Now, I’d like to find a way to fill some of those fields silently, without presenting them to the users.

Offline

#12 2009-10-03 22:43:50

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

Re: mem_public_article

Now, I’d like to find a way to fill some of those fields silently, without presenting them to the users.

The mem_form_secret tag does it. Here is the modified minimal form:

<txp:mem_form_text name="Title" label="Title" />
<br />
<txp:mem_form_textarea name="Body" label="Content" /> 
<br />
<txp:mem_form_text name="Author" label="Auteur" default="guest" />
<br />
<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="articles" Label="Section" />
<txp:mem_form_secret name="Status" value="3" label="Status" /> 

<txp:mem_form_submit />

Keep in mind this doesn’t allow to reuse the same title between articles. It is probably better to fill the url_title field with a unique id. Still have to figure out how.

Last edited by PascalL (2009-10-03 22:53:34)

Offline

Board footer

Powered by FluxBB