Archive

Author Archive

Creating .Empty properties

November 1st, 2010 No comments

When creating type classes it can be useful to have an .Empty property so you know if an item has been populated. Its quite easy to achieve. All we do is create an instance of the class as a static property. Then we compare our instance to this one when we need to check.

Read more…

Categories: c# Tags:

jQuery equal height columns

May 12th, 2010 No comments

Sometimes equal height columns via css can be an absolute nightmare! If you’re using jQuery for other items on the page you can cheat with the following function :

function setEqualHeight(items) { 
var highest = 0; 
items.each( function(){ 
current = $(this).height(); 
if(current > highest){ 
highest = current; 
} 
}); 
items.height(highest); 
};

Read more…

Categories: JQuery Tags: ,

A Guide to Tags and Tagging

March 11th, 2010 No comments

Modern websites and blogs often provide a feature called a ‘Tag Cloud’. It contains a series of words that are common across the site and sized according to how many times they are used. Larger words are more common, smaller ones less so.

When people initially start tagging they tend to use the wrong words and overuse the tags system to relate items together. This leads to a tag cloud that isn’t as useful as it could be. Read more…

Categories: Application Design Tags:

Jayrock – Converting to string and back

February 15th, 2010 No comments

I always seem to forget how to do this so I’m just leaving a note for myself :)

To convert to string:

Jayrock.Json.Conversion.JsonConvert.ExportToString([object]);

To convert back again

([object])Jayrock.Json.Conversion.JsonConvert.Import(typeof([object]), result);
Categories: Asp.Net, Javascript Tags:

CMS Update – Preparing for BETA!

February 4th, 2010 2 comments

It’s been a bit quite round here recently! Don’t be fooled! The CMS is more or less finished. Just refactoring and preparing bits and bobs.

The actual core itself hasn’t really changed in 6 months and is independent from the CMS, it handles all the page, content and control creation with a single base class that you can implement to create page renderers for any page type. Current renderers are the LiveEdit renderer, Content Block, File Include and Rss (Mobile next).

Read more…

Categories: Asp.Net, cms Tags:

Working with vague dates (90′s, Sept 2000 etc.)

December 16th, 2009 No comments

On a recent project I had to allow users to upload their memories. Memories are vague things and I had to enable users to upload and assign incomplete dates. They needed to be able to enter ‘The 90′s’ or ‘September 2000′ as well as complete dates ’1st Feb 2009′.

Read more…

Categories: c# Tags: