This file contains hidden or 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 declare(strict_types=1); | |
use Kirby\Cms\ModelWithContent; | |
/** | |
* This script assumes English is the default language and German is the translation. | |
* The goal is to switch this and make German the default language and English the translation. | |
* | |
* We want to update all pages, files metadata and the site. | |
* |
This file contains hidden or 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 declare(strict_types=1); | |
/** | |
* This script sets a file template 'image' for every image in site() and all pages(). | |
* I had a project without a file blueprint, but then added one later down the road. | |
* The existing files had no template set, so I hate to update all file metadata manually. | |
* Now even the existing files make use of the recently added file template. | |
* The script can easily be adjusted to update other metadata. | |
*/ |
This file contains hidden or 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
function captureCanvas(canvasSelectorOrElement, captureDuration, userOptions) { | |
// Create MediaRecorder object and connect it with the canvas stream | |
const canvas = (typeof canvasSelectorOrElement === 'string') ? document.querySelector(canvasSelectorOrElement) : canvasSelectorOrElement | |
if (!(canvas instanceof HTMLCanvasElement)) { | |
throw new Error('Element is not an instance of HTMLCanvasElement') | |
} | |
const defaultOptions = { |
This file contains hidden or 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
<territories> | |
<territory type="001">Welt</territory> | |
<territory type="002">Afrika</territory> | |
<territory type="003">Nordamerika</territory> | |
<territory type="005">Südamerika</territory> | |
<territory type="009">Ozeanien</territory> | |
<territory type="011">Westafrika</territory> | |
<territory type="013">Mittelamerika</territory> | |
<territory type="014">Ostafrika</territory> | |
<territory type="015">Nordafrika</territory> |
This file contains hidden or 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 | |
namespace PresProg; | |
use Contao; | |
class ModelTemplate extends \Template | |
{ | |
protected $objModel; |