I hereby claim:
- I am matdave on github.
- I am matjones (https://keybase.io/matjones) on keybase.
- I have a public key whose fingerprint is 844B 38BB 2C5A 974B 5667 F125 3AED 15C3 A370 EE19
To claim this, I am signing this object:
| [[!FormIt? | |
| &submitVar=`gcaptchahdn` | |
| &customValidators=`invisibleRecaptcha` | |
| &validate=` | |
| g-recaptcha-response:invisibleRecaptcha` | |
| ]] | |
| <form method="post" action="[[~[[*id]]]]" id="contact"> | |
| <button class="btn g-recaptcha" data-sitekey="[[++gcaptcha.site_key]]" data-callback="onSubmit">Submit</button> | |
| </form> | |
| <script src="https://www.google.com/recaptcha/api.js" async defer></script> |
| <?php | |
| //Plugin to autocreate tags | |
| switch ($modx->event->name) { | |
| case 'OnDocFormSave': | |
| if(!empty($resource)){ | |
| $temp = $resource->get('template'); | |
| //templates to autotag | |
| if($temp == 21 || $temp == 22){ | |
| $pagetitle = null; |
| .brandbkg1::before { | |
| content: ""; | |
| position: absolute; | |
| width: 150%; | |
| height: 2000px; | |
| top: -875px; | |
| left: -25%; | |
| z-index: -1; | |
| background: url('../gfx/mandala.png'); | |
| background-size: cover; |
| [[+icon_class:replace=`fa-==`]] <i class="[[+icon_class:replace=`fa-==icon-`]] icon icon-large"></i> |
| <?php | |
| $fields = $hook->getValues(); | |
| $emailTo = $hook->formit->config['emailTo']; | |
| if(strpos($emailTo,'[[+') !== false){ | |
| $emailVar = str_replace('[[+','',$emailTo); | |
| $emailVar = str_replace(']]','',$emailVar); | |
| $hook->formit->config['emailTo'] = $fields[$emailVar]; | |
| } | |
| return true; |
| <section id="{{ anchortext|lower|replace({' ': ''}) }}" > | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-lg-8 mx-auto text-center"> | |
| <h2 class="section-heading" contenteditable="true" data-fred-name="head">Header</h2> | |
| <hr class="light my-4"> | |
| <div class="text-faded mb-4 text-left" contenteditable="true" data-fred-name="text" data-fred-rte="true" data-fred-rte-config="text"> | |
| <p>Some Text</p> | |
| </div> | |
| </div> |
| <?php | |
| $corePath = $modx->getOption('fred.core_path', null, $modx->getOption('core_path', null, MODX_CORE_PATH) . 'components/fred/'); | |
| /** @var Fred $fred */ | |
| $fred = $modx->getService( | |
| 'fred', | |
| 'Fred', | |
| $corePath . 'model/fred/', | |
| array( | |
| 'core_path' => $corePath | |
| ) |
| /* Drop MODX */ | |
| SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) | |
| AS statement FROM information_schema.TABLES WHERE table_schema = 'instance_cXXXX_modx' AND table_name LIKE 'modx_%'; | |
| /* Change incorrect prefix */ | |
| SELECT CONCAT( 'RENAME TABLE ', TABLE_NAME, ' TO ', replace(TABLE_NAME, 'wrong_', 'modx_'), ';') | |
| AS statement FROM information_schema.TABLES WHERE table_schema = 'instance_cXXXX_modx' AND table_name LIKE 'wrong_%'; |
| <?php | |
| function fixJSON($array, $mediaSources) { | |
| $fix = array(); | |
| foreach( $array as $key => $value) { | |
| if (is_array($value)) { | |
| $fix[$key] = fixJSON($value); | |
| } else{ | |
| if(in_array($key, array('mediaSource','imageMediaSource')){ | |
| if(!empty($mediaSources[$value])){ | |
| $value = $mediaSources[$value]; |
I hereby claim:
To claim this, I am signing this object: