Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
Online
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
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
Online
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
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
Online
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
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
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
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
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