Skip to content

Instantly share code, notes, and snippets.

View designermonkey's full-sized avatar

John Porter designermonkey

View GitHub Profile
@designermonkey
designermonkey / gist:6463775
Created September 6, 2013 13:26
Symphony logged in author DS
<?php
require_once(TOOLKIT . '/class.datasource.php');
Class datasourcelogged_in_author extends Datasource{
public $dsParamROOTELEMENT = 'logged-in-author';
public $dsParamORDER = 'desc';
public $dsParamREDIRECTONEMPTY = 'no';
public $dsParamSORT = 'id';
<?xml version="1.0" encoding="UTF-8"?>
<data>
<events>
<event>
<title>Recurring Exciting Event</title>
<date>2012-01-01</date>
<end-date>2014-12-31</end-date>
<recurring>yes</recurring>
<recurring-number>2</recurring-number>
<recurring-type>weeks</recurring-type>
@designermonkey
designermonkey / somefile.conf
Created May 28, 2013 13:42
Set http auth per domain: Apache 2.2
# Check for the hostname here
SetEnvIfNoCase HOST ^(www\.)?website\.co\.uk$ PROTECTED_HOST
<Directory /path/to/htdocs>
AuthType Basic
AuthName "Authentication"
AuthUserFile /path/to/.htpasswd
Order Deny,Allow
Satisfy any
Deny from all
@designermonkey
designermonkey / authors.php
Last active December 17, 2015 17:29
Symphony CMS table schemas in Laravel format. I don't expect these all to be used, but they are here for a starting point.
<?php
/**
* Authors Table
*
* Removed some 'default null' statements for some columns as they will always contain values
* Renamed `user_type` to `author_type`
* Removed `enum` for types in place of `id` link to `author_types` table
*/
Schema::create('authors', function($table)
@designermonkey
designermonkey / next_proposal.md
Last active December 16, 2015 04:58
Draft proposal for the Symphony Next project.
  • Draft Number: 1
  • Date: 2013-04-14
  • Author: John Porter @designermonkey

Symphony Next

This is all still a little new to me, so forgive me if this sounds naive, or you all have already thought about this and it's obvious, but I've been thinking about how we actually build Next. (I like this as a project codename).

Proposing the Application

@designermonkey
designermonkey / event_system_updates.md
Created March 26, 2013 00:55
Suggestions and ideas for Symphony CMS Events API
Symphony CMS

Event System Updates

Here are some ideas to upgrade the events system in Symphony.

Event Codes

Error codes, following a similar syntax to HTTP Errors, would allow some great control of what will be displayed to the user upon success or failure of the event. These base error codes should be provided by the base Event class as constants, providing

<?xml version="1.0" encoding="UTF-8"?>
<data>
<site-basket-contents>
<group id="basket">
<item id="261" count="1">
<item id="price">135.00</item>
<item id="shipping">9.50</item>
</item>
<item id="57" count="1">
<item id="price">58.50</item>
<?xml version="1.0" encoding="UTF-8"?>
<data>
<products>
<entry id="1">
<name>Test</name>
<public-price>10.00</public-price>
<trade-price>8.00</trade-price>
</entry>
<entry id="2">
<name>Test</name>
<data>
<store-product-offers>
<section id="14" handle="special-offers">Special Offers</section>
<entry id="127">
<product>
<item id="68" handle="br1-a-line-petticoat" section-handle="products" section-name="Products">BR1 (A-line petticoat)</item>
</product>
<country>
<item id="14" handle="united-states" section-handle="countries" section-name="Countries">United States</item>
</country>
<data>
<products>
<entry>one</entry>
<entry>two</entry>
<entry>three</entry>
<entry>four</entry>
<entry>five</entry>
<entry>six</entry>
<entry>seven</entry>
<entry>eight</entry>