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 | |
/* | |
* OpenExpedio ("xPDO") is an ultra-light, PHP 5.2+ compatible ORB (Object- | |
* Relational Bridge) library based around PDO (http://php.net/pdo/). | |
* | |
* | |
* This plugin is part of xPDO. | |
* | |
* xPDO is free software; you can redistribute it and/or modify it under the | |
* terms of the GNU General Public License as published by the Free Software |
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
/** | |
* Excerpt | |
* | |
* Creates intro excerpts from long passages of text like a Ninja. | |
* | |
* @category snippet | |
* @version 1.0 | |
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) | |
* @autohor Kevin Marvin, Ryan Thrash | |
* @internal @modx_category Content |
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
$criteria = $modx->newQuery('modResource'); | |
$criteria->where(array( | |
'parent' => $modx->resource->get('id'), | |
'published' => 1, | |
'deleted' => 0, | |
)); | |
$criteria->sortby('pagetitle','ASC'); | |
$children = $modx->resource->getMany('Children',$criteria); | |
foreach($children as $var => $value) | |
{ |
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<html> | |
<head/> | |
<body class="xPDOObject" data-package="modx"> | |
<form class="modAccess" name="modAccess"> | |
<input type="hidden" name="class" value="modAccess"/> | |
<input type="hidden" name="extends" value="xPDOSimpleObject"/> | |
<input type="hidden" name="id" value=""/> | |
<fieldset> | |
<legend>modAccess</legend> |
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(dirname(__FILE__)).'/create.class.php'); | |
/** | |
* Create a snippet. | |
* | |
* @param string $name The name of the element | |
* @param string $snippet The code of the snippet. | |
* @param string $description (optional) A brief description. | |
* @param integer $category (optional) The category to assign to. Defaults to no | |
* category. |
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
/* | |
jquery.aggregate.js by Greg Brown 2011. See | |
http://gregbrown.co.nz/code/jquery-aggregate/ for details. | |
License information: http://gregbrown.co.nz/code/license/ | |
*/ | |
/* |
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 | |
set_time_limit(0); | |
class Timer { | |
public $timer = 0; | |
public function start() { | |
$mtime = microtime(); | |
$mtime = explode(" ", $mtime); | |
$mtime = $mtime[1] + $mtime[0]; | |
$this->timer = $mtime; |
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( !isset($modx) ) { | |
/*Test the realpath by just starting with /../ and keep adding till you get where you're going*/ | |
$modx_base_path = realpath(dirname(__FILE__) . '/../../../../../'); | |
define('MODX_BASE_PATH', $modx_base_path.'/' ); | |
$old_dir = getcwd(); | |
chdir(MODX_BASE_PATH); | |
require MODX_BASE_PATH . 'manager/includes/config.inc.php'; |
OlderNewer