Skip to content

Instantly share code, notes, and snippets.

@brendo
brendo / patch.sql
Created July 5, 2014 12:38
Symphony 2.4 default workspace zip hotfix
ALTER TABLE `tbl_fields_date` CHANGE `pre_populate` `pre_populate` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL;
// Original
PayPal\Core\PPHttpConnection: Connecting to https://api.sandbox.paypal.com/v1/payments/payment/PAY-3R545450RU530944LKNVWV3I
PayPal\Core\PPHttpConnection: Payload
PayPal\Core\PPHttpConnection: Adding header Content-Type: application/json
PayPal\Core\PPHttpConnection: Adding header User-Agent: PayPalSDK/rest-sdk-php 0.6.0 (lang=PHP;v=5.5.12;bit=64;os=Darwin_13.1.0;machine=x86_64;openssl=0.9.8y;curl=7.30.0)
PayPal\Core\PPHttpConnection: Adding header Authorization: Bearer rHgQ9VP9mNc-c8l5LpibstMVNKd4dkBUa2FW1K-bD.Y
PayPal\Transport\PPRestCall: {"id":"PAY-3R545450RU530944LKNVWV3I","create_time":"2014-05-08T11:30:53Z","update_time":"2014-05-08T11:30:53Z","state":"created","intent":"sale","payer":{"payment_method":"paypal","payer_info":{"shipping_address":{}}},"transactions":[{"amount":{"total":"64.95","currency":"AUD","details":{"subtotal":"64.95"}},"description":"Test: Superb Clean","item_list":{"items":[{"name":"2 Bedroom 1 Bathroom Mini Deluxe: Vacuum all carpets Mop and clean all floors Thoroughly
@brendo
brendo / SymphonyArchitecture.md
Created April 13, 2014 06:12
Symphony Architecture

Symphony

Symphony's architecture was first concieved back in the 2000's and it's now starting to show it's age. While the architecture works, and works quite well for simple sites, and those that don't need heavy integration, it starts to have obvious flaws and gaps when trying to use it in a more modern way.

Back in 2009, cloud hosting was in it's infancy, PHP frameworks were few and far between and PHP itself was not as powerful and natural as it is today.

It's time to rethink the architecture, and think about how it should be in 2014.

Flaws

@brendo
brendo / package.sh
Created March 28, 2014 23:51
Symphony Build Script
#!/bin/bash
DOZIP=false
DODELETE=false
DODOCS=false
while getopts "v:zrd" opt; do
case $opt in
v)
VERSION=$OPTARG

It doesn't take very much to get Symphony running on your server, and most commercial hosts easily meet the minimum requirements:

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent
Optional Server Capabilities

The following are not required to run Symphony, but will help you take advantage of some of the system's more advanced features. Both are fairly widely supported, so chances are your server is already good to go.

MIME-Version: 1.0
Sender: me@bloodbone.ws
Received: by 10.217.106.134 with HTTP; Tue, 24 Sep 2013 02:47:04 -0700 (PDT)
X-Originating-IP: [124.170.95.210]
Date: Tue, 24 Sep 2013 19:47:04 +1000
Delivered-To: me@bloodbone.ws
X-Google-Sender-Auth: 8OEwJV8864KznHrqgw4LS4aZAS0
Message-ID: <CAEv1pw8Ef8q3OjS76Hyi4gE5BYZ6quaq87U7NUGsekqO_d_Rtg@mail.gmail.com>
Subject:
<!DOCTYPE html>
<html>
<head>
<title>Virgin Australia - Flight Status Clock</title>
</head>
<body>
<header>
<form>
<h2>Flights landing at </h2>
<select>
@brendo
brendo / class.mysql.php
Last active December 16, 2015 13:19
Improved Symphony MySQL Driver - Uses `mysqli` instead of `mysql`. - Supports a `master`, `slave` setup where the master accepts all writes, and the slaves processes reads To use, add an additional section to your config, `database_slave` which has the same details as `database`.
<?php
/**
* @package toolkit
*/
/**
* The DatabaseException class extends a normal Exception to add in
* debugging information when a SQL query fails such as the internal
* database error code and message in additional to the usual
/*
* Import Driver for type: DateTime
*/
require_once(__DIR__ . '/ImportDriver_default.php');
class ImportDriver_datetime extends ImportDriver_default {
/**
* Constructor

Symphony 2.3.3 Release Notes

Final (July 12th)

  • Update jQuery to 2.0.3
  • Add removeFromHeadByPosition() and Head() functions to the HTMLPage class (@brendo)
  • Remove all images from Symphony's assets. Replace with Data URI's and CSS (@brendo)

Release Candidate 3 (July 1st)