• Client login
  • Work for us

All the latest from the team...

Wednesday, 6 May 2009

Super Preview from Microsoft

Microsoft has finally done a Chris Tarrant and given us all a lifeline with Super Preview... This handy little toy let's you test your webpages in multiple versions of Internet Explorer without all the hacks - and yes it does include IE8... We're testing it now so will update soon with our thoughts.

In the meantime check it out at the Microsoft Expression site and let us know your thoughts!

Labels: , , , , , , ,

Thursday, 9 April 2009

CSS coloured bullets in lists

We've been playing with some CSS and we've commonly used spans to colour bullets… i.e.


<li><span>red</span></li>

<style>
li{
color:black
}
li span{
color:red
}
</style>

Well we’ve come up with a better way all by accident whilst playing with expressions and here it is…

<li>red</li>

<style>
li{
color:black
}
li{
zoom: expression(
this.innerHTML = (typeof this.processed == "undefined" ? "" : "") + this.innerHTML, this.processed = true, this.runtimeStyle.zoom = "1"
);
}

li:before{
content:'• ';
color:red;
}
li span.before{
color:red;
}
</style>

Note that in the li:before the bullet should be a rendered • NOT character encoded.

Expression is for Internet Ignorer (nee Internet Explorer) and :before works for all other browsers.

this.processed is required or Internet Ignorer keeps on rendering them


Enjoy!


PS. Sorry it's been ages since our last post - but we've been very very busy people!!

Labels: , , , , ,

Monday, 23 February 2009

Connecting with the Flickr API through PHP

Here at Code Required we've been playing with a lot of the Social networking apps over the months... Years and have started to think about the potential of putting them all together and seeing what comes out the other end...

We'll be posting samples of what you can do here and would love you guys to post your samples too!

Anyway to kick off here's how to get a list of your photos from Flickr using the phpFlickr class:

$f = new phpFlickr("YOUR_API_KEY");
$i = 0;

// Find the NSID of the username inputted via the form
$person = $f->people_findByUsername('YOUR_USER_NAME');

// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($person['id']);

// Get the user's first 36 public photos
$photos = $f->people_getPublicPhotos($person['id'], NULL, 1, 8);

// Loop through the photos and output the html
foreach ((array)$photos['photos']['photo'] as $photo) {
echo "
<a href='".$f->buildPhotoURL($photo)."'>";
echo "<img width='43' style='margin:4px' border='0' alt='$photo[title]' ". //
>
"src='" . $f->buildPhotoURL($photo, "Square") . "' />";
echo "</a
>";
$i++;
// If it reaches the sixth photo, insert a line break
if ($i % 4 == 0) {
echo "
";
}
}


You can get your Flickr API key here and explore more cool stuff in the Flickr API Docs

Have fun!

Labels: , , , ,

Busy busy busy & our adventures with Google

Wow things have been hectic for me over at Code Required recently so apologies for the lack of posts since early December - ouch!

We've been doing some really cool stuff with the Google API recently and have spent several hours geeking out with the guys down at Google HQ in London - which has been great fun and a steep learnign curve for us!

We'll be publishing some articles on Google Apps, Google Sites and the Enterprise Search application in the next few months so watch this space! We must admit we're very very excited about the Google Sites stuff so suggest you all check it out and post your samples back here as we'd love to see what everyone is doing!

Anyway - we're still alive so watch this space!

Labels: , , , ,

Tuesday, 2 December 2008

ASP.net C# ordering files returned by GetFiles

A very quick post today to share a bit of a moan about ASP.net and the Directory.GetFiles Method which most of you will no doubt know only returns a list of files order alphabetically. Now whilst we've been developing a system for a client we've had the need to order by date last modified - which I'm sure is a common request for many of you reading this. Well with no further ado here is a very simple class so you can sort the array returned by the GetFiles method...

public class FilesDescendingComparer : IComparer
{
#region IComparer Members

public int Compare(object x, object y)
{
return DateTime.Compare(((FileInfo)y).CreationTime,((FileInfo)x).CreationTime);
}

#endregion
}

To invoke this method is very simple too...

Array.Sort(theFiles, new FilesDescendingComparer());

Where theFiles is the result of your GetFiles call.

Happy coding!

Labels: , , , , , , ,

Tuesday, 18 November 2008

More charity fundraising for Macmillan with the Amateur Transplants

