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"; |
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 | |
//Example by Ryan Cramer @ProcessWire - http://processwire.com/talk/topic/5480-configurable-process-module-need-walk-through/?p=53729 | |
class YourModule extends WireData implements Module, ConfigurableModule { | |
public static function getModuleInfo() { | |
return array('title' => 'Your Module', 'version' => 1); | |
} | |
const defaultValue = 'smith'; |
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 | |
/* | |
* Script: DataTables server-side script for PHP and MySQL | |
* Copyright: 2012 - John Becker, Beckersoft, Inc. | |
* Copyright: 2010 - Allan Jardine | |
* License: GPL v2 or BSD (3-point) | |
*/ | |
class TableData { |
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 | |
/** | |
* Adding other types of save buttons for page edit form. | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2010 by Ryan Cramer | |
* Licensed under GNU/GPL v2, see LICENSE.TXT | |
* | |
* http://www.processwire.com |
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 | |
/* | |
Code by Ryan Cramer | |
Integrating a member visitor login form | |
https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/?p=15919 | |
*/ | |
/* | |
I recently had to setup front-end system to handle logins, password resets and changing passwords, so here's about how it was done. This should be functional code, but consider it pseudocode as you may need to make minor adjustments here and there. Please let me know if anything that doesn't compile and I'll correct it 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
<?php | |
/** | |
* | |
* CONTEXT: This is a utility class for 'cleaning-up' Blog in case you uninstalled Blog without first running its inbuilt Cleanup utility. | |
* | |
* WARNING: The utility will irreversibly delete the following Blog Components | |
* Fields (blog_xxx) | |
* Templates (blog-xxx) | |
* Optionally Template Files (in case you installed the blank/demo Template Files) (blog-xxx.php/inc) |
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 | |
// source: https://processwire.com/talk/topic/680-multiple-sites-from-one-install/?p=8778 | |
class Multisite extends WireData implements Module, ConfigurableModule { | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Multisite', | |
'version' => 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
<?php | |
/** | |
* include paginator class from ProcessWire core, $config->paths->Modulename can | |
* be used to get the path of any module in PW. | |
*/ | |
require_once($config->paths->MarkupPagerNav . "PagerNav.php"); | |
/** |
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 | |
$mypage = $pages->get("/about/"); | |
if($input->post->submit){ | |
$n = 1; | |
$title = "element_title_$n"; | |
$url = "external_url_$n"; | |
$mypage->setOutputFormatting(false); |
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 | |
// check if there are GET variables present in the URL | |
if(count($input->get)) { | |
$selector = ''; | |
if($input->get->application) { | |
$application = $sanitizer->pageName($input->get->application); | |
$appid = $pages->get("template=product-options, name=$application"); |
OlderNewer