Want to help? GitHub: https://github.com/bcoughlan/Hackerspace-event-manager
Events and Workshops are a big part of hackerspaces and community spaces. Unfortunately all existing solutions are inadequate, so we're going to make our own solution as part of the SpaceStack project.
The goal is to take the weight off managing events: letting members fill out forms for events, being able to edit and approve them and have them post to Google Calendar, Facebook, Twitter etc.
settingsBool will contain settings that allow user to disable each field and set certain fields as required. settingsText contains placeholder for full description (see “Admin: form settings” below).
If you are a member and want to work on one of these, then put your name in the table below.
|Person 1||Person 2|
|Client-side HTML form||Barry|
|Admin: form settings||Colm|
|Admin: editing and approving events|
|Facebook API integration|
|Google Calendar integration|
Task: Create a HTML form that shows the correct fields and adds an event to the database when submitted.
- DONE You can use this form as a starting point: 091 Labs events form (Need to be logged in to view).
- DONE Get the values from the settings table such as “showName” etc, and only show the fields that are visible.
- DONE Get all rows from the customFields table, and create textareas on the form with the title from the customFields table.
- DONE When the form is submitted, insert all of the data into the events and customFieldData tables. Be sure to protect against CSRF, XSS and SQL injection attacks (see slides for PHP workshop part 2).
- Create a HTML page that allows the user to change the settings in the settings and customFields tables, which allows them to turn off certain fields of the form, and set other fields as required fields. It can basically be a list of the default and custom fields, with 2 checkboxes beside each field (one for turning it off, the other for setting it as a required field).
- The admin should also be able to set a field for the full description. This can be stored in the fullDescription (settingsText table). The setting might look something like this:
Admission: Members - \[membersPrice], Students - [studentPrice], concessions - [concessionPrice]
These values will then be replaced with their respective values before the form is submitted.
- Allow the user to add custom fields to their form through the customFields table.
Notes: Don't worry about logins for now, as it will be integrated with Wordpress auth later on.
- A HTML page that lists all of the events in the database. Two tables should be shown, one for events that have been approved and one for events that are waiting approval. Each event should have an “Approve” button which updates the database
- When an event is clicked on, it should bring up a HTML form identical to the one in the “client-side HTML form” section, that would allow the admin to edit an event. Rather than re-writing the same code for the HTML form, see if it can be re-used.
- When an event is approved, it should be sent to the Facebook/Google/RSS code.
The Facebook API allows you to create events and post them to groups and pages.
See if you can take an event from the database and post it to a facebook group using that API. The event ID received from Facebook should be stored in the facebookID field in the events database, so that later on we can add code for editing approved events.
Working with the Google Calendar API we can post the approved events to Google Calendar.
The idea is to have two feeds, one that posts a digest of events that are happening every week, and the other feed for every time an event is added (so that we can post it to Twitter via TwitterFeed).
The http://feedcreator.org/ PHP class is used by Dokuwiki\'s RSS feed and could be very useful for this.