Hi all, another unrelated topic I'm afraid but of infinitely more importance than the usual technical/marketing/seo/web stuff...

A friend of mine over at the Amateur Transplants has re-released a very funny, slightly explicit, song about the London Underground. He’s selling it on iTunes and ALL proceeds, yes 100%! is going to be donated to Macmillan Cancer Support (the same charity me and Pat chose to sponsor this year).

I know most of you have already given kindly to our sponsored parachute jump but just another 79p won’t hurt will it? Go on let’s help get it played on the radio and in the charts while saving money for a very worthy charity…

Buy it here

Labels: , , , , , , ,

Sunday, 2 November 2008

Open Source content publishing methods

Recently we've been exploring more open source CMS solutions and a couple of e-commerce sites have also come into the Code Required workflow.

We've looked at loads (I mean dozens and dozens of them!) and there simply are so many options we've decided to drop further development for Roots and start working on building components and extensions for some of the applications that already exist.

I mean... Why fix something that isn't broken? Our site currently runs with a combination of Blogger feeds (you're reading one now!) plus some static pages and some dynamic php stuff too... But we've been playing with WordPress recently and have started to be swayed from Blogger over to WordPress in fact we've also started to developed a few extensions for Wordpress already! We'll also be looking into some Dreamweaver plugins to add development of themes.

Most of you reading this also know of our preference to working in LAMP based systems - hence the mention of WordPress, Blogger and a couple of others we like in SilverStripe and Magento for commerce based sites but the Open Source solutions come in a mass array of formats - recently we've used DotNetNuke which is an ASP.net CMS solution... We've also been made aware of the rather exciting option of Umbraco recently.

We certainly won't write off commercial systems (Microsoft Sharepoint, for example, is often something that we are asked to develop on/for) but with so many great solutions out there why re-invent the wheel? Why waste time developing something when we can enhance an existing solution?

We'd love to hear more about your experiences with Open Source solutions so please email us and let us know of your experiences with any of the aforementioned or indeed an exciting new CMS you've been developing!! ;-)

Alternately if you are interested in hiring Code Required to work on your website, be it implementing a CMS, full ecommerce solution or just a spring clean do get in touch!

Labels: , , , , , , , ,

Monday, 22 September 2008

Google helps make your 404 pages more useful

Here at Code Required we're always trying to make the user experience the best it can possibly be for the sites we develop and we've just discovered Google's new custom 404 widget.

Basically this little snippet will analyse the url which returned the 404 and display close matches from Google's listings... Awesome - certainly saves us writing custom handlers and pattern matching for the urls!!

Check it out... Google's new custom 404 widget

Labels: , , ,

Tuesday, 16 September 2008

Internet Explorer and elements named "description"

OK I'm not entirely sure why I've never come across this before but it's a classic "Internet Ignorer" bug...

