- #706 - Previously when deleting a large number of entries using 'Delete Entries' which caused PHP to reach it's maximum memory usage, no entries would be deleted making it impossible to delete entries through the Symphony administration. Entry deletion is now processed in batches of 2500, so should the memory limit be hit, at least some of the entries will be deleted. The
entryDataCleanup
function also now supports an array ofentry_id
rather than a singleentry_id
- The
EventPreSaveFilter
now gets passed the$entry_id
when an Event is editing entries. This will be null on new entries - Sometimes '0' was interpreted as empty by the default
checkPostFieldData
implementation - Add
__get()
to theEmailGateway
allowing variables to be accessed once they are set - Ongoing documentation tweaks
<?php | |
require_once(TOOLKIT . '/class.event.php'); | |
require_once EXTENSIONS . '/xmlimporter/extension.driver.php'; | |
require_once EXTENSIONS . '/facebook_albums/extension.driver.php'; | |
require_once EXTENSIONS . '/facebook_albums/lib/class.json_to_xml.php'; | |
Class eventimport_facebook_albums extends Event{ | |
const ROOTELEMENT = 'import-facebook-albums'; |
Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.
This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)
Our client requires a form that allows a user to submit some details about their new car purchase. Th
#overlay { | |
display: none; | |
width: 50%; | |
height: auto; | |
background: #FFF; | |
padding: 20px; | |
border: 1px solid #E6E6E5; | |
position: absolute; | |
top: 0; | |
z-index: 10; |
UC - Use Cases. CW - Collaborate with.
- Watch the Think Vitamin videos
- Watch Paul Irish's "Things I've learnt from the jQuery source code"
- Learn to use SimpleTest, or any other Unit Testing library, that may help speed up Symphony development (CW: Rowan would probably have some ideas, or may have some experience in this already)
- Read about UX in general
- Read some Graffle tutorials to get more productive
The inner workings of the magical $this->_Parent
have always been a bit of an unknown to Symphony developers and therefore, several ways have cropped up of doing the same things. Starting with Symphony 2.2, there is now a recommendation of how extensions should correctly use this variable.
In the early Symphony 2 days, $this->_Parent
was used to manage a catalogue of all the available Managers and other objects such as Configuration
and Database
so extensions could use these instead of creating their own. Efforts were made in Symphony 2.0.6 to help cleanup this catalogue structure (which is memory intensive) by introducing static accessors to Symphony::Database()
and Symphony::Configuration()
. These allow extensions to reference these objects regardless of the instance Symphony is operating in (Frontend
or Administration
).
A typical Field extension works in both instances, functions such as displayPublishPanel
work in Administration
, others, such as `appendFormattedElement
A Meta Keys field allows you to add arbitrary pieces of information to entries identified by a user generated key. The interface resembles the section editor in that any number of keyed information could be added to an entry (interface possibly provided by the Stage extension).
The values would always be text (at least initially).
For instance, a Meta Keys field could be added to a Products
entry and then filled with this data:
- Colour: Red
- Size: 500ml
A datasource could then filter on the keys (in a yet to be determined syntax), eg. color=red
.