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
// Call the form with the unique xtype | |
items: [{ | |
xtype: 'campermgmt-newcamper-form-brandscombo', | |
fieldLabel: 'Merknaam', | |
name: 'brand', | |
id: 'brand', | |
allowBlank: false, | |
vtype: 'alphanum' | |
} | |
<...> |
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
<input id="tv{$tv->id}" name="tv{$tv->id}" | |
type="text" class="textfield" | |
value="{$tv->get('value')|escape}" | |
{$style} | |
tvtype="{$tv->type}" | |
/> | |
<select id="tv{$tv->id}" name="tv{$tv->id}"> | |
{foreach from=$tvitems item=item} | |
<option value="{$item.value}" {if $item.selected} selected="selected"{/if}>{$item.text}</option> |
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 | |
/** | |
* File viewRevoObjects.php (requires MODx Revolution 2.1) | |
* Created on: 9/17/11 at 9:49 AM | |
* Project shawn_wilkerson | |
* @elements | |
* @version 1.0 | |
* @category | |
* @author W. Shawn Wilkerson |
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 | |
/** | |
* @package = CreateXpdoClasses | |
* | |
* Create Xpdo Classes script | |
* | |
* This script creates xPDO-ready classes from existing custom | |
* database tables. It only needs to be run once. | |
* | |
* It assumes that your custom tables have been imported into |
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 | |
/** | |
* CercecUser | |
* | |
* @author Marc Elie <[email protected]> | |
* | |
* Event: OnUserFormSave | |
* | |
* Modified from Bob Ray's plugin tutorial, Official Guide p. 492-3 | |
* and Bob Ray's online explanation on create class: |
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 | |
$doodle = $modx->getService('doodles','Doodles',$modx->getOption('doodles.core_path',null,$modx->getOption('core_path').'components/doodles/').'model/doodles/'); | |
if (!($doodle instanceof Doodles)) { | |
$hook->addError('error_message','Unable to load doodle service.'); | |
return false; | |
}; | |
$newEntry = $modx->newObject('Doodle'); | |
$newEntry->fromArray($scriptProperties['fields']); |
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 | |
/*** GetTemplate ***/ | |
include MODX_CORE_PATH . 'custom/templates/' . $modx->resource->template . '.html'; | |
return; | |
/*** Include ***/ | |
$chunk = $modx->getOption('chunk', $scriptProperties, false); |
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 | |
if ($debug) { | |
$modx->setLogLevel(modx::LOG_LEVEL_DEBUG); | |
$mtime = microtime(); | |
$mtime = explode(" ", $mtime); | |
$mtime = $mtime[1] + $mtime[0]; | |
$tstart = $mtime; | |
} |
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
Snippet: [[SnippetName]] | |
Chunk: [[$ChunkName]] | |
System Setting: [[++SettingName]] | |
TV: [[*fieldName/TvName]] | |
Link tag: [[~PageId? ¶mName=`value`]] | |
Placeholder: [[+PlaceholderName]] | |
<?php |
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 | |
$docArray = $modx->getCollection('modResource'); | |
foreach($docArray as $doc) { | |
$doc->joinGroup('GroupName'); | |
} |