Revised date: 13/03/2013
Between us: Crunch Design
and you: [customer name]
| $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 */ |
| // Scenario: Some event handler is blocking events (event.preventDefault()) that shouldn't be blocked, i.e. because it binds to document instead of a more specific element | |
| // 1) Place this before all other JavaScript | |
| var originalPreventDefault = Event.prototype.preventDefault; | |
| Event.prototype.preventDefault = function () { | |
| // Lookup specific event you're expecting, i.e. pressing space | |
| if (this instanceof KeyboardEvent && this.keyCode === 32) { | |
| // This will log an error with full stack trace | |
| make_error_to_see_stacktrace |