Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-02-13 02:01:28

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Allow users to add a post

Hi ! I’m new in Textpattern, I discovered this today, and I followed some tutorials. I can understand how this CMS works because I used tu work with Drupal and wordpress. But textpattern seems to be very light and fast. So I would like to learn how to use it.
My question is, how can I allow users to post something in the page? I would like to do something like a guestbook and users will not need to register for do that. Only a captcha image will be enough. Can you help me with that?
I searched how to make a form but apparently forms in textpattern are not the same thing as in other CMS or HTML.
Thank you !

Offline

#2 2014-02-13 09:54:18

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,356
GitHub

Re: Allow users to add a post

Hi RussoNC – welcome to Textpattern. You could have a guestbook with comments enabled, that would mostly solve it – having the guestbook introduction be an article would be pretty straightforward and let people post without registering.

Alternatively, you could look at men_self_register if you want your users to have more rights.

Offline

#3 2014-02-13 10:30:03

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Re: Allow users to add a post

Thank you for the welcome and the answer, gaekwad !
In fact, this is a little more complicated because what I need to do is allow users to “post” their webservers. So I’ll need to add several fields like name of the project, date of creation, description, link, etc… and then I’ll process all the information. You can see my actual page: www.pirepository.com
Is the same thing, I’m looking to doing it with a CMS because doing this from scratch is going me crazy.
I’ll test this plugin, even if users have to subscribe is not that bad.

Offline

#4 2014-02-13 10:51:43

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,356
GitHub

Re: Allow users to add a post

In that case, you could look at zem_contact_reborn instead: textpattern.org/plugins/701/zem_contact_reborn – you can create text fields with identifiers and have the form submitted to you directly, so you can avoid the need to register users and have much more control over the information submitted. zem_contact_reborn is widely-used, so you should have no problem getting help if you need it.

Offline

#5 2014-02-13 22:21:30

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Re: Allow users to add a post

Ok I’ll check this plugin and see what I can do with it. Thank you again !

Offline

#6 2014-02-23 01:10:51

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Re: Allow users to add a post

I successfully used zem_contact_reborn to do my form thing. (I had to includ an php script witch injects the data to the textpattern table to create a new article) I don’t know if is the best solution but it works.
Now I’m searching to allow users to choose a categorie for their articles. I would need to display in a select box. I’m trying to use this:
<txp:category_list label=“Categories” wraptag=“p” break=“br” />
But is displaying a list with links and I only need the “name” of the category so I can make a loop and add in a select box in my form article.
I can’t find in the doc or FAQ how to do it, did you know how can I achieve this?
And again, thank you for your help !

EDIT: Ok I just realised that I can do something like:
<txp:zem_contact_select list=“Marketing,Sales,Support” selected=“Marketing” />

But is there a way to auto-feed this list using the categories that I created before?

Last edited by RussoNC (2014-02-23 01:13:54)

Offline

#7 2014-02-23 10:36:50

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: Allow users to add a post

Hi RussoNC, welcome to txp!

RussoNC wrote #279161:

I successfully used zem_contact_reborn to do my form thing. (I had to includ an php script witch injects the data to the textpattern table to create a new article) I don’t know if is the best solution but it works.

I have made a plugin for a similar request, that takes care about data validation (e.g. check if this category exists and so on). You could give it a try, and should validate the user-input data before insertion in any case.

EDIT: Ok I just realised that I can do something like:
<txp:zem_contact_select list=“Marketing,Sales,Support” selected=“Marketing” />

But is there a way to auto-feed this list using the categories that I created before?

Maybe something like <txp:zem_contact_select list='<txp:category_list break=“,”><txp:category /></txp:category_list>' ... />?

Offline

#8 2014-02-24 00:36:45

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Re: Allow users to add a post

Thank you for the answer etc !! I’ll check your plugin and let you know. It seems very interesting.

This is not working
<txp:zem_contact_select list='<txp:category_list break=“,”><txp:category /></txp:category_list>' ... />?

I tried to do something like this with the category tag only too. But it looks like this tag can only display the current category and not all the list.
If I use <txp:category_list break=“,”> it won’t let me remove de “a” link…
anyway I suppose I can live with my first solution, thanks again !

Last edited by RussoNC (2014-02-24 00:38:01)

Offline

#9 2014-02-24 01:33:06

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Allow users to add a post

RussoNC wrote #279177:

This is not working
<txp:zem_contact_select list='<txp:category_list break=“,”><txp:category /></txp:category_list>' ... />?

[…]But it looks like this tag can only display the current category and not all the list.

There’s nothing wrong doing it this way, it should display a list. The only thing looking strange is the typographic apostrophes around the value for break. Try straight ones.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2014-02-24 19:47:57

etc
Developer
Registered: 2010-11-11
Posts: 5,393
Website GitHub

Re: Allow users to add a post

RussoNC wrote #279177:

anyway I suppose I can live with my first solution, thanks again !

Just take care to sanitize all user input.

uli wrote #279178:

The only thing looking strange is the typographic apostrophes around the value for break. Try straight ones.

I don’t know how that happened, now it seems to work: <txp:try break="," />?

Edit: ah, I have copied them from textiled RussoNC post, mea culpa.

Last edited by etc (2014-02-24 20:31:55)

Offline

#11 2014-02-27 00:19:48

RussoNC
New Member
Registered: 2014-02-13
Posts: 7

Re: Allow users to add a post

Sorry about the late response.

Well I’m not able to use this:
<txp:zem_contact_select list='<txp:category_list break=","><txp:category /></txp:category_list>' />

It’s something that I’m doing wrong?

If I do this manually I get this message:

Tag error: <txp:zem_contact_select label="Categories" list=",educational,games/entertainement,hardware,languages,programation,tools" /> -> : Function split() is deprecated while parsing form None on page Add your server

I hope not being annoying with all my questions, as soon as I get more “mature” with txp I’ll start to contribute to the plugins and in the forum community.

Last edited by RussoNC (2014-02-27 00:20:33)

Offline

#12 2014-02-27 01:50:59

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Allow users to add a post

RussoNC wrote #279296:

Function split() is deprecated

That should go away if you replace “split” by “explode” in the zem_contact_reborn plugin code. (clumsy measure in that rhyme ;)

I hope not being annoying with all my questions

No problem at all.

Last edited by uli (2014-02-27 01:53:34)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB