-
MODX_BASE_PATH -- path to the MODX root
-
MODX_CORE_PATH -- path the MODX core directory
-
MODX_ASSETS_PATH -- path to the MODX assets directory
-
MODX_MANAGER_PATH -- path to the MODX manager directory
-
MODX_CONNECTORS_PATH -- path to the connectors directory
-
MODX_PROCESSORS_PATH -- path to the processors directory
-
[[++core_path]]
-
[[++manager_path]]
-
[[++assets_url]]
!less tracking: //www.youtube-nocookie.com/embed/[[+value]]
!thumbnails
Each YouTube video has 4 generated images. They are predictably formatted as follows:
https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
https://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
https://img.youtube.com/vi//2.jpg
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 | |
/* | |
getFormSteps snippet | |
for the Formalicious form builder for MODX by Sterc | |
This utility snippet displays all the step titles for a given form ID | |
Put the snippet in the Formalcious steps tpl and call like this; | |
[[!getFormSteps? stepFormId=`[[!+form_id]]` &tpl=`myFormStepsTpl`]] |
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 | |
// Collections Snippet Renderer | |
// Version: 0.1 | |
// 2do: autoimatically retrieve assets path from media source | |
$row = $modx->getOption('row', $scriptProperties, ''); | |
$value = $modx->getOption('value', $scriptProperties, ''); | |
$column = $modx->getOption('column', $scriptProperties, ''); | |
$imgName = $value; |
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 | |
/* | |
responsive-tables.php for modx | |
Wraps tables into a div.table-responsive container and adds a custom class to the table tag | |
This technique is used by bootstrap 3.3.7 and 4.1: | |
http://getbootstrap.com/docs/4.1/content/tables/#responsive-tables | |
Turns: | |
<table>...</table> |
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
#ffffff,#000000,#8c191d,#eeece1,#1f497d,#4f81bd,#c0504d,#9bbb59,#8064a2,#4bacc6,#f79646,#ffff00,#f2f2f2,#7f7f7f,#ddd9c3,#c6d9f0,#dbe5f1,#f2dcdb,#ebf1dd,#e5e0ec,#dbeef3,#fdeada,#fff2ca,#d8d8d8,#595959,#c4bd97,#8db3e2,#b8cce4,#e5b9b7,#d7e3bc,#ccc1d9,#b7dde8,#fbd5b5,#ffe694,#bfbfbf,#3f3f3f,#938953,#548dd4,#95b3d7,#d99694,#c3d69b,#b2a2c7,#b7dde8,#fac08f,#f2c314,#a5a5a5,#262626,#494429,#17365d,#366092,#953734,#76923c,#5f497a,#92cddc,#e36c09,#c09100,#7f7f7f,#0c0c0c,#1d1b10,#0f243e,#244061,#632423,#4f6128,#3f3151,#31859b,#974806,#7f6000 |
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
collections.renderer.imageplus = function(value, metaData, record, rowIndex, colIndex, store) { | |
if (value != '' && value != null) { | |
var data = Ext.decode(value); | |
var url = MODx.config.connectors_url + 'system/phpthumb.php?imageplus=1'; | |
var params = {}; | |
params.src = 'upload/'+MODx.config['collections.renderer_image_path'] + data.sourceImg.src; | |
params.w = 100; | |
if (data.sourceImg.src.indexOf('.png') !== -1) { | |
params.f = 'png'; |
Source: https://stackoverflow.com/a/11512211
To change all the directories to 755 (drwxr-xr-x):
find /opt/lampp/htdocs -type d -exec chmod 755 {} \;
find . -type d -exec chmod 755 {} \;
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 | |
// by Bruno17 on slack | |
// Example: rgba([[+tv.node_activecolor:hextorgb]], 0.5) | |
$hexStr = $input; | |
$returnAsString = true; | |
$seperator = ','; | |
$hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // Gets a proper hex string | |
$rgbArray = array(); |
Collections is a handy tool to display the child resources of a parent inside a configurable grid. Each column can get its own configurable editor so you can edit a resource right from the grid.
Editors can be attached by editing the collections column settings: