Skip to content

Instantly share code, notes, and snippets.

@brendo
brendo / prepareImportValue.md
Created April 11, 2012 14:03
Introducing the XML Importer's prepareImportValue function

Introducing the XML Importer's prepareImportValue function

The XML Importer extension is widely used to help users import XML content into their Symphony sections. Developers enter a URL that returns XML and then write XPath to map values to their corresponding fields, but sometimes this results in a field not receiving a value, an incorrect value, or the XML Importer failing to import anything.

While not always the case, sometimes the XPath could be wrong, namespaces weren't added or you've discovered a bug (log it, but it can also be because a Field doesn't know how take the value you've given it and save it. This short article will explain how you can ensure that your field is compatible with the XML Importer, thanks to the prepareImportValue function.

Why is it needed?

Fields in Symphony have two existing function's, checkPostFieldData and [processRawFieldData]

@DavidOliver
DavidOliver / event.save_order.php
Created July 10, 2012 13:58
Symphony CMS event to save a customer order
<?php
require_once(TOOLKIT . '/class.event.php');
Class eventsave_order extends Event{
const ROOTELEMENT = 'save-order';
public $eParamFILTERS = array(
'etm-new-order-notification'
@ijy
ijy / tutorial.md
Created October 4, 2012 12:26 — forked from liuwen-lvtu/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@domstubbs
domstubbs / ext.stash_breaker.php
Created November 23, 2012 09:11
Stash cache breaker extension for EE2 (See https://github.com/domstubbs/ee-stash-breaker for updates)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc.
* @license http://expressionengine.com/user_guide/license.html
* @link http://expressionengine.com
@jasonvarga
jasonvarga / gist:4617311
Created January 24, 2013 03:03
Product Page Model
{!-- Wrapper template --}
{stash:embed:layouts:product}
{!-- Custom field prefix --}
{preload_replace:cf="cf_product_"}
{exp:channel:entries
channel="products"
url_title="{segment_2}"
limit="1"
@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

@nils-werner
nils-werner / .bash_completion
Last active December 17, 2015 12:59
Autocompletion for Composer and Artisan
# Put this either in
#
# 1. a new file called ~/.bash_completion
# 2. your ~/.bashrc
#
_composer()
{
local cur=${COMP_WORDS[COMP_CWORD]}
local cmd=${COMP_WORDS[0]}
@n1k0
n1k0 / console-toggle.sublime-keymap
Created June 28, 2013 20:57
Toggle the Sublime Text console the same way you do with the Firefox devtools (⌘ + ⌥ + k)
[
{ "keys": ["command+alt+k"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
]
## Getting Started
* Introduction
* Installing & Updating
- Requirements
- Installing
- Updating
* Licensing
* CP Overview
* Packages & Plugins
// After making the required edits below, use something like http://daringfireball.net/2007/03/javascript_bookmarklet_builder to create the bookmarklet.
(function(){
var form=document.createElement("form");
// Edit the action value to match your domain and section names.
form.setAttribute("action","http://example.com/symphony/publish/entries/new/");
form.setAttribute("method","post");
// Edit the params to match your auth-token
// (found on the author page) and section fields.