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 | |
/* | |
* This class was originally written as part of a SOAP service - just for fun | |
* | |
* used as a countdown until Christmas | |
* Returns | |
* the number of Days | |
* the number of Shopping Days | |
* the number of Weekends | |
* */ |
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 | |
/** | |
* Smarty plugin wrapper for PHP's rand function | |
* | |
* @package Smarty | |
* @subpackage PluginsFunction | |
*/ | |
/** | |
* Smarty {app_rand} function plugin | |
* |
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
// Define some global vars for our idle timer | |
var idleTime = 0; | |
var countdown = 10; | |
var idlemin = 10; | |
var idlemax = 20; | |
// | |
// | |
// you need to define your own HTML and css styles for the warning message and fade layer. | |
// the warning message goes in a div with the ID #idlewarn |
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
// -------------------------------------------------------- | |
// auto embed google map if google map link found in body | |
// Allows site content editors to simply place a standard | |
// link in their text, and this will turn it into an | |
// embedded map | |
// -------------------------------------------------------- | |
// N.B. links with a class of dont-embed means... duh. dont embed. | |
var sMapSel = 'a[href^="http://maps.google.co.uk/maps"]:not(.dont-embed)' ; |
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 | |
/** | |
* Smarty plugin | |
* | |
* @package App | |
* @subpackage SmartyPluginsModifier | |
*/ | |
/** | |
* Smarty number modifier |
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
function clearMe(oObj,val) { | |
if(oObj.value==val) { | |
oObj.value=''; | |
} | |
} | |
function fillMe(oObj,val) { | |
if (oObj.value=='') { | |
oObj.value=val | |
} |
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
/** | |
* Generate a Color Palette | |
* Using Imagick to quantize the image | |
* (http://www.php.net/manual/en/class.imagick.php) | |
* | |
* ASSUMPTION - your image directory has suitable permission levels to allow | |
* your script to edit/copy/create files. | |
**/ | |
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
pre { | |
outline: 1px solid #ccc; | |
padding: 5px; margin: | |
5px; | |
} | |
.string { | |
color: #008000; | |
} |
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 Application\View\Helper; | |
use Zend\View\Helper\AbstractHelper; | |
class Urlize extends AbstractHelper | |
{ | |
public function __invoke($string) | |
{ |
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
# enable a site | |
sudo a2ensite | |
# disable a site | |
sudo a2dissite | |
# enable an apache2 module | |
sudo a2enmod | |
# a2enmod [modulename] |
OlderNewer