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 | |
$properties = array_merge($customObj->toArray(),$profile->toArray(),$user->toArray()); | |
$output = $modx->getChunk('MyChunk',$properties); |
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 ($object->xpdo) { | |
$modx =& $object->xpdo; | |
switch ($options[xPDOTransport::PACKAGE_ACTION]) { | |
case xPDOTransport::ACTION_INSTALL: | |
break; | |
case xPDOTransport::ACTION_UPGRADE: | |
break; | |
case xPDOTransport::ACTION_UNINSTALL: | |
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 | |
if (!$modx->user->hasSessionContext($modx->context->get('key')) return ''; | |
$userArray = $modx->user->toArray(); | |
$profile = $modx->user->getOne('Profile'); | |
if ($profile) { | |
$userArray = array_merge($profile->toArray(),$userArray); | |
$extended = $profile->get('extended'); | |
if (!empty($extended) && is_array($extended)) { |
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 | |
/** | |
* @var modX $modx | |
* @var modTemplateVar $this | |
* @var array $params | |
* | |
* @package modx | |
* @subpackage processors.element.tv.renders.mgr.input | |
*/ | |
$modx->lexicon->load('tv_widget'); |
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
<li>[[+username]]</li> |
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
Examples of above script: | |
# into a standard directory, where config.xml resides in the current working directory | |
sh install.sh /home/modx/public_html/ | |
# with a custom config.xml file | |
sh install.sh /home/modx/public_html/ /opt/local/modx/config.xml |
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 | |
$id = $modx->getOption('id',$scriptProperties,$modx->resource->get('id')); | |
$pageTitle = ''; | |
$resource = $modx->getObject('modResource',$id); | |
if ($resource) { | |
$pageTitle = $resource->get('pagetitle'); | |
} | |
return $pageTitle; |
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 | |
class modActionCreateProcessor extends modProcessor { | |
/** @var modAction $action */ | |
public $action; | |
public function checkPermissions() { | |
return $this->modx->hasPermission('actions'); | |
} | |
public function getLanguageTopics() { | |
return array('action','menu','namespace'); |
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 | |
/** | |
* Gets a list of database tables | |
* | |
* @package modx | |
* @subpackage processors.system.databasetable | |
*/ | |
class modDatabaseTableGetListProcessor extends modDriverSpecificProcessor { | |
public function checkPermissions() { | |
return $this->modx->hasPermission('database'); |
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 | |
require_once (dirname(__FILE__) . '/update.class.php'); | |
/** | |
* Update a setting from a grid | |
* | |
* @param string $key The key of the setting | |
* @param string $oldkey The old key of the setting | |
* @param string $value The value of the setting | |
* @param string $area The area for the setting |