Skip to content

Instantly share code, notes, and snippets.

<!-- Not displaying $root -->
<xsl:template match="page" mode="url">
<xsl:apply-templates select="parent::page" mode="url"/>
<xsl:value-of select="concat(@handle,'/')"/>
</xsl:template>
@michael-e
michael-e / AddExtension.sh
Created December 15, 2011 16:44
Use Symphony and Extensions as subtrees in your own project git repository.
#!/usr/bin/env bash
DEFAULT_BRANCH="master"
. .symbuilder
extensions=$webroot"/extensions/"
if [ $# -eq 1 ]
then
# get a name for new project from command line arguments
extension_name="$1"
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<link rel="stylesheet" href="workspace/assets/style.css"/>
</head>
<body>
<div id="head">
<h1>Title</h1>
</div>
<div id="package">
@michael-e
michael-e / Example
Created April 7, 2012 18:39 — forked from designermonkey/Example
Wildcard Subdomains
# Define specified subdomains first
<VirtualHost *:80>
ServerName subdomain.domain.com
DocumentRoot "/path/to/domain.com/subdomains/subdomain"
</VirtualHost>
# Define domain and wildcard subdomains second
<VirtualHost *:80>
ServerName domain.com
DocumentRoot "/path/to/domain.com/httpdocs"
@michael-e
michael-e / gist:2352730
Created April 10, 2012 16:41 — forked from panicsteve/gist:1641705
Form letter template for acquired startups
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
/*-------------------------------------------------------------------------
Role Manager: (replace in members/extension.driver.php when using Abffilter)
-------------------------------------------------------------------------*/
public function checkFrontendPagePermissions($context) {
$isLoggedIn = false;
$errors = array();
// Checks $_REQUEST to see if a Member Action has been requested,
// member-action['login'] and member-action['logout']/?member-action=logout
server {
listen 80;
server_name localhost;
access_log /path/to/log/access.log;
error_log /path/to/log/error.log;
location / {
root /path/to/root;
index index.php;
<?php
require_once(EXTENSIONS . '/remote_datasource/data-sources/datasource.remote.php');
Class datasourcetwitter extends RemoteDatasource {
public $dsParamROOTELEMENT = 'twitter';
public $dsParamURL = 'https://api.twitter.com/1.1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=ACCOUNT_NAME&count=10';
public $dsParamFORMAT = 'json';
public $dsParamXPATH = '/';
@michael-e
michael-e / event.event1.php
Created October 29, 2018 11:48 — forked from wdebusschere/event.event1.php
Custom event1
<?php
class eventevent1 extends SectionEvent
{
public $ROOTELEMENT = 'event1';
public $eParamFILTERS = array(
);
public static function about()