This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$output = ''; | |
$tElementClass = !empty($tElementClass) ? $tElementClass : 'modSnippet'; | |
$tStart = $modx->getMicroTime(); | |
if (!empty($tElement)) { | |
switch ($tElementClass) { | |
case 'modChunk': | |
$output = $modx->getChunk($tElement, $scriptProperties); | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EVAL return $modx->runSnippet('getAside'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$debug = $modx->getOption('debug', $scriptProperties, false); | |
if ($debug) { | |
$modx->setLogLevel(modX::LOG_LEVEL_DEBUG); | |
} | |
//new user object | |
$user = $modx->newObject('modUser'); | |
//get all form fields | |
$formFields = $hook->getValues(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PHP-like print_r() equivalent for JavaScript Object | |
* | |
* @author Faisalman <[email protected]> | |
* @license http://www.opensource.org/licenses/mit-license.php | |
* @link http://gist.github.com/879208 | |
*/ | |
var print_r = function (obj, t) { | |
// define tab spacing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($input == null) { return 'No relevant items found.'; } | |
$tpl = $modx->getOption('tpl',$scriptProperties,null); | |
if (($tpl === null) || (!$modx->getChunk($tpl))) { return 'No template found'; } | |
$ids = explode (',', $input); | |
foreach ($ids as $a => $key) { | |
$document = $modx->getObject('modResource', array( | |
'published' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Snippet "simplx_toplaceholders" | |
KISS Snippet which wraps the $modx equivalent, only adds the ability to use JSON input. | |
Example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (empty($file)) return ''; | |
$o = ''; | |
$modx->parser->processElementTags('',$file,true,true); | |
$file = str_replace(array( | |
'{core_path}', | |
'{base_path}', | |
'{assets_path}', | |
),array( | |
$modx->getOption('core_path'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Comprehensive List of Browser-Specific CSS Hacks | |
http://paulirish.com/2009/browser-specific-css-hacks/ | |
*/ | |
/***** Selector Hacks ******/ | |
/* IE6 and below */ | |
* html #uno { color: red } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
HTML Tidy Macro for Komodo Edit | |
Pipes tidy output through sed to convert space indentation to tabs (tidy doesn't support tab indentation). | |
Requires that tidy and sed be installed. | |
BSD License | |
*/ | |
komodo.assertMacroVersion(3); | |
if (komodo.view) { komodo.view.setFocus(); } |
OlderNewer