Skip to content

Instantly share code, notes, and snippets.

<data>
<angel-for-a-day>
<section id="18" handle="angel-for-a-day">Angel For a Day</section>
<entry id="185">
<anon>Yes</anon>
<title handle="rthhfdghdf">rthhfdghdf</title>
<dates>
<date timeline="1" type="exact">
<start iso="2017-07-06T00:00:00+01:00" timestamp="1499295600" time="00:00" weekday="4" offset="+0100">2017-07-06</start>
</date>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>!DOCTYPE html<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[
<!--[if lt IE 7 ]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<data>
<page-navigation>
<section id="1" handle="pages">Pages</section>
<entry id="5398">
<title-en handle="exhibitor-registration">Exhibitor Registration</title-en>
<title-cy handle="cofrestru-arddangoswr">Cofrestru Arddangoswr</title-cy>
<slug handle="exhibitor-registration">exhibitor-registration</slug>
<page>
<page handle="exhibitor-registration" id="92" parent-id="9">Exhibitor Registration</page>
</page>
<data>
<hello>paste your xml here</hello>
<p>Image.jpg</p>
<p>This is some text I don't want to convert .jpg</p>
</data>
<data>
<entry>
<caption mode="formatted">
<p>A fairly long looking <a href="http://www.stackoverflow.com">caption with a link</a> that goes to an external site.</p>
</caption>
</entry>
<entry>
<caption mode="unformatted">
<![CDATA[A fairly long looking <a href="http://www.stackoverflow.com">caption with a link</a> that goes to an external site.]]>
</caption>
<data>
<navigation>
<section id="1" handle="pages">Pages</section>
<entry id="1">
<title mode="formatted" word-count="1">Home</title>
<url-handle mode="formatted" handle="home" word-count="1">home</url-handle>
</entry>
<entry id="2">
<title mode="formatted" word-count="2">Sample Page</title>
<url-handle mode="formatted" handle="sample-page" word-count="1">sample-page</url-handle>
<data>
<params>
<workspace>http://192.168.1.4/symphony/workspace</workspace>
</params>
<images>
<section id="4" handle="images">Images</section>
<entry id="42">
<image-title handle="preview">Preview</image-title>
<image size="50 KB" path="/images/projektai" type="image/jpeg">
<filename>beute-beispielfoto-gruppe.jpg</filename>
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;
<?php
class A {
private $foo="a";
protected $bar="a";
function getAstuff() {
return $this->foo.'/'.$this->bar;
}
}
@andrewminton
andrewminton / EventTutorial.md
Created December 4, 2012 18:35 — forked from brendo/EventTutorial.md
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