This file contains hidden or 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 | |
/** | |
* An extension to modUser that allows Atlassian Crowd integration via SOAP. | |
* | |
* @todo Complete this class to handle all external user management tasks | |
* allowed with Crowd. | |
* | |
* @package modx | |
* @subpackage user.crowd | |
*/ |
This file contains hidden or 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 = $input; | |
$limit = intval($options) ? intval($options) : 100; | |
if (function_exists('mb_strlen')) { | |
if (mb_strlen($output, $encoding) > $limit) { | |
$output = mb_substr($output, 0, $limit, $encoding) . '…'; | |
} | |
} else if (strlen($output) > $limit) { | |
$output = substr($output, 0, $limit) . '…'; | |
} |
This file contains hidden or 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 = array(); | |
$total = 0; | |
$limit = isset($limit) ? (integer) $limit : 0; | |
$offset = isset($offset) ? (integer) $offset : 0; | |
$totalVar = !empty($totalVar) ? $totalVar : 'total'; | |
// determine the total number of records for your criteria | |
$totalStmt = $modx->query("SELECT COUNT(*) FROM `myTable` WHERE `food` = 'beer'"); |
This file contains hidden or 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 hidden or 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
[[!getPage? | |
&element=`getResourcesTag` | |
&elementClass=`modSnippet` | |
&tpl=`pitem_home` | |
&hideContainers=`1` | |
&pageVarKey=`page` | |
&parents=`[[*id]]` | |
&includeTVs=`1` | |
&includeContent=`1` | |
&pageFirstTpl=` ` |
This file contains hidden or 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
<div> | |
<ul> | |
[[!getCache? &element=`getResources` &elementClass=`modSnippet` &cache_expires=`1200` &parents=`0` &depth=`0` &limit=`2` &tpl=`ulTpl` &sortby=`RAND()`]] | |
</ul> | |
</div> |
This file contains hidden or 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 | |
include 'config.core.php'; | |
include MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->initialize('mgr'); | |
$modx->setLogLevel(modX::LOG_LEVEL_INFO); |
This file contains hidden or 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 | |
/* RemoteCommands plugin -- register with OnHandleRequest OR OnWebPageComplete event */ | |
/* define the IP of the master instance which does not need to execute remote commands */ | |
$master_instance = $modx->getOption('master_instance', $scriptProperties, '127.0.0.1'); | |
/* get the instance IP */ | |
$instance = $_SERVER['SERVER_ADDR']; | |
/* the number of seconds the remote command is valid for */ |
This file contains hidden or 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 | |
include 'config.core.php'; | |
include MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->initialize('web'); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->setLogLevel(xPDO::LOG_LEVEL_INFO); | |
$tstart = $modx->getMicroTime(); |
This file contains hidden or 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
# Add this before your MODX Friendly URLs RewriteCond's and RewriteRule... | |
RewriteCond /abs/path/to/docroot/statcache%{REQUEST_URI} -f | |
RewriteRule ^(.*)$ /statcache/$1 [L,QSA] |
OlderNewer