I am working with the form helper plugin to allow members to edit their own weblog entries.
First I list all their entries using a mysql call.
Then I would like them to select one from the list, click on it and edit it on a new page. How should I pass the variable to the edit page? What variable should I pass to then find the right entry?
Probably the entry id- but possibly the weblog id as well. I don’t actually use the plugin, so I’m not sure. What’s the standard url to the edit page look like and what parameters are required? That will tell you what you need right there.
Probably the entry id- but possibly the weblog id as well. I don’t actually use the plugin, so I’m not sure. What’s the standard url to the edit page look like and what parameters are required? That will tell you what you need right there.
I have the list so far and I am trying to figure out what would be the best way to link to the edit page. So the edit page does not exist yet. I need to identify the post somehow, then find all the required info in the database, and display it. We are using URL rewrite…
Something will need to be passed (probably the entry_id as you mentioned). I can pass that in the URL, which would be the easiest. Then I will need to read that variable in on the edit page. Is there a standard way EE passes, then reads the variables in?
Yep- see segment globals- they make it very easy to pass variables in the url- basically a matter of tacking them onto the url and then using {segment_x} to pull them out.
Vik: it is still in the process. I am moving slow with it, because I have lot of other things to do. i was also looking for some tutorial, because it is really not as simple as most people say so. I will try to write something up and then link it in here.
I’m another one, I find the instructions a little bit of Greek to me…and I don’t know Greek unfortunately. Is there an example working form anyplace to use as a starting point?
It looks great and has many uses I’m sure, and appreciate all the know how and skill and time that went into it.
I was going to write a book, “Stand alone Entry Form, Stand alone entry form helper, and the stand alone entry form edit for dummies”, but I’m the dummy so I can’t. Dang!
There is already a sample edit form available in the zip folder you have downloaded it!
Thanks, true. It took a little thinking and head banging, but fianally made progress and have a custom and customizable form for posting and uploading photos in a template which the client wanted.
Now going to work on the edit form part when time allows. Strained what was left of my brain but it’s working!
Now lets look at Structured Blogging and all this together…!
Totally awesome combination that does a LOT! EE is going to take over the world
dombi, could you post a sample template for a stand-alone edit form that uses Form Helper so that members can edit their own posts?
{exp:form_helper:member_is_author author_id="{author_id}"} {if member_not_author} Sorry. Only the author of this entry is allowed to edit it. {/if} {exp:weblog:entry_form weblog="weblog1"} blah blah blah {/exp:weblog:entry_form} {/exp:form_helper:member_is_author}
{exp:form_helper:member_is_author author_id=”{author_id}”} {/exp:form_helper:member_is_author}
If you want to restrict the editing of an entry to the member who authored the entry, use this tag pair. If the currently logged in member does not have the same author id as the one you supplied in the ‘author_id’ parameter, whatever is wrapped inside the tag pairs will not show. (from plugin’s doc)