Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Adding Cache Headers and ETag to example: http://sperling.com/examples/pcss/
*/
class PHPStyle
{
public static function setHeaders($filename="style.css",$type="text/css")
<html>
<head>
<script type="text/javascript">
//<[CDATA[
window.addEvent('domready', function(){
// onload functions here
});
function overlay() {
el = document.getElementById("overlay");
@billcreswell
billcreswell / PluckInstalls.md
Last active August 29, 2015 14:05
"Powered By Pluck" - Websites using Pluck CMS
// set location of docx text content file
$xmlFile = $targetDir."/word/document.xml";
$reader = new XMLReader;
$reader->open($xmlFile);
// set up variables for formatting
$text = ''; $formatting['bold'] = 'closed'; $formatting['italic'] = 'closed'; $formatting['underline'] = 'closed'; $formatting['header'] = 0;
// loop through docx xml dom
while ($reader->read()){
@billcreswell
billcreswell / styleguide.html
Created January 3, 2015 16:46
HTML Style Guide Basel
<!-- Beginning of Styleguide -->
<h1>Poor Man's Styleguide</h1>
<p>A quick-and-dirty frontend styleguide, designed to be copied and pasted into your CMS.</p>
<strong><a href="http://poormansstyleguide.com">See the full demo at poormansstyleguide.com</a></strong>
<hr />
// set location of docx text content file
$xmlFile = $targetDir."/word/document.xml";
$reader = new XMLReader;
$reader->open($xmlFile);
// set up variables for formatting
$text = ''; $formatting['bold'] = 'closed'; $formatting['italic'] = 'closed'; $formatting['underline'] = 'closed'; $formatting['header'] = 0;
// loop through docx xml dom
while ($reader->read()){
@billcreswell
billcreswell / simple.php
Last active August 29, 2015 00:05
Simple Pluck Module Part 1
```{php}
<?php
//{plugin}_info
function simple_info() {
$module_info = array(
'name' => 'My Simple Demo Module',
'intro' => 'The Simplest Module',
'version' => '0.1',
'author' => 'grwebguy',
@billcreswell
billcreswell / simple.site.php
Created August 29, 2015 00:06
Simple Pluck Module Part 2
```{php}
<?php
defined('IN_PLUCK') or exit('Access denied!');
//{pluginname}_theme_main()
function simple_theme_main() {
echo getMessage();
}
function getMessage() {
return 'Hello Friends, this is my simple module';
}