Buzz in Gmail Potential Issue

February 17th, 2010 Chris No comments

I don't know if this is just my account, but from the point that Google Buzz got integrated with my Gmail Account (6 days ago or so) Gmail hadn't collected any email from the main pop accounts I have it setup to retrieve from.

I've just forced a collection now and hopefully it'll all work going forwards, but I wonder if anyone else out there reading my blog has seen something similar...

Possibly the world’s best 500 Error Page

February 8th, 2010 Chris No comments

 Possibly the worlds best 500 Error PageNice One Qype :)

Qype 500 Error Page

Qype 500 Error Page

Categories: Uncategorized Tags:
 
 

Quite possibly THE most useful site(s) for cross browser testing (and fixing)

January 22nd, 2010 Chris No comments

http://spoon.net/browsers

Nuff said...

Actually while I'm on the topic (mainly of IE being an idiot)

http://code.google.com/p/ie7-js/

In addition, for up to date browser usage stats (and in theory the most correct stats):

http://www.w3schools.com/browsers/browsers_stats.asp

Categories: Web Development Tags: , , ,
 
 

Handling CType Data With SimpleXML in PHP

January 16th, 2010 Chris No comments

If you're new to SimpleXML then the output and representation of complex XML data produced by the library can be daunting and sometimes confusing, but once you're used to it, SimpleXML is a massively useful tool for processing XML information.

When debugging other people's implementations of simpleXML however, one of the biggest issues I come across time and again is the apparent loss of CType data from the processed feed.

Luckily this is very easily remedied, but not well documented so here's how to deal with it.

PHP 5.1.0 introduced the options parameter to functions such as simplexml_load_string() which allows you to specify additional paramters to Libxml the underlying library PHP uses to interpret XML.

The default Libxml setting ignores any data in CType blocks, but you can override this behaviour by passing the LIBXML_NOCDATA option to the function.

In other words, in cases where you might usually do this to load some xml data and not find the CType fields in the resulting object:

$xml = simplexml_load_string($feed);

Doing this instead, will allow the CType fields to be added to the object and used in your scripts where you need to

$xml = simplexml_load_string($feed, NULL, LIBXML_NOCDATA);

Unfortunately the options parameter is the 3rd in the list, and 9 times out of 10 the second option (which is the name that's given to the class containing the parsed xml) doesn't need to be changed/overridden so I personally choose to pass NULL in as the second option, though you can enter whatever you like here.

It's as easy as that  - I hope you found this note useful :)

Styling the The TinyMCE Text Area

January 4th, 2010 Chris No comments

They guys who produce TinyMCE suggest, when initialising the editor, that you set the content_css parameter to be the url to your site’s CSS, so that the content you type into the text area is styled in the same way as the rest of your site.

This is a great idea and works very well, but a lot of CSS layouts make use of various text positioning options which don’t really apply when translated to a wysiwyg editor, for example making the default alignment centred with no padding.

Thankfully you can get around all of this quite easily and add further custom styling to your editor’s textarea by adding the .mceContentBody style to the end of your site’s CSS file and specifying any further layout options in that.

For example the following css tells the editor in my app to always ensure the text alignment is left justified by default and give a 10 pixel padding to the textarea the editor’s being applied to so that the text that will be input by the user doesn’t squash up against any particular border of the text area itself:

.mceContentBody {
text-align: left;
padding: 10px;
}

Nice and simple really but not so easy to find quickly when searching on Google so I hope this helps someone else out there too!