[[*isfolder:is=`1`:then=`
<dl class="tabs" data-tab>
[[!getResources?
&parent=`[[*id]]`
&tpl=`fdTabTpl`
&tplFirst=`fdTabTpl_first`
&limit=`0`
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
# owncloud.example.com:80 | |
server { | |
listen 0.0.0.0:80; | |
server_name owncloud.example.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
# owncloud.example.com:443 |
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
#!/bin/bash | |
######################################################## | |
# | |
# MODX (modx.com) CLI updater | |
# Kreuder 20140308 mk@s1.gl | |
# | |
######################################################## | |
# | |
# Description: perform a MODX Basic Upgrade via CLI. | |
# |
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
/* | |
I admit I cba to figure out howto add a new theme to MODX Codemirror. :) | |
So for now: just edit the monokai theme in /assets/components/codemirror/cm/theme/monokai.css and select it in the plugin's prefs. | |
Don't forget to clear the cache. | |
*/ | |
.cm-s-monokai { font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important; font-size:.85em !important; } | |
.cm-s-monokai { background: #393939; color: #ccc; } | |
.cm-s-monokai .CodeMirror-selected { background: #000 !important; color: #efefef; } | |
.cm-s-monokai .CodeMirror-searching { background: #2A543A !important; } | |
.cm-s-monokai .CodeMirror-gutter { background: #333333; border-right: 0px; } |
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
$(function(){ | |
$('#checkAll').live('change', function(){ | |
var isChecked = !$('.checkbox').prop('checked'); | |
if($(this).is(':checked')){ | |
$('.checkbox').prop('checked', isChecked); | |
} else { | |
$('.checkbox').removeAttr('checked'); | |
} | |
}); |
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->initialize('web'); | |
switch(strtolower(MODX_HTTP_HOST)) { | |
case 'www.example.com:80': | |
case 'www.example.com': | |
$modx->initialize('my-example-context'); // context for example.com | |
break; | |
case 'www.example2.com:80': | |
case 'www.example2.com': | |
$modx->initialize('my-example2-context'); // context for example2.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
<?php | |
// Type: Snippet | |
$recipient = $hook->getValue('reason'); | |
if($recipient == 'one'){ | |
$email = ''; | |
} | |
elseif($recipient == 'two'){ | |
$email = ''; | |
} |
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 | |
# Snippet to include file based templates | |
# USAGE: [[LoadTemplate? &tpl=`template.tpl`]] | |
$base_path = $modx->config['base_path']; | |
if ( !isset($tpl) || $tpl== "" ) return "Missing Template file!"; | |
$tpl = $base_path .'assets/templates/'.$tpl; // change to your tpl dir path | |
ob_start(); | |
include($tpl); | |
return ob_get_clean(); |
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 | |
/* | |
Requirements: MODX, phpthumbof | |
*/ | |
$folder = 'img/random/'; // change to your random img dir | |
$height = 120; // desired height in px | |
$width = 940; // desired width in px | |
$crop = 'C'; // zoom crop where? T,R,B,L,C (top,right,bottom,left,center) | |
// space seperated list of extensions |
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 | |
/** | |
* AndIf - for MODx Revolution | |
* | |
* Copyright 2011 by Luke Bagshaw (MODx forum user 'lucas') | |
* This is a modified (extended) version of the 'If' snippet, created by | |
* Jason Coward <jason@modx.com> and Shaun McCormick <shaun@modx.com> | |
* | |
* AndIf 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 |