Skip to content

Instantly share code, notes, and snippets.

View neilbradley's full-sized avatar

Neil Bradley neilbradley

View GitHub Profile
// create our form
var myForm = new glow.forms.Form("#fmcustomer")
var myForm = glow.lang.trim("txtCompany","txtForename","txtSurname2)
// add tests for First Name
.addTests(
"txtCompany",
["required", {
on: "change submit",
message: "Please tell us your company name"
}]
<!--#include file="../includes/site-variables.asp" -->
<!--#include file="../Connections/dbconn.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Search</title>
</head>
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>My Account</title>
<script type="text/javascript" src="/ScriptLibrary/glow/1.5.1/core/core.js"></script>
</head>
<body>
<div class="notice">Welcome message</div>
@neilbradley
neilbradley / channel7.json
Created September 22, 2009 08:06
Programme data in JSON format to feed the Glow Timetable
{
"blocklist": [
{
"service": "channel7",
"service_title": "Channel 7",
"start": "2009-03-09T14:42:02",
"end": "2009-03-09T15:42:02",
"emp_title": "Being Human: Series 1: Episode 5"
},
{
EE Code;
<li><a {if segment_1 == ""} class="current" {/if} href="{site_url}">Home</a></li>
<li><a {if segment_1 == "articles"} class="current" {/if} href="/articles">News</a></li>
CI Code?
<li><a {if segment_1 == ""} class="current" {/if} href="<?=site_url('')?>">Home</a></li>
<li><a {if segment_1 == "articles"} class="current" {/if} href="<?=site_url('articles')?>">News</a></li>
<?php
/*
Copyright (c) 2007 osCommerce
Released under the GNU General Public License
Portions Copyright (c) 2005 - 2006 Chain Reaction Works, Inc
*/
@neilbradley
neilbradley / .htaccess
Created October 9, 2011 13:48
Sample htaccess
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi
# Action php5-cgi /cgi-bin/php5-cgi
# AddHandler php5-cgi .php
############################################
## GoDaddy specific options
@neilbradley
neilbradley / case-studies.php
Created June 8, 2012 13:29
Viewing category with Switchee
{embed="_layouts/index"}
{preload_replace:channel="case_studies"}
{if group_id=="1"}
{preload_replace:featured_status="featured|closed"}
{preload_replace:preview_status="open|featured|closed"}
{if:else}
{preload_replace:featured_status="featured"}
{preload_replace:preview_status="open|featured"}
{/if}
@neilbradley
neilbradley / pi.sitename.php
Last active December 22, 2015 00:28
This is a simple plugin to dash encode a string (and convert to lower case) for ExpressionEngine. Create a folder inside your third_party directory with your sitename (all one word in lower case). Change all references of sitename in the file to your sitename.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc.
* @license http://expressionengine.com/user_guide/license.html
* @link http://expressionengine.com
@neilbradley
neilbradley / by.html
Last active December 22, 2015 17:59
Showing categories using Child Categories add-on for EE
{embed="_layouts/index"
google_maps="true"
}
{preload_replace:channel="things-to-do"}
{exp:stash:set_list name="subcategories" parse_tags="yes"}
{exp:child_categories parent="{segment_3_category_id}" child_categories_sort_by="custom" child_categories_sort_direction="asc" show_empty="no"}
{stash:child_category_start}{child_category_start}{/stash:child_category_start}
{stash:child_category_name}{child_category_name}{/stash:child_category_name}
{stash:child_category_image}{child_category_image}{/stash:child_category_image}