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 namespace ProcessWire; | |
class ImageSizerEngineGDAlt extends ImageSizerEngineGD { | |
public static function getModuleInfo() { | |
return [ | |
'title' => 'GD Image Sizer (alternative version)', | |
'version' => 1, | |
'summary' => "Uses PHP’s built-in GD library to resize images (alternative version, see https://github.com/processwire/processwire-issues/issues/1154).", | |
]; |
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 | |
/** | |
* Generate search index for saved pages | |
* | |
*/ | |
$this->addHook('Pages::saveReady', function(HookEvent $event) { | |
$page = $event->arguments[0]; | |
if ($page->id && $page->hasField('search_index')) { | |
$page->search_index = indexPage($page, array( |
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
{ | |
"pages": [{ | |
"name": "test-page", | |
"parent_name": "", | |
"page_template": "basic-page", | |
"status": 1, | |
"sort": 7, | |
"sortfield": "sort", | |
"data": { | |
"title": "Test page", |
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
{ | |
"pages":[ | |
{ | |
"name":"test-page", | |
"parent_name":"", | |
"page_template":"basic-page", | |
"status":1, | |
"sort":7, | |
"sortfield":"sort", | |
"data":{ |
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 | |
// Bootstrap ProcessWire | |
require "index.php"; | |
// Install LanguageSupportFields (unless already installed) | |
if (!wire('modules')->isInstalled('LanguageSupportFields')) { | |
wire('modules')->install('LanguageSupportFields'); | |
} |
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 | |
// Bootstrap ProcessWire | |
require 'index.php'; | |
// Make sure that FieldtypeRepeater is installed and ready for use | |
if (!wire('modules')->isInstalled('FieldtypeRepeater')) { | |
if (wire('modules')->isInstallable('FieldtypeRepeater')) { | |
wire('modules')->install('FieldtypeRepeater'); | |
echo "Module FieldtypeRepeater installed\n"; |