Preview of Events Manager 5.5 – Dev Version Available!
Posted on July 18, 2013
This page is left as-is for posterity, but for an updated summary of what changed please refer to the official 5.5 release post.
Version 5.5 is
around the corner here with a few great new features along with some important improvements. These improvements are aimed at simplifying the overall foundation of the plugin which will make things easier to extend in a more standardized fashion.
It is inevitable that many of these improvements have required changes to our template files. We try not to modify these template files in order to make them more upgrade-safe, however it sometimes gets to a point where changes are necessary to push the plugin to new levels.
Update (2013-08-07) : We’ve been making some more changes and 126.96.36.199 was released after this article. This page has been updated with changes from 188.8.131.52 in this color.
Due to these changes, we’re going to hold off on releasing a stable version until
at least the 29th of July at least 12th of August in order to give people a chance to test out and migrate their own overridden templates. Whilst we’ve spent countless hours testing tons of settings combinations, we’d appreciate anyone willing to test this out and letting us know if they spot any problems on the forums (please make sure you let us know you’re using the dev version).
This post will also serve as a summary of what to expect, and may change during this grace period as we are still making changes to the core code.
New Features in 5.5
New Ticket Restriction Options and Admin User Interface
We’ve added some cool new restriction options to individual tickets, which include:
- Restriction of ticket availability to specific user roles
- Tickets can be restricted to only Guests (non-logged-in users)
- Tickets can now be made available between specific times within a day
- You can now put a cap on how many spaces can be made in a single booking
These three options provide a new slew of possibilities. Most notably, sites using Events Manager in combination with membership plugins like s2Member can now offer discounted ticket prices to members and further differentiate those prices by membership level!
Alongside these new features (and partially due to these new features), we’ve revamped part of the ticket creation interface to remove dependency on the jQuery UI dialog script that ships with WordPress, which sometimes created conflicts with other themes and plugins (even though in theory we should be allowed to make use of this library). Instead, we now use inline forms which will allow us and you to add more features to these ticket options if need be.
New Search Form
We’ve revamped the search form so that it now works for location searches, makes use of AJAX features, and comes with a fancy new style and layout! Here’s a sneak peak, which you can also check out on our demo site:
You can still configure the form to include/exclude fields as before, and even more in your settings page. If you still prefer the old style, or you have made customizations to the search forms in the past, we still provide backward compatibility.
Moreover, you can now use shortcodes and provide arguments to build your own custom form outside of the Events page which can also display results without skipping to the main events page!
GeoLocation : Search near a specific location
You’ll notice in the screenshot above that we now allow you to search near a specific location. We’ve added new search attributes near (coordinates), near_unit (km or mi) and near_distance (search radius) which you can use within your shortcode or template tags.
Alongside this capability, we’re making use of the excellent and free GeoNames services, which adds a handy little auto-completer to the search form above. You’ll need to create an account with them and enter your username in our new Settings > General > Geo API section. There is a limit of 30,000 requests per day, which should suffice for most people but on sites with lots of traffic you’ll be able to buy credits from GeoNames and have access to their premium webservice features.
We’ve decided to switch from GeoNames to Google, mostly because it did not require API keys or imposed limits which avoids the need for a proxy on your server and also produces significantly faster results. The result – super fast and super accurate auto-completion of search results. Test it out!
This is only the first step in Geo searching capabilities and the work done here has opened our eyes to lots of potential directions we can take with this. Therefore, we’re going to keep this feature in Beta for a while as it’ll probably change in various ways to provide more improvements and reliability with overall geo-searching.
You can now add the same search form above to your locations list page by visiting Settings > Pages > Location List/Archives and enabling the search form. Additionally, you can also add location search forms to your site by using shortcode [location_search_form]
AJAX searches and pagination!
Add this line to your wp-config.php file:
And power the search form and pagination with AJAX, preventing reloading of the whole page each time a search or page change is done! Additionally, you can enable ajax in individual event/location/category/tag lists or location/event search forms by supplying ajax=”1″ into the shortcode.
Custom Styling Flags
The search form is the first part of the plugin that’ll see a little styling love in the coming months. One of the great things about Events Manager is that it imposes minimal CSS rules and uses clean HTML structures to enable designers the possibility of easily overriding our styles as well as enabling the plugin to integrate with different theme style structures.
184.108.40.206 had some very minor changes that aren’t mentioned here as they won’t affect functionality in any way, the relevant/important ones are highlighted in this text color.
However, in many cases (especially for the CSS/HTML-challenged users among us) it’d be great to have a default style that prevents themes from adding unwanted padding and other rules that result in unsightly content.
Therefore, we’ve added various styling options that will add CSS classes to various elements on the website which we will eventually make use of to add some more styling. We’ll still strive to maintain a ‘minimalist’ approach so that the interface remains simple and clean, but hopefully will provide a more unified style.
We’re intending on adding some basic styles to:
- Event/Location admin pages
- Booking admin pages
- Events/Locations/Categories/Tags list pages
- Event booking forms
These styling option will be located in the Settings > General > Styling Options section, and whilst still don’t have associated CSS rules, they’re there so you know about it.
Improved Calendar Performance
Okay, so this isn’t really a feature, but it’s worth a quick mention. Users running hundreds and thousands of events per month will have noticed very sluggish calendars. We’ve made some significant improvements to the overall logic used to obtain information for that calendar month, and you should notice significant improvements when loading these pages and also switching from month to month.
Changes to Templates
We’ve taken as much care as possible to make these backwards compatible so if you don’t change your templates you shouldn’t experience any broken pages, although you’ll be missing out on our new features!
We hope that this won’t include more changes to the templates, we’ve held off on publishing a dev version until now so we had time to make those changes in one go.
Reduced to one line, which includes the em_bookings_admin() function
Now uses the function $EM_Ticket->is_displayable() to determine whether or not to show a ticket (which is takes the new ticket restrictions above into account).
Changed h4 titles into h3 titles, removed the code at the bottom of the file which includes the code for the ticket dialog box (which is now deprecated)
removed google map code and loading it from a template file, added classes to table rows
forms/event/bookings.php (major change)
- Converted bolded titles into h4 tags,
- added maximum spaces per booking option
- changed overall structure of multiple tickets to accommodate the new inline ticket editor
- fixed a potential XSS vulnerability
fixed minor php warning triggered under certain circumstances
Converted h4 titles into h3 titles, added class names to each section, added escaping/sanitization to various output
removed google map code and loading it from a template file, added classes to table rows
forms/ticket-form.php and forms/tickets-form.php
Both are now deprecated and load the file forms/event/bookings-ticket-form.php instead
Added optional class flag for future styling possibilities
Removed looping of events which prevent more than the maximum number of events per day to be listed, now displays all events in the day (which already contains the maximum number of events) and shows a more linked based on a count of events.
templates/events-search.php (major changes)
- restructured HTML
- individual search fields are now split up as individual templates in the templates/search folder
- display of fields controlled by arguments passed on to template via $args
- various fields into ‘advanced’ section which can be collapsed by default to save space
- added div with em-search-ajax class so if $arg[‘ajax’] is passed on results are loaded via AJAX without sending users to events page
- minor change between 220.127.116.11 and 18.104.22.168 – changed the new search button element to be IE7 compatible
These files have been drastically simplified so that they only contain 4 lines! These include $args filter for you to hook into, a wrapping div element (for our custom styling flags above), and the relevant output function such as EM_Events::output(). We’ll include events-list.php with it’s own section:
Aside from removing extra unnecessary code that should be handled by the core plugin and not templates, we’ve made some significant changes to this template. It now consists of 4 lines like the other list.php templates!
- removed the inclusion of the search form template (now included separately)
- overridden templates that include the search form the old way shouldn’t have a problem, we changed the name of the option which includes search forms and removed the old one.
- moved grouped event lists out of this template into the new templates/events-list-grouped.php template
moved div.em-locations-map-coords into the map container div.em-location-map-container
rewritten to accomodate the new Google autocompleter
Let us know what you think!
Drop us a line on the 5.5 release post. If you have problems with the new update or spot any bugs, please use our pro or free forums instead and mention you’re running the dev version so we can help you debug it.