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 | |
// run plugin OnFileManagerUpload | |
switch ($modx->event->name) { | |
case "OnFileManagerUpload": | |
if(!empty($files)){ | |
foreach($files as $file){ | |
if ($file['type'] != "image/jpeg" && $file['type'] != "image/png") | |
return; | |
// max number of pixels wide or high | |
$max_image_dimension = $modx->getOption('max_image_dimension',$scriptProperties,0); |
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 | |
/** | |
* codeSample Snippet for rendering ASCII characters of element calls in MODX frontend | |
* e.g. | |
* [[codeSample?&element=`QuickEmail`&properties=`debug=1` &cachedFlag=`true`]] | |
* outputs [[!QuickEmail? &debug=`1`]] | |
**/ | |
$element = $modx->getOption('element', $scriptProperties, null); | |
$type = $modx->getOption('elementClass', $scriptProperties, 'modSnippet'); |
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 | |
/** | |
* recaptchav3 POST Validator for use with MODX form processors | |
* | |
* Based on https://github.com/google/recaptcha | |
* | |
* @copyright Copyright (c) 2014, Google Inc. | |
* @link http://www.google.com/recaptcha | |
* | |
* Ported to MODX by YJ Tso @sepiariver |
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 | |
/** | |
* Plugin to add a "created by" field on a resource form and moves "published on" to document tab | |
* | |
* @var modX $modx | |
* @var array $scriptProperties | |
* | |
* @event OnDocFormPrerender | |
*/ | |
$dateFormat = $modx->getOption('manager_date_format',null,'d.m.Y'); |
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
SELECT a.id AS 'ID', | |
CASE | |
WHEN a.menutitle = '' THEN a.pagetitle | |
ELSE a.menutitle | |
END AS 'Title', | |
a.uri AS 'URI', | |
c.templatename AS 'Template', | |
CASE | |
WHEN a.hidemenu = 1 THEN 'Hidden' | |
ELSE 'Visible' |
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
SCf55d:a5:c6:Infinite continues | |
SCac6d:2c:9d:Don't lose energy from enemy attacks | |
SC9564:00:04:Don't lose energy from falling | |
SC8c19:10:04:Maximum energy gained from potion | |
SC8c31:28:14:40 throwing stars on pick-up | |
SC8c46:14:05:20 bombs on pick-up |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content=""> | |
<meta name="author" 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 | |
// Choose the Parent ID for the bulk changes | |
$parent = 12393; | |
// Set how deep we want to search into sub-pages | |
$depth = 3; | |
// Grab all the IDs | |
$children = $modx->getChildIds($parent, $depth, array('context' => 'web')); | |
if(!empty($children)){ |
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 | |
/** | |
* Plugin to add a read only "url" field to the document tab | |
* | |
* @var modX $modx | |
* @var array $scriptProperties | |
* | |
* @event OnDocFormPrerender | |
*/ | |
if(!$resource || !$mode || $modx == "new") return; |
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
SELECT id, type, pagetitle, longtitle, description, alias, alias_visible, link_attributes, published, pub_date, unpub_date, parent, isfolder, introtext, content, richtext, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, deleted, deletedon, deletedby, publishedon, publishedby, menutitle, donthit, privateweb, privatemgr, content_dispo, hidemenu, 'MODX\\Revolution\\modDocument' AS class_key, 'web' AS context_key, 1 AS content_type, null AS uri, 0 AS uri_override, 0 AS hide_children_in_tree, 1 AS show_in_tree, null AS properties FROM `modx_site_content` |