2 of 11
2
Standalone Edit Forms
Posted: 25 April 2005 01:00 PM   [ Ignore ]   [ # 19 ]  
Lab Assistant
RankRank
Total Posts:  238
Joined  12-06-2002

Hi Sue, I appreciate the members/logged in nature of the form. My main concern is if someone decides to interrogate or wreck the database through it. My impression was the EE folks hadn’t allowed editable forms yet due to security concerns. Might be wrong, but it’s in my nature to double-check!

Oh, and to use formatting buttons, add

{formatting_buttons}

somewhere in the form, and then add

onclick='setFieldName(this.name)'

to each field to make the fields clickable and thus able to accept button code.

Profile
 
 
Posted: 25 April 2005 01:17 PM   [ Ignore ]   [ # 20 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11758
Joined  04-29-2002

Thanks Simon. I’m not sure about the security concerns.. Rick or Paul could probably elaborate on that.

Great tip about adding the {formatting_buttons} to the edit form. I didn’t add them to my sample. Now I will. smile

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 25 April 2005 01:29 PM   [ Ignore ]   [ # 21 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6027
Joined  08-04-2002

This is going to be really, really handy grin
Am also wondering about the security.

Profile
 
 
Posted: 25 April 2005 01:31 PM   [ Ignore ]   [ # 22 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1401
Joined  01-15-2005

I vote for this topic as topic of the year!

=)

 Signature 

EE Duration Tags | {view_count_total}

Profile
 
 
Posted: 25 April 2005 01:41 PM   [ Ignore ]   [ # 23 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11758
Joined  04-29-2002

As a security precaution, you could hard code the status to be something like “Pending” or “Edited” or whatever status you want.

If the editor is a superadmin, you could add Open and Close to the list. smile

You’d need to add additional statuses to your Status Group and allow your Member group to access them.

It’s the same sort of thing you can do to the SAEF (standalone entry form).

It would be the same security concerns for that form. The only difference is that you’re pulling in the current values for an existing entry instead of adding a new entry.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 25 April 2005 02:51 PM   [ Ignore ]   [ # 24 ]  
Lab Assistant
RankRank
Total Posts:  295
Joined  01-30-2003

Hey! Glad you guys are going to town on this plugin. Here’s the reasoning on security.

Of course we all know that a plugin is not considered secure until pMachine approves it. This one has not yet been approved nor has it yet been submitted for approval.

The plugin itself doesn’t place anything in the database. It only retrieves from the DB. So the security concern is about using the stand-alone entry form as an edit form. It’s possible to call an entry that does not belong to you into the form. If you consider this a security risk, then you can wrap this conditional around your entry_form tag pair:
{if author == username}{/if}
I haven’t tested it, but it should work to prevent someone from editing an entry that is not theirs.
Otherwise, the edit form is just as secure as the entry form supplied by pMachine. It is the same form afterall.

Thanks again for checking it out.

mk

Profile
 
 
Posted: 25 April 2005 02:54 PM   [ Ignore ]   [ # 25 ]  
Lab Assistant
RankRank
Total Posts:  238
Joined  12-06-2002

Solspace, that’s good feedback. I’m happy to go with that, and the ownership tags make good sense.

You’re gonna make a lot of people happy with this plugin.

Profile
 
 
Posted: 25 April 2005 03:07 PM   [ Ignore ]   [ # 26 ]  
Lab Assistant
RankRank
Total Posts:  295
Joined  01-30-2003

Thanks for helping out Simon. Make sure you let me know if you have any trouble with the rascal. mk

Profile
 
 
Posted: 25 April 2005 04:32 PM   [ Ignore ]   [ # 27 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32150
Joined  05-14-2004

Uh, is that a plugin tag?  Cos that conditional isn’t a general conditional that’ll work….

 Signature 
Profile
MSG
 
 
Posted: 25 April 2005 05:39 PM   [ Ignore ]   [ # 28 ]  
Lab Assistant
RankRank
Total Posts:  295
Joined  01-30-2003

Thanks LisaJill. Always test. Murphy says so.

v1.1 is ready now. It contains a way to determine if the current member is the author of the entry. You can show a message if the member is not the author.
Good stuff folks. Thanks all.

www.solspace.com/software

mk

Profile
 
 
Posted: 25 April 2005 05:43 PM   [ Ignore ]   [ # 29 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32150
Joined  05-14-2004

I don’t suppose you’d separate that into a separate plugin? I requested one awhile ago and no-one liked me enough to make it…. wink

 Signature 
Profile
MSG
 
 
Posted: 25 April 2005 06:00 PM   [ Ignore ]   [ # 30 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11758
Joined  04-29-2002

LisaJill, what do you need a standalone plugin to do? The function that comes with the plugin is basically checking for the session member_id matching the author_id in exp_weblog_titles.

If your intention is to allow users to edit their own articles, you could use the whole plugin to do so.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 25 April 2005 06:11 PM   [ Ignore ]   [ # 31 ]  
Lab Assistant
RankRank
Total Posts:  238
Joined  12-06-2002

Solspace, that is brilliant. Just tested it with another login. Works perfectly. Quick work!

Sue, Lisa: So, inside weblog:entries tags elsewhere, the new ownership tags can be used to only show an edit link if you are the author? For example, in an Archive list, only your own entries would have an edit link to the SA Edit form?

{exp:weblog:entries weblog="weblog1"}
{exp
:form_helper:member_is_author author_id="{author_id}"}
{title}
| <a href="{title_permalink="weblog/edit_page"}">Edit this article</a>
{/exp:form_helper:member_is_author}
{
/exp:weblog:entries}

I imagine that’s right (too late to think about it). Top stuff.

Profile
 
 
Posted: 25 April 2005 06:13 PM   [ Ignore ]   [ # 32 ]  
Lab Assistant
RankRank
Total Posts:  295
Joined  01-30-2003

LisaJill,

Solspace sells Guinsu knives too you know. Sounds like you need the handy dandy “helper” plugin. It’s the Solspace swiss army knife. But it’s a mofo to document. Wanna stab at it? Need anymore blade metaphors? Sue’s rapier wit maybe?

mk

Profile
 
 
Posted: 25 April 2005 06:20 PM   [ Ignore ]   [ # 33 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32150
Joined  05-14-2004

hrm?  I just need a way to compare the author to the currently logged in user.  All your stuff deals with forms, I don’t need anything that complicated. =+)

 Signature 
Profile
MSG
 
 
Posted: 25 April 2005 06:20 PM   [ Ignore ]   [ # 34 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32150
Joined  05-14-2004

Bleh, so much complication for one function.  Ok, thanks Simon. =)

 Signature 
Profile
MSG
 
 
Posted: 25 April 2005 09:20 PM   [ Ignore ]   [ # 35 ]  
Research Assistant
RankRankRank
Total Posts:  754
Joined  05-15-2004

I look forward to trying these out. Is it possible to make the stand-alone editor work with one of the WYSIWYG editors?

 Signature 

http://www.FlavorZoom.com

Profile
 
 
Posted: 26 April 2005 02:08 AM   [ Ignore ]   [ # 36 ]  
Research Assistant
RankRankRank
Total Posts:  754
Joined  05-15-2004

I’ve copied the code from the sample_edit_form.php, into the body section of a template. I then changed

{exp:form_helper:member_is_author author_id=”{author_id}”}

to

{exp:form_helper:member_is_author author_id=“1”}

Is there anything else I need to change (and was that change correct) to conform the sample code to my site? (Currently I get a blank screen when I browse it.) Thanks in advance for the info.

 Signature 

http://www.FlavorZoom.com

Profile
 
 
   
2 of 11
2
 
‹‹ empty new blog      MoBlog Auto Check? ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 62691 Total Logged-in Users: 25
Total Topics: 77272 Total Anonymous Users: 15
Total Replies: 417105 Total Guests: 164
Total Posts: 494377    
Members ( View Memberlist )