Skip to content

Instantly share code, notes, and snippets.

View larscwallin's full-sized avatar

Lars Wallin larscwallin

View GitHub Profile
@larscwallin
larscwallin / README.txt
Created September 14, 2011 14:02
simplx.controller, now with url routing
SIMPLX Controller V0.7
UPDATE 111109
NEW FEATURES:
- Added a whole bunch of modResource fields to the Request object. This means that you can route on stuff like:
pagetitle
template
@cowboy
cowboy / ba-backbone-module.js
Created September 9, 2011 18:05
Idea for a Backbone module system (allowing modules to be accessed across multiple files, possibly loaded out of order). Inspired by https://gist.github.com/1202511
/*!
* Backbone Module Manager - v0.1pre - 9/9/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
function ModuleManager(fn) {
@larscwallin
larscwallin / result.js
Created September 8, 2011 09:49
XPDO to simple ExtJS 3 Stores
var SimplxStudio = {};
SimplxStudio.modx = {};
/* Creating JSON representation for modAccess */
SimplxStudio.modx.modAccess={
"class": "modAccess",
"extends":"xPDOSimpleObject",
"fields": [
"id","alias","target","principal_class","principal","authority","policy"
@larscwallin
larscwallin / simplx.http.php
Created September 7, 2011 08:40
simplx.http
<?php
interface ISimplxHTTPProxy{
public function setBaseURL($url);
public function setServiceURI($uri);
public function login($usn,$psw);
public function logout();
public function get($res,$data);
public function post($res,$data);
public function patch($res,$data);
public function put($res,$data);
@larscwallin
larscwallin / simplx.http.php
Created August 26, 2011 15:31
SimplxRESTClient
<?php
interface ISimplxRestProxy{
public function setServiceURI($uri);
public function login($usn,$psw);
public function logout();
public function get($res,$data);
public function post($res,$data);
public function patch($res,$data);
public function put($res,$data);
public function delete($res,$data);
@larscwallin
larscwallin / result.html
Created August 25, 2011 08:24
XPDO2HTML XSLT Script
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<html>
<head/>
<body class="xPDOObject" data-package="modx">
<form class="modAccess" name="modAccess">
<input type="hidden" name="class" value="modAccess"/>
<input type="hidden" name="extends" value="xPDOSimpleObject"/>
<input type="hidden" name="id" value=""/>
<fieldset>
<legend>modAccess</legend>
@larscwallin
larscwallin / nusoap.php
Created August 4, 2011 12:30
NuSOAP for PHP 5.3
<?php
/*
$Id: nusoap.php,v 1.114 2007/11/06 15:17:46 snichol Exp $
NuSOAP - Web Services Toolkit for PHP
Copyright (c) 2002 NuSphere Corporation
This library is free software; you can redistribute it and/or
@larscwallin
larscwallin / simplx_propertySet.php
Created August 2, 2011 20:24
simplx_template_2_2
<?php
global $modx;
if(!class_exists('simplx_propertyset')){
class simplx_propertyset{
public static $initialized = false;
public static $currentPs;
public static $defaultPs;
private static $propertySetList;
<?php
$simplx_debugger_js = $modx->getChunk('simplx.debugger.js');
$simplx_rpc_js = $modx->getChunk('simplx.jsonrpc.js');
$modx->regClientStartupHTMLBlock($simplx_rpc_js);
$modx->regClientStartupHTMLBlock($simplx_debugger_js);
@larscwallin
larscwallin / simplx_propertyset.php
Created June 19, 2011 13:31
SIMPLX propertySet
<?php
global $modx;
if(!class_exists('simplx_propertyset')){
class simplx_propertyset{
public static $initialized = false;
public static $currentPs;
public static $defaultPs;
private static $propertySetList;