Archive

Posts Tagged ‘My Stuff’

Creating a CMS Framework – The Plan

May 18th, 2009 No comments

I’ve now written 4 cms’ and have decided as a personal project to create a core system that can easily be adapted to many tasks.  Over the past 4 cms’ I’ve used the same code a lot and created a central core of utils (imaginatively called Gist!) but I want to go a step further and have a central system I can use straight off.

Read more…

Categories: Asp.Net, cms Tags:

Parse Paths in SQL

April 16th, 2009 No comments

Just a couple of udf to handle paths in sql server, not very solid but if your paths are valid they work well.

CREATE FUNCTION dbo.GetFileName (@Path varchar(512))
RETURNS varchar(255) AS
BEGIN
	Return    RIGHT(@Path, LEN(@Path) - dbo.LAST_INDEX(@Path, '\'))
END

Read more…

Categories: SQL Tags:

JQuery carousel plugin

March 26th, 2009 2 comments

This is the start of a jQuery carousel. I’ve used a few carousels but they require a lot of css editing to get them to change widths etc. I wanted one that could easily adapt to displaying different numbers of items. It accepts a noOfItems config that defines how many items it displays and it adjusts it’s width accordingly. Early days but not bad for a few hours work :)

Read more…

Categories: JQuery Tags: ,

JQuery selectors reminder

March 25th, 2009 No comments

Selectors in JQuery are extremely powerful. This is a simple page to test them and as a quick reminder as to what’s available.

Categories: JQuery Tags: ,

JQuery Mini-tips

March 6th, 2009 No comments

Get a DOM object from a JQuery obj

$('#' + id).get(0); //get the dom object from the jquery wrapper

Only include object if JQuery is available

//only include if jquery is available
if (typeof jQuery != 'undefined') {
   //class goes here
}

Read more…

Categories: Javascript, JQuery Tags:

Create controls dynamically from database

February 11th, 2009 No comments

In my cms’ I usually have the option of creating controls from the database. This is just a simple use for reflection but allows me to add controls to page just by adding a new row.  If its one of my controls it supports a persistance system that allows the control to save and restore itself easily.

Read more…

Categories: .net, c# Tags: