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 | |
/** | |
* MODX Revolution Backup script | |
* | |
* Useful for fast moving MODX Revolution from FTP (w/o SSH access) to local computer | |
*/ | |
$starttime = microtime(true); | |
// ini_set('max_execution_time', 300); |
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 | |
/** | |
* emailObfuscate output modifier for MODx | |
* Version: 1.0.0 | |
* | |
* based on ObfuscateEmail plugin 0.9.1 (Apr 15, 2007) by Aloysius Lim. | |
* released under Public Domain. | |
* http://modxcms.com/extras/package/?package=322 | |
* | |
* This modifier searches for all email addresses and "mailto:" strings in the |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<!-- | |
Updated for MODx Revo by: Hansek http://www.modxcms.cz/ [email protected] | |
Created for MODx Evo by : Coroico (http://modx.wangba.fr) | |
Short Description: Language files checking tool for MODx Revolution | |
Version: 1.2 | |
Created by: Coroico (http://modx.wangba.fr) |
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
<link rel="canonical" href="[[~[[*id]]? &scheme=`full`]]" /> | |
<meta property="og:image" content="[[++site_url]]pt/phpThumb.php?src=/[[*siteThumb]]&w=90&h=90&q=80&zc=T"/> | |
<meta property="og:site_name" content="[[++site_name:htmlent]]"/> | |
<meta property="og:title" content="[[*pagetitle]]"/> | |
<meta property="og:url" content="[[++site_url]][[~[[*id]]]]"/> | |
<meta property="og:type" content="article"/> | |
<meta itemprop="name" content="[[*pagetitle]]"> | |
<meta itemprop="description" content="[[*siteDescription:word_limit=`70`]]"> | |
<meta itemprop="image" content="[[++site_url]]pt/phpThumb.php?src=/[[*siteThumb]]&w=90&h=90&q=80&zc=T"> |
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 | |
// 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 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 | |
/** | |
* This is a MODX snippet to add "new" or "Updated" images to menu, | |
* pages and such. | |
* You need to provide your own new.gif and updated.gif file. change the | |
* file path to the images files accordingly. | |
* if called without input parameter then it will look at the page resource and | |
* determine if the page is newly published or updated. | |
* if called with input=`resourceID` then it will look into that resource ID. | |
* This snippet can be also used with getResoruces or Wayfinder. |
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 | |
// Use this line to prevent people from hammering your server. | |
if (!isset($_GET['super_secret']) || ($_GET['super_secret'] != 'secretpassword')) return 'Not authorized'; | |
// Call this snippet uncached in a resource with template "empty": | |
// content: "[[!benchmark]]" | |
// Make sure to tag the resource as uncachable | |
// The intro | |
echo '<body style="font-family: sans-serif;">'; |
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 | |
/** | |
* MODX FormLog hook to store formIt data in a jSon log file | |
* | |
* @author Kilian Bohnenblust (sofasurfer.org) | |
* @example [[!FormIt? | |
* &hooks=`spam,formlog,email,redirect` | |
* &logfile=`[[++base_path]]assets/data/form-contact.log` | |
* | |
*/ |
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 | |
// Use with OnLoadWebDocument | |
// Checks if in an Ajax call is made by checking if the value in X-Requested-With is given in the header. | |
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { | |
$modx->documentContent = '[*content*]'; | |
} | |
?> |
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 | |
$adminId = 1; | |
$polisyID = 4; | |
$authorityLevel = 9999; | |
$extendedField = 'redirect'; | |
//resorce setings | |
$template = 1; | |
$parent = 2; | |
$published = 1; |