Skip to content

Instantly share code, notes, and snippets.

View larscwallin's full-sized avatar

Lars Wallin larscwallin

View GitHub Profile
@larscwallin
larscwallin / larscwallin.modsnippet.17.php
Created August 15, 2011 09:24
simplx.mygit.coupledgistid test
$test = $modx->runSnippet('simplx.mygit.snippet.saveasgist',array('objectid'=>17));
print json_encode($test);
@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_RPC_Example.html
Created August 4, 2011 12:28
SIMPLX RPC Snippet - Version 0.6.7
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> SIMPLX RPC </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<!--
Below i load all the nice jQuery scripts plus Doug Crockfords json2.js
@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_toplaceholders.php
Created June 23, 2011 08:47
MODx toPlaceholders wrapper
<?php
/*
Snippet "simplx_toplaceholders"
KISS Snippet which wraps the $modx equivalent, only adds the ability to use JSON input.
Example:
@larscwallin
larscwallin / jsonrpc.js
Created June 21, 2011 20:56
jsonrpc.js
(function() {
// private variables
var
/**
* @var {string} JSON-RPC server address
*/
apiUrl = '/api/json-rpc',
/**
* @var {string} API namespace
*/
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@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;
@larscwallin
larscwallin / visioncart.deleteorder.php
Created June 17, 2011 08:24
visioncart.deleteorder
<?php
if($useGetParam){
$orderId = $_GET[$getParamName];
if($orderId == ''){
return false;
}
}
if (!$orderId) {
$modx->log(modX::LOG_LEVEL_ERROR, 'Snippet Error: visioncart.deleteorder, parameter orderid missing.');