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
$count = count($pagearray); | |
foreach ($pagearray as $key => $p) { | |
$div = ($key + 1 === $count) ? ($count === 1 ? '' : ' & ') : ($key === 0 ? '' : ', '); | |
$out .= $div . "<a href='$p->url' class=''>$p->title</a>"; | |
} | |
echo $out; |
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 | |
/** | |
* ProcessWire 'Image Fit Boundaries' module | |
* | |
* Module to calculate the max size a image can take in a boundary box. | |
* © Martijn Geerts 2013 | |
* | |
* Usage: | |
* |
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 | |
// text to print on Image | |
$text = $page->title; | |
$image = $page->image->first()->httpUrl; | |
$info = getimagesize($image); | |
$type = $info['mime']; | |
switch ($type) { |
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 | |
class RepeaterTable extends WireData implements Module { | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'RepeaterTable', | |
'version' => 100, | |
'summary' => 'RepeaterTable', | |
'singular' => false, |
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
<pre><?php | |
ini_set('max_execution_time', 60*5); // 5 minutes, increase as needed | |
include("./index.php"); | |
$dir = new DirectoryIterator(wire('config')->paths->files); | |
foreach($dir as $file) { | |
if($file->isDot() || !$file->isDir()) continue; | |
$id = $file->getFilename(); | |
if(!ctype_digit("$id")) continue; | |
$page = wire('pages')->get((int) $id); |
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 | |
/** | |
* Conditional Demo for ProcessWire | |
* | |
* author: Martijn Geerts | |
* 30 august 2013 | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2012 by Ryan Cramer |
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
/** | |
* Wire Tabs, jQuery plugin | |
* | |
* Developed by Ryan Cramer for ProcessWire | |
* | |
*/ | |
(function($) { | |
$.fn.WireTabs = function(customOptions) { |
NewerOlder