If you have ssh access to your machine, you can use this php script I wrote that includes everything you need to test your snippets before you paste them into modx. I wrote this test harnass after banging my head against the wall trying to get my homemade snippets to work!
<?php
$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond
set_include_path($incPath); // this now works, above code did not?
@set_magic_quotes_runtime(0);
include_once "quotes_stripper.inc.php";
if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2);
if (!defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0);
if (!defined("ENT_QUOTES")) define("ENT_QUOTES", 3);
if (!function_exists('html_entity_decode')) {
function html_entity_decode ($string, $opt = ENT_COMPAT) {
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
if ($opt & 1) {
$trans_tbl["'"] = "'";
}
if (!($opt & 2)) {
unset($trans_tbl["""]);
}
return strtr ($string, $trans_tbl);
}
}
include_once "config.inc.php";
include_once("document.parser.class.inc.php");
$modx = new DocumentParser;
$_lang = array();
include_once "lang/english.inc.php";
//begin test code here
?>