####### TODO: Install phpmyadmin
add to /etc/apt/sources.list:
# Testing repository - main, contrib and non-free branches
| <?php | |
| /** | |
| * A custom FormIt hook for CSRF Protection | |
| * | |
| * Usage: | |
| * Append this Plugin as PreHook and Hook | |
| * | |
| * [[!FormIt? | |
| * &preHooks=`FormItCSRF` | |
| * &hooks=`spam,FormItCSRF,email` |
| // Event: OnManagerPageBeforeRender | |
| $script = "<script> | |
| DirectoryTreeHandleDrop = MODx.tree.Directory.prototype._handleDrop; | |
| Ext.override(MODx.tree.Directory, { | |
| _handleDrop:function(e){ | |
| var dropNode = e.dropNode; | |
| var targetParent = e.target; | |
| if(dropNode.hasChildNodes()) return false; | |
| return DirectoryTreeHandleDrop(e); |
| <?php | |
| // just for specific template | |
| if($resource->get('template') != '3') return true; | |
| $modx->regClientStartupScript('http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true'); | |
| $modx->regClientStartupScript('<script type="text/javascript"> | |
| Ext.onReady(function() { | |
| var input = document.getElementById("tv10"); | |
| var options = { | |
| types: ["(cities)"], |
| //<?php | |
| /** | |
| * SEO Strict URLs | |
| * | |
| * Enforces the use of strict URLs to prevent duplicate content. | |
| * | |
| * @category plugin | |
| * @version 1.0.1P2 | |
| * @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) | |
| * @author Jeremy Luebke, Phize |
| // Event: OnManagerPageBeforeRender | |
| $script = "<script> | |
| var ResourceTreeHandleDrop = MODx.tree.Resource.prototype._handleDrop; | |
| Ext.override(MODx.tree.Resource, { | |
| _handleDrop:function(e){ | |
| var dropNode = e.dropNode; | |
| var targetParent = e.target; | |
| if(dropNode.getDepth() != targetParent.getDepth() || (e.point == 'append')) return false; | |
| if(dropNode.parentNode.id != targetParent.parentNode.id) return false; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |