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 | |
/** | |
* ========================= | |
* defaultTemplateByParentTv | |
* ========================= | |
* | |
* Plugin for modX Revolution | |
* Set default template for children of a ressource | |
* | |
* Author: |
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 | |
// Add RTE for introtext if richtext option is enabled for the resource | |
// check "OnDocFormRender" event | |
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() { | |
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext"); | |
});</script>'); |
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
/** | |
Usage (the label is required) | |
<input id="uid" type="checkbox" ... /><label for="uid">Label</label> | |
Produces styled checkboxes in IE9+, current Firefox and Chrome | |
Demo here: http://jsfiddle.net/7Fggq/ | |
@author Bryan Elliott <ook@codemonkeybryan.com> | |
*/ |
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> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
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
$modx->log(modX::LOG_LEVEL_ERROR, "{ } log"); |
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 | |
/* ActivateNotify Plugin | |
by Breezer | |
http://forums.modx.com/index.php?topic=53213.0%3Bwap2 | |
8/15/2010 7:12 pm est | |
*/ | |
if ($modx->event->name == 'OnUserActivate') { | |
// array of emails to send the notification |
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->event->name == 'OnManagerPageInit') { | |
$script = <<<SCRIPT | |
<script type="text/javascript"> | |
Ext.ComponentMgr.onAvailable('modx-panel-resource', function(){ | |
Ext.getCmp('modx-panel-resource').on('ready', function(){ | |
window.setTimeout(function(){Ext.getCmp('modx-panel-resource').markDirty()}, 250); | |
}) | |
}) | |
</script> |
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 |
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 '/absolute_path/config.core.php'; | |
require_once MODX_CORE_PATH.'model/modx.class.php'; | |
$modx = new modX(); | |
$modx->initialize('web'); | |
$modx->getService('error','error.modError'); | |
//To get Base Path | |
$basePath = $modx->config['base_path']; | |
// Prepare the data |
OlderNewer