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 | |
/** | |
* ProcessWire Page Docs Tab | |
* | |
* A little addon to display help docs relevant to the page being edited. | |
* | |
* @copyright Copyright (c) 2015, Macrura | |
* | |
*/ |
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 | |
// featured | |
$slides = $pages->find("template=slide, featured=1"); | |
// Word Limiter | |
function wordLimiter(HookEvent $event){ | |
$field = $event->arguments[0]; // first argument | |
$limit = $event->arguments[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 | |
class AppendBoilerplates extends WireData implements Module { | |
/** | |
* Basic information about module | |
*/ | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Append Boilerplates', | |
'summary' => 'Append selected boilerplate texts to a text body', |
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 // messages | |
// Set Defaults | |
$base_path = '/server/path/to/pwsite'; | |
$base_url = 'base-http-url-here'; | |
$now = date("U"); // current date | |
//Setup Time Range, Send all messages in range: | |
$minus4 = date('U', strtotime('-4 minutes')); |
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 // messages | |
// Set Defaults | |
$base_path = '/server/path/to/pwsite'; | |
$base_url = 'base-http-url-here'; | |
$now = date("U"); // current date | |
//Setup Time Range, Send all messages in range; +-4 minutes seems to work well...cron runs every 5 min | |
$minus4 = date('U', strtotime('-4 minutes')); |
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 | |
class AssignSession extends WireData implements Module { | |
/** | |
* Basic information about module | |
*/ | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Assign Session', | |
'summary' => 'Assigns a session to the session_table field in class, upon save', |
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
<? | |
/* | |
Title: | |
FoxyCart_Inventory | |
Description: | |
Uses FoxyCart.com's XML Data Feeds to modify Processwire data. | |
Version: |
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 | |
class BuildUrl extends WireData implements Module { | |
/** | |
* Basic information about module | |
*/ | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Build URL', | |
'summary' => 'Builds a URL on page save based on specific fields.', |
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"); |
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
<form name='search' id='product-search' method='get' action='<?php echo $config->urls->root?>speaker-finder/'> | |
<ul id="row1"> | |
<li> | |
<label for='search_app'>Application</label> | |
<select id='search_app' name='application' onchange="$(this.form).trigger('submit')"> | |
<option value=''>Any</option><?php | |
// generate the application options, checking the whitelist to see if any are already selected | |
foreach($pages->get(1016)->children('include=all') as $app) { | |
$selected = $app->name == $input->whitelist->application ? " selected='selected' " : ''; |