From nart.villeneuve at gmail.com Fri Jul 25 19:52:28 2008 From: nart.villeneuve at gmail.com (Nart Villeneuve) Date: Fri, 25 Jul 2008 14:52:28 -0400 Subject: [Petition-Developers] Thanks and a few mods (diff attached) Message-ID: <5cbd3e050807251152g529f00e9lf0e8aefde5ca54c2@mail.gmail.com> Hi All, Thanks for a great wp plugin. I have made a few modifications and thought I'd pass them along, some may be keepers, some not. - Only display signatures (and comments if enabled) if petition_maximum is greater than 0, else, simply display signature count. - created a `keep_private` field in the DB (petition_signatures) and in the form the users see, so that users can opt to keep their name off the website, but when you export from admin to submit somewhere the names will be there (e.g. if submitting to an MP or something). - If present, display the custom fields along with the name (and comments). (For e.g. if you added city/province fields the signatories would display: Name, City, Province. See the diff for details. It seems to work for me, but I have not thoroughly tested it yet. Thanks. Nart -------------- next part -------------- An HTML attachment was scrubbed... URL: http://freecharity.org.uk/pipermail/petition-devel/attachments/20080725/70fab1cb/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: fcpetition.diff Type: application/octet-stream Size: 4505 bytes Desc: not available Url : http://freecharity.org.uk/pipermail/petition-devel/attachments/20080725/70fab1cb/attachment.obj From james at freecharity.org.uk Fri Jul 25 20:41:40 2008 From: james at freecharity.org.uk (James Davis) Date: Fri, 25 Jul 2008 20:41:40 +0100 Subject: [Petition-Developers] Thanks and a few mods (diff attached) In-Reply-To: <5cbd3e050807251152g529f00e9lf0e8aefde5ca54c2@mail.gmail.com> References: <5cbd3e050807251152g529f00e9lf0e8aefde5ca54c2@mail.gmail.com> Message-ID: <8CC8814F-D93E-4C20-BE4F-F35F54C432BE@freecharity.org.uk> On 25 Jul 2008, at 19:52, Nart Villeneuve wrote: > I have made a few modifications and thought I'd pass them along, > some may be keepers, some not. They seem good to me and I've committed the changes to the development code. Giving the option to hide details from the publicly printed information seems like a good idea. Do you think it'd be a good idea if we had in fcpetition_form() ... $keep_private = $wpdb->escape($_POST['petition_keep_private']); if(!$keep_private) $keep_private = "no"; ... That way, if someone wishes to disable the functionality, they only need remove the checkbox element from the form? James