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
<?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 | |
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(); } |
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 | |
// First we require the xml2json file of course. | |
require_once($modx->getOption('core_path').'components/simplx/common/xml2json.php'); | |
// xml2json simply takes a String containing XML contents as input. | |
// Remember that the preprocessor always get a parameter called $dataSet | |
// containing the complete dataSet recieved from the dataSourceUrl or the | |
// dataSet Snippet parameter. |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title></title> |
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 | |
$mailto = (isset($mailto)) ? $mailto : '@@ DEFAULT EMAIL HERE @@'; | |
$warningMail = '@@ EMAIL TO SEND WARNING TO IN CASE OF A SMALL BACKUP FILE @@'; | |
include MODX_CORE_PATH.'/config/'.MODX_CONFIG_KEY.'.inc.php'; | |
$host = $database_server; // database host | |
$dbuser = $database_user; // database user name | |
$dbpswd = $database_password; // database password | |
$mysqldb = $dbase; // name of database |
OlderNewer