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
/* | |
upcModel used to get upc when provided fabric, colorway, and size | |
invModel used to get the regions and retailers carring the given upc | |
*/ | |
/* __ | |
/\ \ /\ \__ | |
\_\ \ __ \ \ ,_\ __ | |
/'_` \ /'__`\ \ \ \/ /'__`\ |
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
filename = (numChars < maxChars) ? fileName : (fileName.substr(0,(numChars / 2) - ((numChars - maxChars) / 2)) + '...' + fileName.slice( - ((numChars / 2) - ((numChars - maxChars) / 2) - (fileExtension.length + 1)))); | |
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
UPDATE modx_site_content SET content = replace(content, 'src="assets', 'src="/assets'); |
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 | |
$tstart = microtime(true); | |
set_time_limit(0); | |
require 'config.core.php'; // absolute path to your MODX config | |
require MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = modX::getInstance(); | |
$modx->initialize('mgr'); |
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 | |
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; | |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
sass: { // Task | |
dist: { // Target | |
files: { // Dictionary of files | |
'style.css': 'style.scss' // 'destination': 'source' | |
} | |
}, |
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
/* this will override the redactor font-family declaration regarldess order */ | |
body { /* add specificity */ | |
.redactor-link-tooltip, | |
.redactor-link-tooltip a { | |
font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; /* your other font here */ | |
} | |
} |
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
<h1>modmore rules!</h1> |
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
<div class="vanity"> | |
<div class="focus"> | |
<h2>Hello World</h2> | |
</div> | |
</div> |
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 | |
// patches https://github.com/modxcms/revolution/issues/11291 for Redactor 1.4.3 and MODX 2.2.15 - 2.3.1 | |
$this->patch_11291 = | |
(bool)((bool)$this->modx->getOption('redactor.patch_11291', null, false) | |
&& version_compare('2.2.15-pl',$vd['full_version'],'<=') | |
&& version_compare('2.3.1-pl',$vd['full_version'],'>=')) | |
; |