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 download{ | |
public function startDownload( $vFilePath, $vDownloadName=""){ | |
$vFilename = basename( $vFilePath); | |
$vNewFilename = $vDownloadName == "" ? $vFilename : $vDownloadName; | |
$vFileType = $this->getFileType( $vFilename); | |
$vContentType = $this->GetContentType( $vFileType); | |
// Fix IE bug [0] |
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 | |
function flourish_loader( $class_name ) | |
{ | |
// Customize this to your root Flourish directory | |
$flourish_root = wire("config")->paths->root . '.libs/flourish/'; | |
$file = $flourish_root . $class_name . '.php'; | |
if (file_exists($file)) { | |
include $file; | |
} |
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
/* | |
* anchor-include pattern for already-functional links that work as a client-side include | |
* Copyright 2011, Scott Jehl, scottjehl.com | |
* Dual licensed under the MIT | |
* Idea from Scott Gonzalez | |
* to use, place attributes on an already-functional anchor pointing to content | |
* that should either replace, or insert before or after that anchor | |
* after the page has loaded | |
* Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a> | |
* Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a> |
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 PageReferenceLink | |
* | |
* @author Soma philipp(at)urlich.ch | |
* | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2010 by Ryan Cramer |
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 Module FieldHelper | |
* | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2010 by Ryan Cramer | |
* Licensed under GNU/GPL v2, see LICENSE.TXT | |
* |
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 Helloworld extends WireData implements Module { | |
public static function getModuleInfo() { | |
return array( | |
'title' => 'Hello World', |
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 | |
$out = ''; | |
// create a new form field (also field wrapper) | |
$form = $modules->get("InputfieldForm"); | |
$form->action = "./"; | |
$form->method = "post"; | |
$form->attr("id+name",'subscribe-form'); |
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 | |
// front-end form example with multiple images upload | |
// add new page created on the fly and adding images | |
$message = ''; | |
if($input->post->submit){ | |
// tmp upload folder for additional security |
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 | |
// start module to textarea counter | |
class TextAreaCounter extends WireData implements Module { | |
//const default_maxlength = 255; | |
/** | |
* getModuleInfo is a module required by all modules to tell ProcessWire about them |