Skip to content

Instantly share code, notes, and snippets.

Thomas Jakobi Jako

Block or report user

Report or block Jako

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@herooutoftime
herooutoftime / README.md
Last active Apr 3, 2018
MODx (missing) preview of unsaved changes
View README.md

Idea & Concept

MODx Revolution lacks a preview of unsaved changes. For editors this is a rather important feature to check if their changes are correctly displayed and it's easy to do. No need to unpublish, save and view the resource. Just click 'Preview' and a MODx Window will show you all the changes.

The way it works is pretty easy: When clicking the 'Preview' button and OnBeforeDocFormSave is triggered all current (saved) data will be stored in a cache file, the resource will be saved with the new data. If OnWebPageComplete is fired, the saved data will be replaced with the previously cached data.

So for a short period the actual preview will be live!

Installation

@frisospeulman
frisospeulman / seoProKeywordConvertor
Last active Jul 15, 2018
Converts keyword tv to seoPro Keywords objectCreate a snippet and run it on a blank page.
View seoProKeywordConvertor
<?php
/**
* Convert your keyword tv to Sterc's SeoPro
*
* Please read the following.
* Everytime you run this snippet, your keywords within seoPro will be overwritten.
* Make sure the TV exists before runnig this code.
*
*/
$seoPro = $modx->getService('seopro', 'seoPro', $modx->getOption('seopro.core_path', null, $modx->getOption('core_path') . 'components/seopro/') . 'model/seopro/', $scriptProperties);
@craigmdennis
craigmdennis / index.html
Last active Dec 27, 2017
When not including Modernizr, use this to remove the no-js class from the html.From: http://www.paulirish.com/2009/avoiding-the-fouc-v3/
View index.html
<html class="no-js">
<head>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
</head>
<body>
</body>
</html>
You can’t perform that action at this time.