When doing Javascript validation on a form recently we had a field named (& id'ed) "description"

<textarea name="description" id="description"></textarea>

Subsequently we attempted to validate the value of this field in JavaScript...

if(document.getElementById("description").value!=""){...}

Well it turns out that this returns the meta description tag for Internet Ignorer ("undefined" for the value)... Marvellous! Well there is a workaround, either rename your field or, simply override the nativeGetElementById method for Internet Ignorer... Check out Sixteen Small Stones

Labels: , , , ,

Monday, 15 September 2008

Charity Skydive update: Thank you to everyone who sponsored us!

Well we've done it and we survived - so all those hoping that we didn't - tough!

We just want to say one big final thank you to everyone who sponsored us, to everyone at Headcorn Parachute Club in Kent and especially to everyone at MacMillan Cancer Support for all the great work they continue to do.

You can still sponsor us upto and including the 13th November 2008 so if you haven't... Do so now at http://www.justgiving.com/patandjon!

Finally if you fancy a laugh check out these links...
Jon's video on YouTube
Pat's video on YouTube
Pat's pictures on Flickr
Jon's pictures on Flickr

Now what can we do next time I wonder??? Mmmmm....
(ideas on a postcard please!)

Cheers
Pat & Jon

Labels: , , ,

Thursday, 14 August 2008

Code Required Summer Break

Please note that Code Required will not be accepting any new clients until 1st September due to developers on summer vacations and extremely busy workload for the interim period.

If however you would like us to tender for projects after that period please contact jon@coderequired.com.

Many thanks
Jon

Labels: , , ,

Monday, 11 August 2008

Code Required's Desktop RSS Reader

Hi Code Required fans... (All 2 of us according to Technorati but I'm sure more of you love reading our ramblers than that... Well I hope so anyway).

We've created a Yahoo Widget so you can view all the latest news and views from Code Required directly on your desktop.

You can download our desktop rss reader here

Labels: , , , , , ,

Semantic content: images with alt attributes vs plain text? The CONCLUSION

For any of you who have been tracking our quest to see if semantic markup truly does have an effect on natural search engine rankings we can confirm we now have a pretty concluisve set of results.

We ran three different versions of content: (H1/P are the tags used to mark headers)
  1. "Frank"
    (H1: image with alt and title)
  2. "Fred"
    (H1: as plain text)
  3. "Roger"
    (P: as plain text)
The analysis...
Roger was the clear loser on Google and failed to get indexed after initially ranking quite high (second to Fred for much of the experiment).

Roger was however the first to be indexed by Google, Yahoo AND Altavista. So if it's quick wins you want Roger is your man.

Frank ran a clear second to Fred for much of the experiment (not unsurprisingly and thankfully the suspected result).... HOWEVER... Over time it has proved pretty fairly conclusive that Frank and Fred had NO significant difference in ranking on Google.

In fact 2 of the 5 search engines completely ignored all of our pages so we cannot be entirely conclusive. Ask and Windows Live did not index ANY of the pages at ANY point throughout the 3 month experiment so clearly their algorithms rely more heavily on inlinking or natural spidering - of which none formed a part of our experiment.

The conclusions?
Well to be honest... Pretty unconvincing. It has to be said that at the time of writing (and when we closed the experiment) Frank (H1: image with alt and title) was the ONLY page naturally listed in Google's results.

Roger(P: as plain text) listed consistently best on Yahoo.

Frank & Fred had the most consistent results overall suggesting that, in our opinion, semantic content DOES make a difference. Although we are truly shocked that it didn't appear to make as much difference as we suspected, especially considering accessibility laws and the use of semantic tags to help screen reading browsers to navigate.

Our next experiment will be based around meta information in a quest to see how search engines actually use meta information and it's significance for companies trying to achieve high natural rankings in the major search engines.

So in our first experiment to uncover SEO secrets with "No bullsh*t just hard & fast evidence of what works best" proved pretty inconclusive... Sorry guys! :-)

Caveats to consider...
  1. Each page was given similar content (same volume of keywords completely irrelevant to what the test website was about and each other).
  2. Each page had no in-links from other sources except those that appeared in the Code Required blog (however we cannot account for links to the pages from other blogs etc - at the time of writing we were unaware of any and the pages have been removed from the test site)

Labels: , , , , ,

Monday, 4 August 2008

Note to clients r.e. Firefox 3

A few of our clients have been requesting support for Firefox 3 of late. Unfortunately our development standards do not currently permit development in FF3 due to some unforeseen bugs in the Beta release that Code Required have raised with the Mozilla development group.

Until we can confirm that these bugs are resolved we will not be supporting FF3.
(UPDATE: Please note that this refers to not just the Beta release FF3.0 but also to the release FF3.0.1 and is related to unpredictable and inconsistent browser crashes)

Labels: , , , ,

Wednesday, 16 July 2008

Code Required are proud to announce....

Code Required have just released a brand new corporate website for Verulas, an independent market data consultancy, at http://www.verulas.net.

Contrary to popular believe we do have design skills in-house and this site was designed, built in Strict XHTML & CSS and published completely by Code Required.

If you're interested in contacting code required for design or development work please email jon@coderequired.com or visit our contact us page.

Thursday, 3 July 2008

What do you mean you can't get me to rank #1??

One question that always comes up when people ask about SEO (search engine optimisation) services is "does that mean I'll rank number one on Google?... But Company X said they'd guarantee they could get me to number 1".

You've all heard it right? Well the guys at Google have further updated the Webmaster Blog post:
"What's an SEO? Does Google recommend working with companies that offer to make my site Google-friendly?"

I really do urge that anyone offering SEO services and equally anyone looking for SEO services should look at this article NOW!

Labels: , , ,

Friday, 20 June 2008

Help us raise money for Macmillan Cancer Support

OK a slightly out of context post today but one for a very valid and worthwhile cause so if you don't like it - tough! :-)

Jon (the founder of Code Required) and a friend Pat Fahy (of Sonaa fame) are doing a parachute jump from 12,000ft in an attempt to raise money for Macmillan Cancer Support a charity very close to both of our hearts and I'm sure many of you reading this if you have ever experienced the devastating effects that cancer can cause not only to the sufferer but to the friends and family as well.

Therefore it'd be great if you could sponsor us (even just a few pence will make a difference) at http://www.justgiving.com/patandjon

Thanks so much for your support!

Labels: , , , , , , , ,

Wednesday, 11 June 2008

Semantic content: images with alt attributes vs plain text? Part 2

OK so interesting results from our little test case... Although it looks like Google is certainly acting as expected for natural rankings with the way we markup content we've had some interesting results from the other guys at Yahoo & Altavista where it looks as though our mate Roger (un-sematic plain text content) is certainly leading the way!!

Page namePosition
GoogleYahooAltavistaAskLive/MSN
Frank
(H1: image with alt and title)
3n/an/an/an/a
Fred
(H1: as plain text)
1n/an/an/an/a
Roger
(P: as plain text)
222n/an/a


I must say - I'm a bit concerned by these results as it certainly doesn't bode well for the way we've been told we "should" code so often!

Watch this space for further updates!! Feel free to drop Jon an email if you want to see more comparisons.

You can see the pages at:
http://www.mycardioworld.com/tests/frank.html
(header as image with alt and title attributes)

http://www.mycardioworld.com/tests/fred.html
(everything as plain text)

and...
http://www.mycardioworld.com/tests/roger.html
("un-semantic" plain text)

Labels: , , , , , , ,

Friday, 30 May 2008

Semantic content: images with alt attributes vs plain text?

One of the big arguments I constantly have about SEO is whether semantic content as images (with appropriate alt text) or simple text values will rank differently.

For example - which is better for SEO?

<h1>header</h1>

Or...

<h1><img src="header.gif" alt="header" /></h1>

...And does the H1 tag actually make a difference?

<p>header</p>

Not surprisingly it's an incredibly difficult subject to find any solution for so here at Code Required we're currently running a simple test to see what happens...

You can see the pages at:
http://www.mycardioworld.com/tests/frank.html
(header as image with alt and title attributes)

http://www.mycardioworld.com/tests/fred.html
(everything as plain text)

and...
http://www.mycardioworld.com/tests/roger.html
("un-semantic" plain text)

We'll be monitoring the situation over the coming weeks on all the major search engines and posting updates here - in the meantime if you would like us to add other versions or have any comments please drop Jon an email.(For example should we do a sIfr version? should we do a version without title attributes on the images? etc).

Page namePosition
GoogleYahooAltavistaAskLive/MSN
Frank
(H1: image with alt and title)
1n/an/an/an/a
Fred
(H1: as plain text)
2n/an/an/an/a
Roger
(P: as plain text)
n/an/an/an/an/a

Labels: , , , , , , ,

Friday, 16 May 2008

Quite possibly the best CSS "hack" I've ever used...

After a good couple of days banging my head against the desk trying to figure out a solution to a Windows Safari "bug" I think I may have found the best CSS "hack" ever...

Ever wondered why Safari renders fonts bolder than all other browsers on Windows? Well it's down to a setting hidden away in the preferences dialog shown below:



Which is great if you can control everyone's install of Safari but, well let's face it - you can't. Which left me with the dilema... how the hell do I get the headers on my website to render as expected in Safari? Well fear not - just add the following line to your css:

text-shadow: 0 0 0 #FFF;

Where #FFF is whatever the background colour your text appears on and voila Safari's nasty aliasing "bug" has vanished!

Labels: , , , , , ,

Tuesday, 13 May 2008

Social networking for SEO... the next big thing?

We all know the huge benefits of social networking when it comes to SEO - there is no better way to get new visitors than those on recommendations from existing customers... I mean you're hitting your target audience without even trying.

Social Networking and content sharing have rapidly become the de facto standard in marketing on the web well Google might have just taken that to a whole new level with Google Friend Connect.

Still in a preview release (ie. not even beta yet) it's pretty exciting stuff and I strongly suggest you check out Mussie Shore's (he's the project manager) post on the Google Webmaster Central Blog entitled "Becoming Social".

Google Friend Connect let's you interact with users on social networking site such as Facebook and invite them to check out the website, post directly to their diaries etc and invite their friends - potentially increasing your audience virally with minimal effort... According to Mussie Shore you only need to know very little coding to get going in minutes!

Labels: , , , , , ,

Wednesday, 30 April 2008

Google's use of Meta tags... The debate goes on...

So we've all heard how Googlebot no longer uses meta description or meta keyword tags to index your webpages in it's SERPS listings; and how it uses the actual page content to evaluate the "PageRank" etc... Well with that in mind many web developers/agencies/SEO "experts" often neglect to include meta tags in today's market... Well think again!

A recent post on the Offical Google Wemaster Central Blog explains how Google DOES use meta tags (well the meta description tag at least). Now, although this may or may not have an impact (our research shows that it most certainly does have an impact) on your actual positioning as such, it certainly can have a huge effect on your links "clickability".

The post explains how the meta description data is used to support the link so people can determine if it's your content they were actually looking for... Therefore, our research certainly indicates, that as more people visit your site, Google increases it's importance... Thus how you sell your content in the meta description tag must have an impact on your SERPS positioning.

Labels: , , , , , ,

Tuesday, 29 April 2008

Pure CSS headers as gradients?

Just a quick one (ooo-argh missus) to share this great post I found on Web Designer Wall for doing CSS headers with a graident effect. Ok, granted, it's not exactly a new technique but it's a really nicely written tutorial for all you CSS newbies and some nice ideas for those of you who have been doing this stuff for years (scroll down to see the examples).

Check it out at http://www.webdesignerwall.com/tutorials/css-gradient-text-effect/

Cheers
Jon

Labels: , , ,

Monday, 21 April 2008

Introducting RootsCMS...

We've been busy beavering away over the last few weeks (hence the lack of posts!) building our new CMS system - RootsCMS...

Built around the Smarty template engine RootsCMS is intended as a very simple and easy to plugin content management system - in fact anyone with basic HTML knowledge can plug RootsCMS into their website within minutes - it really is that simple!

Many commercial CMS applications are either incredibly expensive to licence or incredibly complicated to to integrate into an existing website - this is the barrier we are striving to overcome with RootsCMS - think Adobe Contribute but without the delays of FTP uploads - RootsCMS runs on the back of your web server on a simple sql-driven database (whatever you have available).

RootsCMS is no slower than executing a basic PHP request!

With the use of the Smarty templating system the overheads are also minimal - the majority of CMS systems compile each page request as it's made - not RootsCMS...

On publication of a page RootsCMS compiles the template with the content updates and caches the result so the end user only ever receives the final compiled version - which means very simple archiving of content for: rollbacks; archiving; or even event based content publication.

RootsCMS is currently in user testing on a couple of websites but it currently publishes to XML, XHTML, HTML, CSS & PHP (we'll also be porting it to other languages when we have a stable version to release for beta testing). RootsCMS uses a WYSIWYG editor for ease of use for site editors and can be customised to use your favourite editor... TinyMCE, FCKEditor... Whatever you prefer.

Anyway we'll be releasing updates over the coming months and hopefully we'll have a release for you to try in the next couple of months!



*RootsCMS is in the early stages of development but we appreciate any comments people have on content management systems they have had issues with (so we can make RootsCMS even better), people interested in seeing it ported to other platforms etc etc... Basically if you have something to say - email us

Labels: , , ,

Tuesday, 8 April 2008

Code Required are proud to announce....

Code Required have just launched a brand new promotional website for the cult band "The Amateur Transplants" at http://www.amateurtransplants.net.

Built using Adobe Flash along with the crazy opinions and copy from Adam Kay & Suman Biswas this was a great project to work on and we wish the guys all the best with the new site and integrated newsletter tool.

Keep up the good work guys and we'll see you soon for beers!

The Amateur Transplants are responsible for cult classics such as the London Underground Song and The Menstrual Rag both of which can be heard on the site via the DocPod. Check out their blog at http://fitnesstoblog.blogspot.com

Labels: , , , ,

Monday, 31 March 2008

Keywords and copywriting for SEO

I'm often asked to evaluate copy for the web after writing my article on "Writing Effective Website Content for SEO" and one of the key issues that always crops up is - how do I know what keywords to target? I mean how do I actually know what my users are searching for?

Well this is a tough one, no doubt about that, but there are tools to help you out... Such as Google Adword's Keyword Tool which gives you stats on terms used in your site (or on a descriptive term you supply to it). This will enable you to determine what keywords users are searching for; but, more importantly, which keywords are relevant to your site without much competition. Therefore you can really target keywords your competitors might not be using but potential customers are.

Another wonderful site is Word Tracker. They really know their stuff and write great articles to help you with your copywriting - which are provided for free.

The key for me though is what to do before your site goes live...

I'm a strong believer in that fact that good SEO is actually free. Writing good semantic code and filling it with well written copy is going to be much more effective than paying people to advertise your site for you. Interesting content attracts interested users - and those are the ones you want!

A couple of my sneaky little tips that I find really help with SEO are:

Everyone knows the importance of shared/syndicated content these days... With the likes of Digg, and other community sites, sharing content has never been bigger for the SEO fanatic among us but what have they taught us? And why has no-one caught on yet??

Intelligent site searches: let's face it a user comes to your website and can't find what they are looking for... They use the search and (hopefully) they find it. What most people don't do however is actually analyse what people put into their searches. Simply by doing this you can get a sneak preview inside your users' head. For example 100 people searched for "mobile technology"... Great so now I know I need to focus on those keywords more in the content I write and use those keywords in links to those articles... Simple and yet very very effective.

Content tagging & tag clouds: I adore this little classic that came from the (marketing buzzword) Web 2.0 "phenomenon". What better way to get an insight into what people are looking for than community based content tagging? Why oh why is this such a neglected feature in e-commerce solutions I shall never know - I mean WAKE UP users tagging your products with search terms??? What could be better than that!

Labels: , , , , , , , ,

Wednesday, 19 March 2008

ASP.net 2 and the infamous Response.Redirect method

OK any of you working with a CMS system based on ASP.net which utilises the Response.Redirect method to handle links will undoubtedly have come across this issue - those of you using ASP.net in general and considering using Response.Redirect should also read on...

Response.Redirect makes a round trip to the server and returns a 302 redirect in the headers. Now if you're in anyway concered about SEO you'll know that the majority of search engine bots won't follow 302 redirects (temporary redirects).

I actually came across this after monitoring Google on a DotNetNuke project which utitlises the LinkClick method (which pretty much handles all links in the TEXT/HTML module). So I know that any links to LinkClick.aspx?xxxx&yyyyy will return 302 redirects before going onto my real "seo-freindly" url... Which of course is a BIG problem.

Well after badgering around for what seems like weeks (but is probaly only a few minutes) I began to think about the global.asax file and how it handles requests.

I know there is the Application_PreSendRequestHeaders (which is processed just before we bat the response headers back to the client) so this seems like an appropriate place to check and rewrite the headers and this is actually quite a simple piece of code...

Sub Application_PreSendRequestHeaders(ByVal sender As Object, ByVal e As EventArgs)
If Response.StatusCode = 302 Then
Response.StatusCode = 301
End If
End Sub

Obviously you'll want to be specific in your catchment but you get the idea. I tested this with LiveHTTPHeaders and it seems to have the desired affect - a 301 redirect. I'll let you know if Google likes it after Mr. Google-bot has come back to see my client's site. IN the meantime if your desired affect is to redirect to another file on your server I'd suggest you use the Server.transfer() method which doesn't make the round trip to the server.

Also check out Matt Cutts blog article about this very issue

Labels: , , , , , , , ,

Thursday, 13 March 2008

DNN setting the date format for the calendar control

Having recently been frustrated by the lack of support in DNN to change the format of dates (yes I know about the web.config setting and yes I know about the built in language settings - it still didn't work when using DataSprings DynamicForms module which otherwise is simply superb).

Anyway if you're experiencing the same issues that we did then there is a simple solution.

In the "js" folder you'll find a file named "PopupCalendar.js".

I won't bore you with the various ways in which you customise the look and feel but if you need to change the date format (in my case to the United Kingdom dd/mm/yyyy) here's how...

Simply scroll down until you find the lines:

//default localized short date format if not provided
if (popCalDstFmt == "")
popCalDstFmt = "m/d/yyyy";

This is where the date format is set if you didn't pre-specify a format on the call to the popupCal method.

You can simply override this by adding the following line straight after this function... In our case:

//force UK date format
popCalDstFmt = "d/M/yyyy";

...and voila you're ready to rock and roll!

Hope this helps some other frustrated developers!

Cheers
Jon

Labels: , , , , ,

Wednesday, 12 March 2008

Royalty free stock images - Introducing Fotolia

One of the things us web development people always struggle with, especially on smaller, low-budget projects, is where to get stock photogrpahy from. Often places like Getty Images or organising a bespoke shoot are simply too expensive for low budget sites so you either have to source your own images, use the client's, often limited back catalogue or the new(ish) era of social networking - community royalty free sites...

Our old favourite used to be istockphoto but, in years gone by they had quite a limited stock - not any more however as they recently relaunched with video and flash animation - they are definately worth a look!

However we've just come across Fotolia. These guys seem to have taken the whole social networking "file-sharing" idea to a completely new level and allow users to make money from their own images by simply uploading them to the Fotolia catalogue... Great I hear you cry - "I can make some dough"... Well yes and if you are looking for an image for a low budget site this site has a rapidly growing portfolio which, being based on the old community upload is likely to get massive... Huge! In the immenent future.

Check 'em out at http://www.fotolia.com/

Labels: , , , , , , , ,

Thursday, 6 March 2008

Adding a logout link to the control panel in DNN

DotNetNuke is a great tool but because it's written by developers sometimes basic GUI options have been omitted. One of these is adding a logout button the control panel - especially if you don't want a login/out link on your main webpages!

It's actually really simple to do this just navigate to the "admin/ControlPanel" directory of your site.

There are two different control panels: "iconbar" and "classic" just open up the Web Control that represents the one you are using: classic.ascx or iconbar.ascx.

Next you'll need to register the DNN:Login tag and associate it with the "Login" Control. To do this add the following line under the control declaration so your file will look like this:

<%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.ControlPanels.IconBar" CodeFile="IconBar.ascx.vb" %>
<%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %>

Then to add the link itself just add the line:
<dnn:login runat="server" id="dnnLOGIN">

...Wherever you would like the link displayed... Simple!

Here's an example file for you to download: iconbar.zip

Labels: , , , ,

Tuesday, 4 March 2008

Code Required launches our bookshop online!

That's right with the help of our friend's over at Amazon we've gone all ecommerce and added a list of our favourite books onto the website so you can see which books we use and grab them for yourselves!

The store is based on Amazon's store and uses their checkout too so you even get the knowledge that you're shopping safely and securely with one of the World's leading bookshops!

Check it out at: http://www.coderequired.com/bookshop/

Labels: , , ,

Saturday, 1 March 2008

Telling search engines where your sitemap is...

Those of you interested in SEO really need to get to grips with the sitemap:url line in your robots file... The what? I hear you cry... Well let me explain.

For a long time now there has been an accepted protocol for sitemaps that many of the top search engines have adopted (check out: http://www.sitemaps.org/ for more info) but it's always been a bit of a headache going to each of the big search engines and telling them about your sitemap so that robots can index it right?

Well Google introduced the Webmaster Tools dialogue so that you could tell Google where your sitemap was and use it's tools to evaluate any crawl errors (404s etc). Well there is a really really simple way to tell all of the "big four" (namely Microsoft, Yahoo, Google and Ask).

All you need to do is add one line to your robots.txt file and those search engines will find it. So what's the line?

Simply:

sitemap:<url>

Where <url> is the URL of your sitemap file. In our case:

sitemap:http://www.coderequired.com/sitemap.xml

Still not sure? Check out sitemap.org's Informing search engine crawlers article

Labels: , , , , , ,

Friday, 29 February 2008

LiveHTTPHeaders Firefox Plugin

We just stumbled across a great Firefox plugin called LiveHTTPHeaders

What this wonderful tool (which appears in the Firefox sidebar) shows is all the HTTP headers returned from the server when you request a page... So if you're page is calling a file that doesn't exist or an image that's been deleted for example you can quickly see those nasty 404 errors and rectify them!

So, if you're a developer, and SEO guru or just a bit of a geek like us then pop on over to the Firefox add-ons page and grab yourself LiveHTTPHeaders.

Labels: , , , ,

Thursday, 28 February 2008

Integrating site searches

A common query for a lot of websites we build is "can we have a search site function?". As advocates of making the web as usable as possible and subsequently the sites we build as near as damn it to perfect (pending our client's spec's of course ;-)) we're all behind this concept but what if you're simply building a basic website, maybe one without a CMS, or a simple CMS system that doesn't use a database, to index content?

We've built several of these sites as you can well imagine and it's often led to bespoke search apps built or for those less "corporate" minded clients Google's Search API more than suffices but to seemlessly integrate it into your sites costs the client money... Which we all know they don't like to part with - so what are the alternatives?

Paid search solutions are everywhere - just whack "site search" into Google and there are hundreds - for the record we think PicoSearch is one of the better ones - but what about free solutions?

Well on our previous Code Required site we used KSearch which was great but pretty complicated to setup - especially on shared servers when you may not know your perl or site roots without some pretty indepth investigation.

Anyway, before I bore you all to death, we're loving our latest find, it's free, simple to integrate and even comes with a setup installer (which we didn't try ourselves as we went for the more laborious manual approach)... Damn it get on with it... It's called "Perlfect Search" from Perlfect Solutions.

So why do we love it so? Well number one it's free; two: easy to integrate; and three: easy to customise.

The biggest draw for us though was many of these free Perl search scripts scan the WHOLE of your documents so you'll get unrealistic search results. For example, let's say, you have a global navigation included in all your documents with leywords in (not uncommon right?) then this will get indexed.

Perlfect Search is different - by simply adding some basic comment tags aroound blogs of code you want the indexer to ignore you get pretty accurate results to your searches.

For those who, like us, couldn't find these tags or advice on how to implement them simply surround the blocks of code you want Perlfect Search to ignore with:

<!--ignore_perlfect_search-->

and

<!--/ignore_perlfect_search-->

...That's it!

Nice one Perlfect!

Labels: , , , , , , , ,

Wednesday, 27 February 2008

Adobe Contribute CS3 content management system

So we finally got round to building a site in Adobe Contribute CS3 at long last... So what's the verdict?

Well let's face it not much has changed in the latest version of Contribute... You still use Dreamwever templates to manage content but with the new support of CSS* and web standards developing, a Contribute managed website, is how can we say it? A lot more "ethical".

Another great feature is the support for blog posting directly from the Contribute user interface so that you only need to train users on one system. Currently this supports Blogger.com, Wordpress and Typad - although in theory you can add any blog server we've only tested these three (in fact this post was created in Contribute and posted directly to our blog which utilises Blogger.com in case you didn't already know).

Anyway the point is that if you're looking for an expensive, user friendly CMS for your site - this is definately worth a look. We've built big corporate sites based on DotNetNuke and Drupal in the last few months but for the more basic sites (i.e. no commerce) Adobe Contribute is definately up there with those guys.

We'll let you know as and when we play and discover more exciting features but if you're looking for something cheap, effective and reliable for a "non-dynamic" site - look no further as Adobe Contribute is the best we've worked with so far.

* CSS-wise: We've noticed a few unexpected bugs with floats and absolute layouts that we are looking to find solutions too so if we find any solutions we'll be sure to let you know on here as soon as we do.

Labels: , , , , , , , , , ,

Thursday, 14 February 2008

ASP.net ButtonClick events not fired when "Enter" is hit?

In Internet Ignorer (AKA Internet Explorer for you purists)... You know that browser by MICROSOFT? The same dudes who came up with ASP.net? You may have noticed that a form submittal event that is fired by the enter key doesn't call the form's _Click event.

This only happens with a single TextBox control for example the code below:


<form runat="server">
Name: <asp:TextBox runat="server" id="txtField" />
<asp:Button runat="server" Text="Go" />
</form>


Internet Ignorer does not pass the submit button's name/value pair in the post. Therefore the ASP.net engine can't determine what control fired the postback event and therefore can't fire the appropriate Click event.

To get round this simply add another TextBox control to your form for example:


<form runat="server">
Name: <asp:TextBox runat="server" id="txtField" />
<asp:Button runat="server" Text="Go" />
</form>
>asp:TextBox runat="server" style="display:none;" /<


For some strange reason INternet Ignorer now decides to send the name value pairs along to the post event.

Yet ANOTHER workaround for a Microsoft product... When using a Microsoft technology... Does it get worse than this? :-)

Labels: , , , , , , , ,