Revised date: 13/03/2013
Between us: Crunch Design
and you: [customer name]
/* Gradient cheatsheet */ | |
background: linear-gradient(45deg, white, black); | |
background: linear-gradient(to right, white 50%, red, black); | |
background: linear-gradient(to bottom right, white 50px, black); | |
background: repeating-linear-gradient(to bottom left, white, black 30px); | |
background: radial-gradient(at top right, white, black); | |
background: radial-gradient(circle at top right, lime 50%, black 0); | |
background: radial-gradient(farthest-corner at center, red 80%, black); | |
background: radial-gradient(farthest-side at center, yellow 80%, black); |
$dontRem = array('adam','admin'); /* add any additional context you dont wish to have removed here */ | |
$users = $modx->getCollection('modUser'); | |
foreach($users as $user){ | |
$id = $user->get('id'); | |
$name = $user->get('username'); | |
if(!in_array($name,$dontRem)) { | |
$response = $modx->runProcessor('security/user/delete',array('id'=>$id)); | |
if ($response->isError()) { | |
echo $response->getMessage() . '<hr/>'; |
// I've updated the Zurb4.3/5 Grid/block-grid systems to be in line with my suggestions at https://github.com/zurb/foundation/issues/3261 | |
// http://github.com/replete | |
// | |
// Block Grid Variables | |
// | |
$include-html-grid-classes: $include-html-classes !default; | |
// We use this to control the maximum number of block grid elements per row | |
$block-grid-elements: 12 !default; |
<?php | |
switch ($modx->event->name) { | |
case 'OnDocFormPrerender': | |
if(!$resource) return; | |
$key = 'redactor.image_upload_path'; | |
$userId = $modx->user->get('id'); | |
$usersetting = $modx->getObject('modUserSetting', array('key' => $key, 'user' => $userId)); | |
if(!$usersetting) return; | |
$modAuth = $this->modx->user->getUserToken('mgr'); | |
$thumbQuery = http_build_query(array( | |
'src' => $image['urlAbsolute'], | |
'w' => 360, | |
'h' => 270, | |
'HTTP_MODAUTH' => $modAuth, | |
//'f' => $thumbnailType, | |
'q' => 80, | |
'wctx' => 'mgr', |
<?php | |
/** | |
* Usage: | |
* Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
*/ | |
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
$config = array( |
# x-ua-xompatible header | |
add_header X-UA-Compatible IE=edge,chrome=1; | |
#default charset uft-8 | |
charset utf-8; | |
# allowed domains | |
set $rewrite_var 0; |
<header> | |
<a href="[[++site_url]]" class="logo">Heart Coffee Roasters</a> | |
<nav class="primary"> | |
<ul> | |
<li class="home"><a href="[[++site_url]]">Home</a></li> | |
<li class="about"> | |
<a class="tap-touch " href="[[~12? &scheme=`full`]]">About<span class="extra"> Heart</span></a> | |
<div class="dropdown-mask"> | |
<div class="dropdown"> | |
<ul> |
<?php | |
if($modx->context->get('key') != "mgr"){ | |
/* grab the current langauge from the cultureKey request var */ | |
switch ($_REQUEST['cultureKey']) { | |
case 'en': | |
/* switch the context */ | |
$modx->switchContext('en'); | |
break; | |
default: | |
/* Set the default context here */ |