I would like to develop a plugin that lets people register for posts listed under a certain category (e.g., events). The requirements are as follows:
* registration data must be stored in the database; not as part of the post content.
* posts in the event category must append an html table of registered users.
* logged in users must have an option to add/remove themselves from the list.
Additional desired (but not required) features include:
* if current user is in registered list, highlight that row.
* if current user is not logged in, enable the “add” feature but re-direct to a login prompt.
* use cool (dhtml? ajax?) effects similar to administration screen for the add/remove functionality.
* prevent table from showing up in post excerpts (from main screen or searches).
I created a new database table, wp_event_registration with a primary key (id), and two foreign keys (post_id, user_id) referencing wp_posts and wp_users respectively. I understand that this should eventually be automatically generated by the plugin; however, for now, I created it manually.
My problem is in trying to understand the high level structure of which action & filter hooks I should be using. I *think* one approach would be to use a single “the_posts” filter; however, this seems excessively wasteful in the number of posts it will consider (keeping in mind that I only want to modify posts that are being viewed directly).
I have struggled with finding good documentation or plugins to use as references. Not because they aren’t out there, but because I’m not even quite sure what to search for. At the moment, I am using the EventCalendar3 plugin and the site http://wphooks.flatearth.org/ as references.
Recommendations on additional references would be appreciated. And, in the interest of proving the concept to my company before they give up on the idea, any recommendations on the structure of the plugin for my particular needs would be appreciated as well.
- The topic ‘Design Help For Event Registration Plugin’ is closed to new replies.