Skip to content

Instantly share code, notes, and snippets.

@brendo
brendo / symphony222.md
Created May 12, 2011 11:47
Symphony 2.2.2 Release Notes

Release Candidate 1

Improvements

  • #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 of entry_id rather than a single entry_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 the EmailGateway allowing variables to be accessed once they are set
  • Ongoing documentation tweaks
@brendo
brendo / symphonydelgates.md
Created May 10, 2011 10:52
DelegateExecutionOrder

Requesting {$root}/page-one/

  • FrontendInitialised
  • FrontendPrePageResolve
  • FrontendPageResolved
  • FrontendParamsResolve
  • FrontendProcessEvents
  • EventPreSaveFilter (for each Event executed)
  • EventPostSaveFilter (for each Event executed)
  • EventFinalSaveFilter (for each Event executed)
<?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';
@brendo
brendo / EventTutorial.md
Created April 4, 2011 11:06
Symphony Events: A Detailed Look

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 :)

Getting Started

The Scenario

Our client requires a form that allows a user to submit some details about their new car purchase. Th

@brendo
brendo / Symphony221.md
Created March 24, 2011 07:11
Symphony 2.2.1 Release Notes

Symphony 2.2.1 Final

Fixes

  • #617 Taglist styling issue
  • Run General::sanitize on Taglist values in the backend to prevent errors
  • Fix issue with General::array_to_xml and nested arrays
  • Fix Upload field when used as a Dynamic Option with Select Box fields
@brendo
brendo / export_extension_list.extensions.css
Created March 10, 2011 06:04
Extension Listing export
#overlay {
display: none;
width: 50%;
height: auto;
background: #FFF;
padding: 20px;
border: 1px solid #E6E6E5;
position: absolute;
top: 0;
z-index: 10;
@brendo
brendo / PDTasks.md
Created February 1, 2011 12:45
A never ending list of things I can do on my Personal Development time.

UC - Use Cases. CW - Collaborate with.

Watch & Learn

  • 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

Member: Password (Required)

  • Extends FieldInput (Text Input)
  • SHA1
  • Has a salt
  • Can have minimum strength/length

Member: Username

  • Extends FieldInput (Text Input)
@brendo
brendo / Symphony Developer Notes.md
Created January 9, 2011 06:06
A short note about `$this->_Parent`, `Administration::instance()`, `Frontend:instance` and the new `Symphony::Engine()`

Overview

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

@brendo
brendo / Extension: Meta Keys.md
Created September 4, 2010 02:33
Musings about a new Symphony extension

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.