<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.suburban-glory.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Suburban Glory</title>
<link>http://www.suburban-glory.com</link>
<description>The blog of London-based web coder Andy Walpole. Covers both front and backend development.</description>
<language>en</language>
<item>
<title><![CDATA[Books that helped me become a professional web developer]]></title>
<link>http://www.suburban-glory.com/blog?page=179</link>
<description><![CDATA[<p>I've been working full-time as a web developer since 2009, previously creating my first website with Microsoft's Frontpage in 2002 (remember that?!).</p>

<p>Apart from a taking a few modules on an Open University course, I've gained 99% of my skills autodidactically.</p>

<p>To do this I followed a total immersion method to the knowledge I sought to gain. This means sucking up information from any source: blogs, video tutorials, forums and books.</p>

<p>As I write this article, on a bookshelf to my left are over 30 web design books that I have bought over the years. Not all of them were rewarding purchases, but I consider some to be worth their weight in gold. Below I list the best of them.</p>

<h3>JavaScript</h3>

<p>Like many developers, I came to JavaScript after first learning PHP. There are many hurdles to jump over, but if you persevere you will come to love this programming language.</p>

<p>At first, it's minimal number of inbuilt methods stand in contrast to thousands of PHP functions. Initially, being used to accessing a catalogue of high-level functions, this can seem alarming, but you soon realise that this is liberating: you don't have to wade through countless inconsistently named functions like in PHP.</p>

<p>Secondly, differences in implementation between the current and legacy browsers makes CSS broswer quarks look minor in comparison. Thankfully, IE7 and IE8 are declining, but there is still a way to go yet.</p>

<p>Also, it is a rapidly expanding language, not just with EMCA Script 5 and 6; but also JavaScript libraries, frameworks, browser advances, template systems, command line tools and unit testing. No other contemporary programming language has such a dynamic userbase.</p>

<p>A handful of books are responsible for taking my JavaScript skills to a higher level.</p>

<p><strong>John Ressig: Pro JavaScript Techniques (Apress, 2006)</strong></p>

<p><img class="left" alt="Pro JavaScript Techniques" src="http://www.suburban-glory.com/images/pro-javascript-techniques.jpg" /></p>

<p>Ressig is most commonly known as the inventor of jQuery. It's impossible to underestimate the impact of this library on front-end development. <em>Pro JavaScript Techniques</em> covers a number of areas that will assist you in writing clean, maintainable code. Subjects covered include object-orientated basics, DOM and CSS interaction, reusable code and events. Written at a time when Internet Explorer  6 and 7 where still dominant, it fully details the differences between these browser and the W3C approach. Unfortunately, these are aspects of JavaScript that we still need to be familiar with today. Few would disagree that John Ressig is a key JavaScript face, so buy this book and then ingest and implement his knowledge. It's a book in which that you will always find new information no matter how many times you read it.</p>

<p><strong>Ross Harmes &amp; Dusin Diaz: Pro JavaScript Design Patterns (Apress, 2008)</strong></p>

<p><img class="left" alt="Pro JavaScript Design Patterns" src="http://www.suburban-glory.com/images/pro-javascript-design-patterns.jpg" /></p>

<p>More than in any other language, using design patterns in JavaScript is essential. If you write over 200 lines of procedural code it will become an unmaintainable mess.</p>

<p>Reading this book was for me the equivalent of lighting a flare in a dark room.</p>

<p>In 269 pages it details dozens of ways in which you can organise your code so that is is extendable and readable.</p>

<p>Because it is a prototypal language there are no classes in JavaScript, but there are ways of mimicking the features of classical inheritance with public, protected and private methods; creating mixin classes and interface emulation. Diaz and Harmes detail all these approaches plus provide a chapter for each commonly used design pattern like singletons, modules, composites, decorators and observers. It's impossible to use this book to fully understand established programming patterns because the subject matter is too complex even for a publication as well written as this. But I can guarantee that it will point you towards the right direction to coding perfection.</p>

<p>Since 2008, ECMA5 Script has introduced new properties like Object.create, Object.preventExtensions and Object.defineProperties to help in handling JavaScript objects. This book doesn't cover EMCA5 additions so I would recommend Addy Osmani's <em>JavaScript Design Patters (2012, O'Reilly)</em> as a compliment to <em>Pro JavaScript Design Patterns</em>.</p>

<p><strong>Peter-Paul Koch: pkk on JavaScript (2007, Voices That Matter)</strong></p>

<p>More basic in subject matter than the previous two books, <em>pkk on JavaScript</em> is an easy-to-read digest of the scripts basics. I bet there are few professional coders who could succinctly describe the theory behind event bubbling and capturing, but Koch makes a reasonable stab at it. If you are a mid-level JavaScript coder you may presume you have full knowledge of the basics like data types, strings, booleans, control structures or functions. If so then perhaps <em>pkk on JavaScript</em> will surprise you by filling some previously unknown gaps in your knowledge.</p>

<h3>Performance</h3>

<p><strong>Steve Souders: High Performance Web Sites / Even Faster Web Sites (2007 and 2009, O'Reilly)</strong></p>

<p><img class="left" alt="High Performance Web Sites" src="http://www.suburban-glory.com/images/high-performance-web-sites.jpg" /></p>

<p>Steve's opinions on website performance carries more weight than anybody else on the subject. <em>Even Faster Web Sites</em> and in particular its predecessor <em>High Performance Web Sites</em> are landmarks in this discipline. In the pre-broadband era performance considerations were everything. As internet speeds were slow, optimisation techniques to decrease page sizes were paramount. As broadband usage proliferated, web designers brushed these concerns aside. There two publications reminded everybody that web site performance was still paramount in achieving a satisfactory user experience which in turn directly benefited the commercial aims that the web site was built for.</p>

<p>Much of what we take as standard today – minification, placing scripts at in the footer and using Content Delivery Networks – were first popularised by Steve Souders. But this book is no mere polemical piece. It's strength lies in the research that provides data to back up his argument.</p>

<p>Over the last five years browsers have dramatically improved their ability to handle JavaScript, so some of the information in these books is dated. However, a useful companion is perhaps the more recent <em>Professional Website Performance</em> by Peter Smith (2012, Wrox).</p>

<h3>Wordpress</h3>

<p><strong>Brad Williams, David Damstra, Hal Stern: Professional Wordpress Design and Development (2010, Wiley) / Brad Williams, Ozh Richard, Justin Tadlock: Professional Wordpress Plugin Development (2011, Wiley)</strong></p>

<p><img class="left" alt="Professional Wordpress Plugin Development book" src="http://www.suburban-glory.com/images/professional-wordpress-plugin-development.jpg" /></p>

<p>If you want to understand Wordpress theme and plugin development then these two books are indispensable. Clear, concise and brimming with quality advice, no other current Wordpress guides are as worthy a purchase as these two. They provide a role of both tutorial and reference books.</p>

<p>Wordpress has a loose API, meaning that the code in the tens of thousands of themes and plugins can vary wildly. Actions, hooks, APIs, coding standards, database queries and native helper functions are not comprehensively covered (I'm still waiting for that book), but the chapters do provide the developer a solid foundation for writing quality code.</p>

<p>Like most Open Source projects the official codex is limited and take extreme care when consulting blog articles on Wordpress development: they are often written by those with only limited experience of the platform and PHP.</p>

<p>At least with these two publications you can be confident that you will be provided accurate explanations about fundamental Wordpress PHP essential to every theme and plugin build.</p>

<h3>Drupal</h3>

<p>Over ten years old now it's fantastic to watch how Drupal has progressed from being a tool written by and for developers to one that aims to reach a wider user base. Starting from Drupal 6, new versions have incrementally improved the Content Management System into being one of the most robust and exciting Open Source projects on the net. </p>

<p>However, the entry point for Drupal development – both for themes and modules – is steeper than Wordpress, which is why having books at hand to assist your learning is essential.</p>

<p><strong>Matt Butcher, Matt Farina, Ken Rickard, Greg Dunlap, Larry Garfield, John Albin Wilkins: Drupal 7 Module Development (2010, Packt Publishing)</strong></p>

<p><img class="left" alt="Drupal 7 Module Development" src="http://www.suburban-glory.com/images/drupal-module-development.jpg" /></p>

<p>Of all the web design publishing houses, Packt is the one to me be most wary of. Expensive to buy, more often than not their books only offer lightweight guides to their respective subject matters.</p>

<p><em>Drupal 7 Module Development</em> is an above average Packt book which offers the reader a good introduction to Drupal plugin creation. While themeing in Drupal 7 can be insanely frustrating, the plugin APIs are, mostly, a joy to work with. Their form building API is probably the best I have ever used. Unlike Wordpress, Drupal has a strict API which intentionally leaves little room for idiosyncratic coding. If you want to build up a repository of trusted third-party modules then this approach is essential. </p>

<p>There is enough detail in <em>Drupal 7 Module Development</em> to provide you with grounding in Drupal PHP basics: hooks, APIs and architecture overview. </p>

<p><strong>Todd Tomlinson and John K. VanDyk: Pro Drupal 7 Development (2010, Apress)</strong></p>

<p><img class="left" alt="Pro Drupal 7 Development" src="http://www.suburban-glory.com/images/pro-drupal-7-development.jpg" /></p>

<p>While <em>Drupal 7 Module Development</em> is a good starting point, <em>Pro Drupal 7 Development</em> is a 688 page bible that you will need close at hand if you really want to understand Drupal code.</p>

<p>Almost without fail I've found Apress to be a quality publisher of web design and programming books. I read a criticism that <em>Pro HTML5 Accessibility</em> (another informative Apress read on my shelf) is let down by its basic design. Come on! Developers buy books for the quality of its content not to look at pretty pictures and avant-garde typefaces.</p>

<h3>PHP &amp; CSS</h3>

<p>There are no books in my collection for PHP and CSS that I would consider important enough to praise here.</p>

<p>I have the obligatory <em>PHP 6 and MySQL 5</em> / <em>PHP 5 Advanced</em> by Larry Ullman that every novice buys, and <em>PHP Master</em> by Lorna Mitchell which covers design patterns, security and performance, but most of my knowledge of PHP came through incessant practising. </p>

<p>I've build both countless Drupal and Wordpress themes, created my own Content Management System and authored a Wordpress plugin called Affiliate Hoover that used MVC (and with a Drupal port); amongst much else. Writing code for a purpose is far more inspiring than just coding for the sake of it. The official PHP documentation and blog articles were vital in my understanding of the best way to write this programming language.</p>

<p>It's the same with CSS: practice, practice, practise. For a long time (even now), I tried to add some code or method that I had never used before with every website build.</p>

<p>For both CSS and PHP the Sitepoint forum users provided a lot of advice when I became stuck.</p>

<h3>Conclusion</h3>

<p>There is no one source of knowledge for any one web technology. Although I would strongly recommend that you get hold of a quality book before you start learning a new one. These can provide both a guide and they can be used as a reference.</p>

<p>But don't just depend on a book. Join and take part in forums, write down your own discoveries on a blog, use Twitter to keep up to date on the latest news, use an RSS reader to follow web design blogs and publications, read net magazine, bookmark articles of interest in Delicious, go to local tech meetups, and, if you can afford it, go to web design conferences.</p>

<p>Web development isn't a job, it's a way of life. It's not something that you do from 9-5, Monday to Friday and then switch off from the rest of the time. If that isn't what you want, look for another career; take the blue pill instead.
</p>]]></description>
 <pubDate>2013-06-18T06:38:04Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">179 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using __autoload() in your Object Orientated Wordpress plugin]]></title>
<link>http://www.suburban-glory.com/blog?page=178</link>
<description><![CDATA[<p>These days autoloading PHP classes is the industry standard and if you write your plugins using Object Oriented code then you should look to using it too.</p>

<p>I've just re-factored my <a href="http://wordpress.org/extend/plugins/affiliate-hoover/">Affiliate Hoover plugin</a> into an MVC pattern, and rather than calling each of the two dozen files with require_once() I used the __autoload() function.</p>

<p>If a class is called in a file then PHP will automatically use the __autoload() function to load the file. In order for this to work the class name has to be the same as the file name, ie a class of My_Wordpress has to be in a file called My_Wordpress.php.</p>

<p>The first part requires using set_include_path() to include all directories where the php files might be found:</p>

<pre>

$paths = array(
    AH_PLUGINNAME_PATH.AH_First_LIBS.AH_DS,
    AH_PLUGINNAME_PATH.AH_First_CONTROLLER.AH_DS,
    AH_PLUGINNAME_PATH.AH_First_VIEW.AH_DS,
    AH_PLUGINNAME_PATH.AH_First_MODEL.AH_DS,
    get_include_path(),
    );

set_include_path(implode(PATH_SEPARATOR, $paths));

</pre>

<p>The constants were previously defined in a different file:</p>

<pre>

!defined('AH_DS') ? define('AH_DS', DIRECTORY_SEPARATOR) : die("AH_DS already defined: $xyze");
!defined('AH_PLUGINNAME_PATH') ? define('AH_PLUGINNAME_PATH', plugin_dir_path(__FILE__)) : die("AH_PLUGINNAME_PATH already defined: $xyze");
!defined('AH_First_MODEL') ? define('AH_First_MODEL', 'model') : die("AH_First_MODEL CONSTANT already defined: $xyze");
!defined('AH_First_CONTROLLER') ? define('AH_First_CONTROLLER', 'controller') : die("AH_First_CONTROLLER CONSTANT already defined: $xyze");
!defined('AH_First_VIEW') ? define('AH_First_VIEW', 'view') : die("AH_First_VIEW CONSTANT already defined: $xyze");
!defined('AH_First_LIBS') ? define('AH_First_LIBS', 'libs') : die("AH_First_LIBS CONSTANT already defined: $xyze");

</pre>

<p>The __autoload() function is as follow:</p>

<pre>

function __autoload($classname) {

    $file = $classname.'.php';
    
    if (stristr(dirname(stream_resolve_include_path($file)), plugin_basename(__DIR__ ))) {
    
        if (file_exists(stream_resolve_include_path($file)) &amp;&amp; is_file(stream_resolve_include_path($file))) {
            
            @require_once($file);

        }

    }

}

</pre>

<p>If the directory plugin name is found in the path of the class then it checks whether it exists and includes it with require_once();</p>

<p>The if statement using with the stristr function is needed to prevent other non-plugin classes being loaded, causing errors.</p>

<p><a href="https://github.com/TCotton/Wordpress-plugin-Affiliate-Hoover/blob/master/config.php">You can view the code on the Affilate Hoover GitHub repository</a>.</p>]]></description>
 <pubDate>2013-03-14T08:02:52Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">178 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A quick way to add a URL redirect feature to Wordpress categories]]></title>
<link>http://www.suburban-glory.com/blog?page=175</link>
<description><![CDATA[<p>My last job at a large multi-national company before my contract expired was to code their Russian website. A major problem that their Russian team faced was not having the resources to translate everything on the English language website or to be able to keep abreast of updates if the content on the English language website changed.</p>

<p>Therefore, the site architecture involved a number of redirects to the English language website. Admittedly, I didn't find this a particularly user-friendly approach for Russian readers but this decision had already been made before I became involved in the project.</p>

<p>A large section of the site was based on categories. A top parent category would divide down into several child categories which would then separate into more child categories. Some of these would redirect to the English language version of the website.</p>

<p>I started off by using John Godley's excellent <a href="http://wordpress.org/extend/plugins/redirection/">Redirection plugin</a>, but the problem was that the user interface was too complicated for the layperson to update and change. I needed to add a field to individual categories so that it was just a simple act for the maintainer of the website to cut and paste a URL into the category form.</p>

<p>My starting point was the code found on the article called <a href="http://pippinsplugins.com/adding-custom-meta-fields-to-taxonomies/">Adding Custom Meta Fields to Taxonomies</a>. I won't reproduce the code here because it is quite a faithful use of their PHP expect that I changed it into a class.</p>

<p>This is how the category interface looks:</p>

<p><img src="http://www.suburban-glory.com/images/category-image.jpg" alt="wordpress categories" /></p>

<p>The key method that I added was this:</p>

<pre>

/** 
     * Category_Add_Field::redirect() 
     * 
     * @param string $id 
     * @return redirect 
     */ 
    public function redirect($id) { 

        $term_meta = get_option("taxonomy_" . $id); 
        
        if ($term_meta != false &amp;&amp; (isset($term_meta['custom_term_meta_url']) &amp;&amp; $term_meta['custom_term_meta_url'] != '')) { 

            ob_start(); 
            wp_redirect($term_meta['custom_term_meta_url'], 302); 
            ob_end_flush(); 
            exit; 

        } 

    }

</pre>

<p>It's very simple. If the category term has a redirect URL in the postmeta table then call the wp_redirect() function.</p>

<p>The method is called in the very top of the header.php file:</p>

<pre>

if (class_exists('\content\Category_Add_Field')) {
 
$cat = get_query_var('cat');
// category redirection if external URL is set in the category page
 
if ($cat != '') {
 
contentCategory_Add_Field::redirect(get_query_var('cat'));
 
}
 
} else {
 
echo 'No class called Category_Add_Field has been found';
 
} 

</pre>

<p>Yes, I know that the best method is to add these URL redirects to the .htaccess file, but time was against me. This is a quick way of creating a Wordpress category redirect feature.</p>

<p>You can find the full class on this <a href="https://gist.github.com/TCotton/5088476">GitGist</a>
</p>]]></description>
 <pubDate>2013-03-05T12:09:50Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">175 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A PHP class to create a Wordpress custom post type with dynamic metaboxes]]></title>
<link>http://www.suburban-glory.com/blog?page=174</link>
<description><![CDATA[<p>On a theme I have been working on there was the need to create dynamic metaboxes for a basic jobs listing section. The listing page had four different fields for every job: Title, description, location and date. The user needed the ability to add, edit or delete jobs.</p>

<p>Coding this feature into Wordpress was quite a task. It's one thing to code a complex layout, but quite another to create a user-friendly interface in the admin area. I find with Wordpress that doing so in a theme means you really have to jump through coding hoops, whereas Drupal loves these types of complex forms / layouts.</p>

<p>The first problem is that there is no inbuilt Wordpress validation hook that displays error messages – so you need to write your own. The second issue is the use of multidimensional arrays for creating the form and then processing the data after editing, deletions or additions. This can create some challenging coding problems.</p>

<p>I already have a PHP class that I use when creating post types so I modified that for this purpose. As a caveat, the original code was based on somebody else's blog post that I came across sometime ago. I've tried to find it so as to give acknowledgement and a link. Apologies to that person but if you get in touch I will amend this article to do so. Their particular blog post first introduced me to the idea of using the add_filter() hooks to change the post setting from published to draft as well as adding a redirect that allows the displaying of an error message.</p>

<p>The final code is on this <a href="https://gist.github.com/TCotton/4966697">GitGist</a>, but I'll run through it all one method at a time.</p>

<p>Before I start I'll state that this approach is really only for serious PHP heads. If that's not you, then it's best if you try to find a plugin to achieve the same functionality.</p>

<p>This is the structure of the class:</p>

<pre>

namespace content;

class Content_Type_Jobs_Template {

    static $wpdb = null;

    public function __construct() {

        global $wpdb;
        self::$wpdb = $wpdb;

        add_action('init', array(&amp;$this, 'content_type'));

        // I have a habit of using sessions but forgetting to use session_start()
        // So I place this in the __construct method and use session_regenerate_id() for security
        if (session_id() == '') {
            session_start();
            session_regenerate_id(true);
        }

    }

    public function metabox_attributes() {
    } 

    public function content_type() {
    }

    public function add_metaboxes() {
    }

    public function text_one_html() {
    } 

    protected function validation($form) {
    }

    public function save_postdata() {
    } 

    public function add_redirect_filter() {
    } 

    public function my_redirect_post_location_filter($location) {
    } 

    public function my_post_admin_notices() {
    } 

} // end class

new contentContent_Type_Jobs_Template;

</pre>

<p>As the code serves one purpose only it makes sense to take an Object Orientated approach to keep it organised in one file. If you are going to use classes then also using a namespace helps to avoid naming clashes. This means that it won't work on servers that run less than PHP 5.3, but as that release is a few years old now that isn't something I'm bothered about.</p>

<p>The first method is metabox_attributes():</p>

<pre>

public function metabox_attributes() {

    return array(

        'title' =&gt; array(
            'name' =&gt; 'title',
            'type' =&gt; 'text',
            'title' =&gt; 'Title',
            'description' =&gt; 'The job title',
            ),

        'description' =&gt; array(
            'name' =&gt; 'description',
            'type' =&gt; 'text',
            'title' =&gt; 'Description',
            'description' =&gt; 'Short description',
            ),

        'location' =&gt; array(
            'name' =&gt; 'location',
            'type' =&gt; 'text',
            'title' =&gt; 'Location',
            'description' =&gt; 'Location of job',
            ),

        'date' =&gt; array(
            'name' =&gt; 'date',
            'type' =&gt; 'text',
            'title' =&gt; 'Date',
            'description' =&gt; 'Date posted',
            ),

        );

} 

</pre>

<p>This is where you declare your form field name and type attributes plus a title and description that is used in the display.</p>

<p>Next comes the content_type() with uses the Wordpress register_post_type() function. For more information on this <a href="http://codex.wordpress.org/Function_Reference/register_post_type">read the guide on the official Wordpress website</a>.</p>

<pre>

public function content_type() {

    $labels = array(
        'name' =&gt; _x('Jobs Layout', 'post type general name'),
        'singular_name' =&gt; _x('Jobs Layout', 'post type singular name'),
        'add_new' =&gt; _x('Add New', 'book'),
        'add_new_item' =&gt; __('Jobs Layout'),
        'edit_item' =&gt; __('Edit Jobs Layout type'),
        'new_item' =&gt; __('New Jobs Layout type'),
        'all_items' =&gt; __('All Jobs Layout types'),
        'view_item' =&gt; __('View Jobs Layout types'),
        'search_items' =&gt; __('Search Jobs Layout types'),
        'not_found' =&gt; __('No Jobs Layout types found'),
        'not_found_in_trash' =&gt; __('No Jobs Layout types found in Trash'),
        'parent_item_colon' =&gt; '',
        'menu_name' =&gt; __('Jobs Layout'),
        );

    $args = array(
        'labels' =&gt; $labels,
        'description' =&gt; 'Jobs',
        'public' =&gt; true,
        'publicly_queryable' =&gt; true,
        'show_ui' =&gt; true,
        'show_in_menu' =&gt; true,
        'query_var' =&gt; true,
        'rewrite' =&gt; true,
        'capability_type' =&gt; 'post',
        'has_archive' =&gt; true,
        'hierarchical' =&gt; false,
        'menu_position' =&gt; null,
        'register_meta_box_cb' =&gt; array(&amp;$this, 'add_metaboxes'),
        'taxonomies' =&gt; array('category'),
        'supports' =&gt; array(
            'title',
            'editor',
            'author',
            'thumbnail',
            'excerpt',
            ));

    add_action('save_post', array(&amp;$this, 'save_postdata'), 10, 2);
    add_action('admin_notices', array(&amp;$this, 'my_post_admin_notices'), 10, 1);
    register_post_type('jobs', $args);

}

</pre>

<p>The register_meta_box_cb key uses the following method:</p>

<pre>

public function add_metaboxes() {

        add_meta_box('jobs_metabox', 'Add individual jobs below', array(&amp;$this, 'text_one_html'),
            'jobs', 'normal', 'high');

    }

</pre>

<p>Which in turn calls text_one_html().</p>

<p>This is where things get tricky. The method is in two different parts.</p>

<p>The first uses the array in metabox_attributes() to create an empty form:</p>

<pre>

$new_meta_boxes = $this-&gt;metabox_attributes();

$form = '&lt;table id="list-table"&gt;';
$form .= '&lt;tbody id="the-list" width="100%"&gt;';

foreach ($new_meta_boxes as $key =&gt; $result) {

    if ($result['name'] == 'title') {

        $form .= '&lt;thead&gt;';
        $form .= '&lt;tr&gt;';
        $form .= '&lt;th class="left"&gt;&lt;h4&gt;Add a new job below&lt;/h4&gt;&lt;/th&gt;';
        $form .= '&lt;th&gt;&lt;h4&gt;Values&lt;/h4&gt;&lt;/th&gt;';
        $form .= '&lt;/tr&gt;';
        $form .= '&lt;/thead&gt;';

    }

    if ($result['type'] == 'text') {

        $form .= '&lt;tr&gt;';
        $form .= '&lt;td class="left" width="30%"&gt;';
        $form .= '&lt;label for="'.$result['name'].'"&gt;&lt;strong&gt;'.$result['title'].'&lt;/strong&gt;&lt;/label&gt;';
        $form .= '&lt;div&gt;'.$result['description'].'&lt;/div&gt;';
        $form .= '&lt;/td&gt;';
        $form .= '&lt;td width="70%"&gt;';
        $form .= '&lt;input type="text" name="'.$result['name'].'" value="';
        $form .= isset($_SESSION[$result['name']]) ? $_SESSION[$result['name']] : null;
        $form .= '" class="regular-text"/&gt;';
        $form .= '&lt;/td&gt;';
        $form .= '&lt;/tr&gt;';

    }

} // end foreach

$form .= '&lt;/tbody&gt;';
$form .= '&lt;/table&gt;';

echo $form;

</pre>

<p>If the user has already created job listings then this data needs to be placed into forms underneath the empty one.</p>

<pre>

$meta = get_post_meta($post-&gt;ID);

$z = $y = $x = 0;

// takes the meta data from the database and creates forms
// populated by the data

if (!empty($meta)) {

    // remove the _edit_last and _edit_lock arrays from the returned multidimensional array
    $remove = array('_edit_last', '_edit_lock');
    $meta = array_diff_key($meta, array_flip($remove));

    $form = '&lt;table id="list-table"&gt;';
    $form .= '&lt;tbody id="the-list" width="100%"&gt;';

    foreach ($meta as $key =&gt; $value) {

        // remove all digits from the key. New form unique form attributes are created below
        $key = preg_replace('/d/', '', $key);

        // make sure that all returned keys fit the original keys in the metabox_attributes method
        if (!in_array($key, array_keys($this-&gt;metabox_attributes()))) continue;

        // for every number of total keys in the metabox_attributes add an extra digit
        // this is to ensure that all name attributes are unique
        if ($x++ % count($this-&gt;metabox_attributes()) == 0) {

            $y += 1;

        }

        // remove digit from the string
        // and then use array_intersect_key() and array_flip() to find the array of
        // the relevant corresponding key from the meta_attributes() method
        // this is then used in the html

        $key_array = array_intersect_key($this-&gt;metabox_attributes(), array_flip(array($key)));

        if ($key_array[$key]['name'] == 'title') {

            $form .= '&lt;thead&gt;';
            $form .= '&lt;tr&gt;';
            $form .= '&lt;th class="left"&gt;&lt;h4&gt;'.implode('', $value).'&lt;/h4&gt;&lt;/th&gt;';
            $form .= '&lt;th&gt; &lt;/th&gt;';
            $form .= '&lt;/tr&gt;';
            $form .= '&lt;/thead&gt;';

        }

        if ($key_array[$key]['type'] == 'text') {

            $form .= '&lt;tr&gt;';
            $form .= '&lt;td class="left" width="30%"&gt;';
            $form .= '&lt;label for="'.$key.$y.'"&gt;&lt;strong&gt;'.$key_array[$key]['title'].
                '&lt;/strong&gt;&lt;/label&gt;';
            $form .= '&lt;div&gt;'.$key_array[$key]['description'].'&lt;/div&gt;';
            $form .= '&lt;/td&gt;';
            $form .= '&lt;td width="70%"&gt;';
            $form .= '&lt;input type="text" name="'.$key.$y.'" value="';
            $form .= isset($_SESSION[$key.$y]) ? $_SESSION[$key.$y] : implode('', $value);
            $form .= '" class="regular-text"/&gt;';
            $form .= '&lt;/td&gt;';
            $form .= '&lt;/tr&gt;';

        }

    }

    $form .= '&lt;/tbody&gt;';
    $form .= '&lt;/table&gt;';

    echo $form;

}

</pre>

<p>What the code is doing is removing unwanted keys from the array ('_edit_last' and '_edit_lock'), stripping the previously added digits at the end of the name attribute values; making sure that the key is in the metabox_attributes() array and it uses the modulus operator to add new a digit with every iteration of the total number of arrays in metabox_attributes() . This is necessary not just to keep the form accessible with valid HTML, but also to ensure that the database entries are unique. Phew, there's a lot happening in this block of code.</p>

<p>Here is the validation:</p>

<pre>

protected function validation($form) {

    $error = array();

    // filter out unwanted parts of the $_POST
    foreach ($form as $key =&gt; $value) {
        if (!in_array(preg_replace('/d/', '', $key), array_keys($this-&gt;metabox_attributes()))) {
            unset($form[$key]);
        } else {
            // this session data is used if there is a form error to repopulate the form fields
            // if the form has no error then the session data is destroyed
            $_SESSION[$key] = $value;
        }
    }

    // make sure that the the values are in proportion to that specified in the number
    // of fields in the metabox_attributes. For instance if there are 4 fields in the method, then there must
    // be no blank values in multiplications of 4, ie 4, 8 12
    if (count(array_values(array_filter($form, 'strlen'))) % count($this-&gt;metabox_attributes()) == 0) {

        return true;

    } else {

        $error[] = 'Please make sure that all '.count($this-&gt;metabox_attributes()).
            ' fields are filled in or leave all form fields empty for the job listing to be deleted';

        return $error;

    }

}

</pre>

<p>Firstly it again uses the metabox_attributes() array so as to remove unwanted parts of the form. What is left are only the elements that are used for the job listing data. Then it counts the total number of FULL values and using the modulus operator compares it to the number of keys in the multidimensional array in metabox_attributes(). count(array_values(array_filter($form, 'strlen')))  was something I took from php.net and which removes empty array values.</p>

<p>If the number is different it means that a field has been left blank which then creates an error message.</p>

<p>Note how all job form attributes and values are saved as a session. These are used in the forms if validation fails. They are destroyed on successful completion.</p>

<p>The save_postdata() method is in two parts. After validation, the code is forked between success or failure.</p>

<p>If there are no errors, then the data is either saved or deleted:</p>

<pre>

if ($error === true) {

	// destory session here and save meta data

	foreach ($form as $key =&gt; $value) {

		// filter out unwanted parts of the $_POST
		if (!in_array(preg_replace('/d/', '', $key), array_keys($this-&gt;metabox_attributes()))) continue;


		if ($value != '') {

			update_post_meta($post-&gt;ID, $key, strip_tags($value), false);

		} else {

			delete_post_meta($post-&gt;ID, $key, false);

		}

		// destroy session

		$_SESSION = array();

	} // end foreach

}

</pre>

<p>The second part handle errors:</p>

<pre>

if ((isset($_POST['publish']) || isset($_POST['save'])) &amp;&amp; $_POST['post_status'] == 'publish') {

    self::$wpdb-&gt;update(self::$wpdb-&gt;posts, array('post_status' =&gt; 'pending'), array('ID' =&gt; $post-&gt;
            ID));

} // end fi

add_filter('wp_insert_post_data', array(&amp;$this, 'add_redirect_filter'), 102);

$this-&gt;add_redirect_filter();

$_SESSION['error'] = serialize($error);

</pre>

<p>Firstly it changes the post status from published to pending, it then calls the add_filter() hook and  the add_redirect_filter() method and finally the $error array is serialised into a session to be used later on.</p>

<p>The last method in the class is my_post_admin_notices(). This is how the error messages are displayed to the user.</p>

<pre>

public function my_post_admin_notices() {

    if (!isset($_GET['message'])) return;

    if ($_GET['message'] == '102') {

        global $post;

        // abort if not my custom type
        if ($post-&gt;post_type != 'jobs') return $post-&gt;ID;

        $message = '&lt;div id="notice" class="error"&gt;&lt;p&gt;';
        $message .= "Error: please check that all form values are correct - &lt;br&gt;";
        $message .= isset($_SESSION['error']) ? implode('&lt;br&gt;', unserialize($_SESSION['error'])) : null;
        $message .= '&lt;/p&gt;&lt;/div&gt;';
        echo $message;

        unset($_SESSION['error']);

    } // end if

} 

</pre>

<h3>Conclusion</h3>

<p>The code works and is used on a site soon to be moved to production. I'll post up the URL when it is live. Again, the full class can be found on this <a href="https://gist.github.com/TCotton/4966697">GitGist</a>.</p>

<p>I accessed the data to create a table in the theme with this code:</p>

<pre>

if (class_exists('contentContent_Type_Jobs_Template')) {

    $meta = get_post_meta($id);

    $table = '&lt;table&gt;
&lt;caption&gt;Current vacancies&lt;/caption&gt;
&lt;tr class="header-row"&gt;
&lt;td id="job-title"&gt;Title&lt;/td&gt;
&lt;td id="job-description"&gt;Description&lt;/td&gt;
&lt;td id="job-location"&gt;Location&lt;/td&gt;
&lt;td id="job-date"&gt;Date posted&lt;/td&gt;
&lt;/tr&gt;';

    $array_keys = array_keys(contentContent_Type_Jobs_Template::metabox_attributes());

    // loop through metabox jobs content to create the table data

    foreach ($meta as $key =&gt; $value) {

        // make sure that all returned keys fit the original keys in the metabox_attributes method
        if (!in_array(preg_replace('/d/', '', $key), $array_keys))
            continue;

        static $i;
        $number = $i++;

        if ($number % (count($array_keys)) == 0) {
            $table .= '&lt;tr&gt;';
        }

        if (stristr($key, $array_keys['0'])) {
            $table .= '&lt;td headers="job-title"&gt;' . implode('', $value) . '&lt;/td&gt;';
        }

        if (stristr($key, $array_keys['1'])) {
            $table .= '&lt;td headers="job-description"&gt;' . implode('', $value) . '&lt;/td&gt;';
        }

        if (stristr($key, $array_keys['2'])) {
            $table .= '&lt;td headers="job-location"&gt;' . implode('', $value) . '&lt;/td&gt;';
        }

        if (stristr($key, $array_keys['3'])) {
            $table .= '&lt;td headers="job-date"&gt;' . implode('', $value) . '&lt;/td&gt;';
        }

        if (($number - (count($array_keys) - 1)) % (count($array_keys)) == 0) {
            $table .= '&lt;/tr&gt;';
        }

    } // end foreach

    $table .= '&lt;/table&gt;';

    echo $table;

} // end if  if (class_exists('menuContent_Type_Jobs_Template'))

</pre>
]]></description>
 <pubDate>2013-02-19T05:58:45Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">174 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Creating a reusable JavaScript form validation class]]></title>
<link>http://www.suburban-glory.com/blog?page=173</link>
<description><![CDATA[<p>Just recently I was looking at some of my old code. For a website build I had used HTML5 form validation with a JavaScript fallback. The form itself was a long one and I had created a module that saved the individual form values into an objects memory which was then validated in the next method. Something like this:</p>

<pre>

contactQaStudio: (_private.form.contactQaStudio.checked) ? _private.form.contactQaStudio.value : '',
contactQaDirect: (_private.form.contactQaDirect.checked) ? _private.form.contactQaDirect.value : '',
contactStarMine: (_private.form.contactStarMine.checked) ? _private.form.contactStarMine.value : '',

</pre>

<p>This is fine if you have a small form but when you have 32 separate fields it creates non-elegant code. To be honest I felt slightly embarrassed and I'm sure that whoever maintains this script will be cursing the day I was born.</p>

<p>The best solution would be one where you drop in a reusable JavaScript class and access it like so:</p>

<pre>

// name attribute of form
var contactForm = new FormClass('contactUs');

// id attribute of form elements
// use required if the form field is essential
contactForm.required('contact-name', 'Please fill in your contact name');
contactForm.required('contact-email', 'Please fill in your email address');

// id attribute of form elements
// use validationInd to create individual form field validation
contactForm.validationInd('contact-email', 'email');
contactForm.validationInd('contact-name', 'Please enter a minimum of 10 characters for a contact name');

// use validation to run validation function
// will produce error messages or save form if okau
contactForm.validation();

</pre>

<p>This is just what I have done. My aim was to leverage the composite pattern, but in the end I fell short of that. I liberally use the prototype keyword in my script. To understand how, why and when this should be used will make you are far better equipped JavaScript coder. If you don't then I recommend that you read Ross Harmes and Dustin Diaz's book <a href="http://j.mp/Y2Y6tD">Pro-JavaScript Design Patterns</a>.</p>

<p>Using the above method the id of the form field and the error message is added to an object, which is then looped through.</p>

<p>Individual form validation is handled with the help of regex. For instance, a coder writes 'Please enter a minimum of 10 characters for a contact name'. In the loop if the word 'minimum' is found in  the string then the appropriate statement is run with the number of characters, in this case 10, extracted with regex, just like this:</p>

<pre>

if (this.validationIndValues[key].match(/minimum/g)) {

    // check if number of characters is less than specified

    if (parseInt(doc.querySelector('input#' + key).value.length) &lt; parseInt(this.validationIndValues[key].match(/d+.?d*/g))) {

        anArray.push(this.validationIndValues[key]);

    }

}

</pre>

<p>By building up the user-specified form objects it is then necessary to run the validation on form submit:</p>

<pre>

addEvent(document.forms[this.formName], 'submit', validForm.bind(this));

</pre>

<p>Note the use of the bind() function. This is essential to bypass JavaScript function scope so that the <em>this</em> object is passed into the validForm() function and can then be accessed directly.</p>

<p>Checking for empty values is straight forward. It loops through the id attributes in the object, running a check for empty values on the required form fields:</p>

<pre>

// loop through ruleList object literals
if (this.formRequired.hasOwnProperty(key)) {

    // check if any of the required values are empty

    if (doc.querySelector('input#' + key).value === '') {

        anArray.push(this.formRequired[key]);

    } // end if

} // end if

</pre>

<p>The error message is passed into an array which is then added to the errorMessage() method afterwards.</p>

<p>Individual form field validation is a little more complex but essentially follows the same pattern:</p>

<pre>

for (key in this.validationIndValues) {

    // loop through ruleList object literals
    if (this.validationIndValues.hasOwnProperty(key)) {

        if (this.validationIndValues[key].match(/email/g)) {

            // check if valid email address

            if (!doc.querySelector('input#' + key).value.match(/^(.+)@([^();:,&lt;&gt;]+.[a-zA-Z]{2,4})/)) {

                anArray.push('You have entered an incorrect email address');

            }

        }

        if (this.validationIndValues[key].match(/minimum/g)) {

            // check if number of characters is less than specified

            if (parseInt(doc.querySelector('input#' + key).value.length) &lt; parseInt(this.validationIndValues[key].match(/d+.?d*/g))) {

                anArray.push(this.validationIndValues[key]);

            }

        }

        if (this.validationIndValues[key].match(/maximum/g)) {

            // check if number of characers is more than specified

            if (parseInt(doc.querySelector('input#' + key).value.length) &gt; parseInt(this.validationIndValues[key].match(/d+.?d*/g))) {

                anArray.push(this.validationIndValues[key]);

            }

        }

    }

</pre>

<p>
This is fine for text or textarea fields, but validating checkboxes or radio buttons would require something different.</p>

<h3>Conclusion</h3>

<p>It works in all browser apart from IE7 because it uses querySelector. However, it should be fairly painless to substitute querySelector with a JS library DOM transversal interface.</p>

<p>What I don't like about the code is that the validation function is too fat and needs to be broken down. It's good JS practice to keep individual methods / functions as thin as possible with each only serving one purpose. It makes the code more readable and it's easier for debugging and unit testing.</p>

<p>Still, it's a good starting point and it's code I will return to in the future when form validation rears its head again.</p>

<p>The code can be found on this <a href="https://gist.github.com/TCotton/4749123">GitGist</a>.</p>

<p><strong>Note: I've now re-factored this code to use the cached form object rather than querySelector(). It's quicker code and it works in IE7. <a href="https://gist.github.com/TCotton/4772340">The GitGist is here</a></strong></p>]]></description>
 <pubDate>2013-02-10T19:07:48Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">173 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Be careful when buying electronic goods from Amazon Associates]]></title>
<link>http://www.suburban-glory.com/blog?page=172</link>
<description><![CDATA[<p>Although I use a Mac at home, I also use Windows and Linux. For the latter I use an old CRT monitor. It weighs more than an elephant, but the colours and font-rendering is excellent. When LSD screens first appeared the picture quality was generally very poor, but new models, if you pay the right money, are fine.</p>

<p>Wanting a monitor upgrade I looked around for the particular Samsung make that had been recommended to me. On Amazon the cheapest price was £220 (about $350). </p>

<p>Despite being a bunch of tax-dodging skivers, I've had a positive customer relationship with this company with no past issues to complain about. Based on this I went ahead and brought the monitor sold by an Amazon Associate. These are companies that sell their goods on Amazon, so although you pay via the Amazon website, they distribute the items direct to you. I regret making this decision now.</p>

<p>The first issue was although it stated delivery was 3 – 10 days on the payment page, what wasn't clear was that HD-Systemstore, the monitor seller, was a German company based in Berlin. I wouldn't have used a German-based company if I had known. It's not that I have a buy British only stance, it's that a delivery from a British-based company would have been quicker. (I checked HD-Systemstore feedback and it was wholly positive).</p>

<p>Because I work full-time the monitor was delivered to a relatives address. By the time the item arrived, and I could pick it up, two to three weeks had passed. When I got the package home it was immediately clear that the monitor screen was cracked and useless. This probably happened in transit.</p>

<p>Like any consumer I presumed that the next step was either they would replace the item or I would receive a full refund. Neither happened.</p>

<p>Firstly, the company in question ignored my direct email, so I went through the Amazon complaints interface. Please return the item to us, they asked.</p>

<p>I then discovered that packages posted to the rest of Europe cost three times as much as those sent to a British address, so I had to pay £60 to have the thing couriered back using ParcelForce. Under British consumer rights law, there is no stipulation that the company has to pay for an item to be returned if it is faulty.</p>

<p>Eventually it arrived back in Berlin and HD-Systemstore acknowledged the item was defective but stated that because I hadn't returned it within 21 days then I was not eligible for a refund. Of note, they only wrote this in their last email rather than the first one.</p>

<p>The relationship between Amazon and Amazon Associates is a loose one. They enforce a returns policy created by the Associate company, not their own. Which in the case of HD-Systemstore seemed to be what they made up as they went along.</p>

<p>As Amazon sided with HD-Systemstore I appealed to my credit card company who have a chargeback scheme. After supplying all the evidence they wrote back stating that the dispute needs to be resolved through Amazon. Amazon couldn't give a fig.</p>

<p>So where does that leave me? £300 down and with nothing to show for it.</p>

<p>Yes, I should have read the small print, but I naively presumed consumer law would protect me if the item was defective. I unquestionably thought that consumer protection law was clearly laid out and unambiguous. So if you do buy expensive electronic goods from an Amazon Associate always do the following.</p>

<p>1. Make sure the company is based in the same country as you. As I detailed above, this adds a lot more hassle when they deliver the item or if you have to return it.</p>

<p>2. Read the companies returns policy. Make sure you are crystal clear what the procedure is if the item is faulty.</p>

]]></description>
 <pubDate>2013-02-10T15:26:29Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">172 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using CSS3 animation with the JavaScript CSSOM API]]></title>
<link>http://www.suburban-glory.com/blog?page=171</link>
<description><![CDATA[<p>One day IE7 and IE8 will die out and be a distant memory just like Netscape 4. JavaScript libraries like jQuery won't disappear but they'll be a lot less essential when all browsers conform to W3C standards. </p>

<p>However, what won't die out is the need for a JavaScript animation library. This requires mathematical knowledge that the everyday JS coder doesn't have.</p>

<p>CSS3 animation, although a welcome addition, has its limitations; although I'm sure that the spec will be built on and improved in the coming years.</p>

<p>It certainly does have its uses on the average web-build and it's something that I regularly use.</p>

<p>On my <a href="http://andywalpole.me/">personal portfolio</a> I have some CSS3 animation that runs in the left hand corner. I should state that creating animation that automatically runs on page load is a bad design decision because it distracts from the text, but it's my own personal site so I can experiment with it.</p>

<p>The code for this animation is particularly verbose. Here it is... gulp:</p>

<pre>

@keyframes dazzle {
    0% {
        box-shadow: -50px 40px 2px -13px rgba(255, 255, 255, 0), -60px 60px 2px -13px rgba(255, 255, 255, 1), -35px -20px 2px -12px rgba(255, 255, 255, 0), 40px 60px 3px -13px rgba(235, 255, 255, 1), 30px -50px 2px -13px rgba(255, 255, 255, 0), -50px 35px 3px -11px rgba(255, 255, 235, 1), -25px -20px 3px -13px rgba(235, 255, 235, 0), -40px 10px 4px -11px rgba(255, 255, 255, 1), -40px -65px 1px -13px rgba(255, 245, 255, 0), -10px 50px 3px -12px rgba(255, 255, 255, 1), 10px -30px 3px -12px rgba(235, 255, 255, 0), -30px -20px 2px -12px rgba(255, 245, 255, 1), 70px 40px 3px -13px rgba(255, 255, 255, 0), 20px 50px 2px -13px rgba(205, 255, 255, 1), -40px 45px 6px -11px rgba(255, 255, 255, 0), -35px -60px 3px -13px rgba(255, 255, 225, 1), -30px 40px 4px -11px rgba(255, 255, 255, 0), -70px -55px 1px -13px rgba(255, 255, 255, 1), -10px 50px 3px -12px rgba(235, 255, 255, 0), 20px -40px 3px -12px rgba(225, 255, 255, 1), -20px -10px 2px -13px rgba(255, 255, 255, 0), -50px -20px 5px -12px rgba(245, 255, 255, 1), 70px 30px 3px -13px rgba(215, 255, 245, 0), 40px 90px 2px -13px rgba(255, 255, 255, 1), -40px 35px 3px -11px rgba(165, 235, 215, 0), 35px -40px 3px -13px rgba(245, 255, 255, 1), -70px 20px 4px -11px rgba(215, 215, 235, 0), -40px -25px 1px -13px rgba(255, 245, 255, 1), 10px -60px 3px -12px rgba(255, 225, 245, 0), -20px 70px 3px -12px rgba(255, 255, 255, 1), -25px 80px 2px -13px rgba(245, 255, 255, 0), -40px 90px 2px -12px rgba(170, 235, 255, 1), -35px 20px 3px -13px rgba(225, 215, 255, 0), 60px -20px 3px -12px rgba(255, 255, 255, 1), 20px -80px 2px -13px rgba(255, 255, 255, 0), 10px 40px 3px -13px rgba(225, 255, 255, 1), -45px -40px 2px -13px rgba(255, 245, 255, 0), 40px -10px 3px -12px rgba(255, 255, 255, 1), 15px 30px 2px -13px rgba(225, 235, 255, 0), 10px -30px 2px -12px rgba(255, 245, 245, 1), 40px 50px 2px -13px rgba(255, 255, 255, 0), -55px 40px 4px -13px rgba(225, 245, 255, 1), -40px -10px 2px -12px rgba(195, 255, 175, 0), 30px -20px 2px -13px rgba(255, 255, 255, 1), 50px 20px 3px -13px rgba(255, 255, 255, 0), -55px -10px 2px -13px rgba(255, 205, 255, 1), 10px -30px 7px -12px rgba(255, 255, 255, 0), 10px 60px 2px -13px rgba(255, 255, 255, 1), 20px -30px 2px -12px rgba(225, 225, 225, 0), 40px 50px 2px -13px rgba(195, 255, 255, 1), 30px 70px 3px -13px rgba(235, 255, 235, 0), -60px 60px 2px -13px rgba(255, 255, 255, 1), 10px 70px 3px -12px rgba(225, 205, 255, 0), 20px 90px 2px -13px rgba(235, 255, 235, 1), 30px 70px 5px -12px rgba(225, 255, 225, 0), 10px -40px 2px -12px rgba(195, 255, 175, 1), 20px -60px 2px -13px rgba(255, 255, 255, 0), 30px 60px 3px -13px rgba(255, 255, 255, 1), -75px -30px 2px -13px rgba(255, 205, 255, 0), 30px -30px 7px -12px rgba(255, 255, 255, 1), 40px 60px 2px -13px rgba(255, 255, 255, 0), 20px -30px 2px -12px rgba(225, 225, 225, 1), 20px 50px 2px -13px rgba(195, 255, 255, 0), 40px 20px 3px -13px rgba(235, 255, 235, 1), -40px 30px 2px -13px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: -50px 40px 2px -13px rgba(255, 255, 255, 1), -60px 60px 2px -13px rgba(255, 255, 255, 0), -35px -20px 2px -12px rgba(255, 255, 255, 1), 40px 60px 3px -13px rgba(235, 255, 255, 0), 30px -50px 2px -13px rgba(255, 255, 255, 1), -50px 35px 3px -11px rgba(255, 255, 235, 0), -25px -20px 3px -13px rgba(235, 255, 235, 1), -40px 10px 4px -11px rgba(255, 255, 255, 0), -40px -65px 1px -13px rgba(255, 245, 255, 1), -10px 50px 3px -12px rgba(255, 255, 255, 0), 10px -30px 3px -12px rgba(235, 255, 255, 1), -30px -20px 2px -12px rgba(255, 245, 255, 0), 70px 40px 3px -13px rgba(255, 255, 255, 1), 20px 50px 2px -13px rgba(205, 255, 255, 0), -40px 45px 6px -11px rgba(255, 255, 255, 1), -35px -60px 3px -13px rgba(255, 255, 225, 0), -30px 40px 4px -11px rgba(255, 255, 255, 1), -70px -55px 1px -13px rgba(255, 255, 255, 0), -10px 50px 3px -12px rgba(235, 255, 255, 1), 20px -40px 3px -12px rgba(225, 255, 255, 0), -20px -10px 2px -13px rgba(255, 255, 255, 1), -50px -20px 5px -12px rgba(245, 255, 255, 0), 70px 30px 3px -13px rgba(215, 255, 245, 1), 40px 90px 2px -13px rgba(255, 255, 255, 0), -40px 35px 3px -11px rgba(165, 235, 215, 1), 35px -40px 3px -13px rgba(245, 255, 255, 0), -70px 20px 4px -11px rgba(215, 215, 235, 1), -40px -25px 1px -13px rgba(255, 245, 255, 0), 10px -60px 3px -12px rgba(255, 225, 245, 1), -20px 70px 3px -12px rgba(255, 255, 255, 0), -25px 80px 2px -13px rgba(245, 255, 255, 1), -40px 90px 2px -12px rgba(170, 235, 255, 0), -35px 20px 3px -13px rgba(225, 215, 255, 1), 60px -20px 3px -12px rgba(255, 255, 255, 0), 20px -80px 2px -13px rgba(255, 255, 255, 1), 10px 40px 3px -13px rgba(225, 255, 255, 0), -45px -40px 2px -13px rgba(255, 245, 255, 1), 40px -10px 3px -12px rgba(255, 255, 255, 0), 15px 30px 2px -13px rgba(225, 235, 255, 1), 10px -30px 2px -12px rgba(255, 245, 245, 0), 40px 50px 2px -13px rgba(255, 255, 255, 1), -55px 40px 4px -13px rgba(225, 245, 255, 0), -40px -10px 2px -12px rgba(195, 255, 175, 1), 30px -20px 2px -13px rgba(255, 255, 255, 0), 50px 20px 3px -13px rgba(255, 255, 255, 1), -55px -10px 2px -13px rgba(255, 205, 255, 0), 10px -30px 7px -12px rgba(255, 255, 255, 1), 10px 60px 2px -13px rgba(255, 255, 255, 0), 20px -30px 2px -12px rgba(225, 225, 225, 1), 40px 50px 2px -13px rgba(195, 255, 255, 0), 30px 70px 3px -13px rgba(235, 255, 235, 1), -60px 60px 2px -13px rgba(255, 255, 255, 0), 10px 70px 3px -12px rgba(225, 205, 255, 1), 20px 90px 2px -13px rgba(235, 255, 235, 0), 30px 70px 5px -12px rgba(225, 255, 225, 1), 10px -40px 2px -12px rgba(195, 255, 175, 0), 20px -60px 2px -13px rgba(255, 255, 255, 1), 30px 60px 3px -13px rgba(255, 255, 255, 0), -75px -30px 2px -13px rgba(255, 205, 255, 1), 30px -30px 7px -12px rgba(255, 255, 255, 0), 40px 60px 2px -13px rgba(255, 255, 255, 1), 20px -30px 2px -12px rgba(225, 225, 225, 0), 20px 50px 2px -13px rgba(195, 255, 255, 1), 40px 20px 3px -13px rgba(235, 255, 235, 0), -40px 30px 2px -13px rgba(255, 255, 255, 1);
    }
}

</pre>

<p>I was wondering if I could change the rgba values whenever a visitor hovers their mouse over one of the nine main code blocks. Changing animation on mouseover other than hovering over a link is a bad usability decision, but again, as it's my personal portfolio I have room to experiment.</p>

<p>One option is to create different animation blocks in the CSS file and use JavaScript to change the class. Theoretically this is the correct approach because it keeps the CSS and JS separate. However, I really didn't fancy creating multitudes of complex CSS code. (Another possible option is to use SASS to auto-generate the code, but I'll leave that for another time).</p>

<p>So I set about creating a JavaScript module that can create random rgba values and then change the animation blocks on an event change.</p>

<p>If you want to create random digits in JavaScript then the Math object is your friend. This in-built JS object is very inexpensive to use. </p>

<p>So using Math I sketched out the basis for a JS module to create random rgba values (this code was changed in the final version):</p>

<pre>

ANDY.ANIMATION = (function () {
    'use strict';
    var _private = {
        headers: null,
        randomOne: function () { /* 70 to -70 */

            return Math.floor(Math.random() * 141) - 70;

        },
        randomTwo: function () { /* 2 to 6 */

            /* recursive function. Only return numbers from 2 to 6 */

            var random = Math.floor(Math.random() * 7);

            if (random &lt; 2) {

                return arguments.callee(true);

            } else {

                return random;

            }

        },
        randomThree: function () { /* -11 to -13 */

            var numbers = [-11, -12, -13];

            return numbers[Math.floor(Math.random() * numbers.length)];

        },
        randomFour: function () { /* 0 to 255 */

            return Math.floor(Math.random() * 256);

        },
        randomFive: function () { /* 0 or 1 */

            return Math.floor(Math.random() * 2);


        },
        set: function (val) {
            this.headers = val;
            _private.run();
        },
        setNumbers: function () {



        }
    };
    return {
        init: function () {

            console.log(_private.randomTwo());

        }
    };
}());

</pre>

<p>Using this as a starting point I created a method to generate the CSS block. The do-while loop builds up the array of rgba values which is finally returned as a string.</p>

<pre>

 setNumbers: function () {

     /* create 66 different values for the style 
          sheet like so: -50px 40px 2px -13px rgba(255, 255, 255, 0) */
     var x, l, finalArray = [];

     x = 0;
     l = 66;

     do {

         finalArray.push(this.randomOne() + 'px ' + this.randomOne() + 'px ' + this.randomTwo() + 'px ' + this.randomThree() + 'px ' + 'rgba(' + this.randomFour() + ',' + this.randomFour() + ',' + this.randomFour() + ',' + this.randomFive() + ')');

         x += 1;

     } while (x &lt; l);

     return finalArray.toString();

 },

</pre>

<p>My method next looped through my CSS files to find the file (768.css) that contained the animation and I saved it to the memory of the object (the <em>this</em> keyword refers to the parent object):</p>

<pre>

 findStyleSheet: function () {

     /* find the 768.css stylesheet */

     var x, l;

     for (x = 0, l = this.styleSheets.length; x &lt; l; x += 1) {

         if (this.styleSheets[x].href) {

             if (this.styleSheets[x].href.indexOf('768') !== -1) {

                 this.styleSheetExtra = this.styleSheets[x];
                 break;

             }

         } // end if

     } // end for loop

 },

</pre>

<p>Then I used CSSOM to find the keyframe rule:</p>

<pre>

 findKeyframesRule: function (rule) {

     /* in the 768.css stylesheet find the animation*/

     var ruleList = this.styleSheetExtra.cssRules,
         i, key, l;

     // loop through the cssRules object 

     for (i = 0, l = ruleList.length; i &lt; l; i += 1) {

         for (key in ruleList[i].cssRules) {

             // loop through ruleList object literals
             if (ruleList[i].cssRules.hasOwnProperty(key)) {

                 // find the keyframe animation
                 if (ruleList[i].cssRules[key].type === window.CSSRule.WEBKIT_KEYFRAMES_RULE &amp;&amp; ruleList[i].cssRules[key].name === rule) {

                     return ruleList[i].cssRules[key];

                 } // end if

             } // end if

         } // end for object

     } // end for ruleList 

     return null;
 },

</pre>

<p>This was difficult code to get exactly right but perseverance pays off. I tried window.CSSRule.WEBKIT_KEYFRAMES_RULE and window.CSSRule.MOZ_KEYFRAMES_RULE but window.CSSRule.KEYFRAMES_RULE returned undefined although both browsers are supposed to have implemented a non-prefixed version.</p>

<p>Here is the CSS3 animation change that happens on the choosen event, using the previously created setNumbers() method:</p>

<pre>

changeRule: function () {

    var keyframes = this.findKeyframesRule("dazzle"),
        cloneBlock, parentBlock, domNode;

    if (keyframes !== null) {

        // change the CSS3 animation here

        keyframes.deleteRule("0%");
        keyframes.deleteRule("100%");
        keyframes.insertRule("0% { box-shadow:" + this.setNumbers() + "; }");
        keyframes.insertRule("100% { box-shadow:" + this.setNumbers() + "; }");

        /* it is necessary to redraw the block for the new animation to work */

        domNode = doc.querySelector('div[role=banner] h1');

        cloneBlock = domNode.cloneNode(true);
        parentBlock = domNode.parentNode;
        parentBlock.removeChild(domNode);
        parentBlock.appendChild(cloneBlock);

    }

},

</pre>

<p>Here comes the event methods:</p>

<pre>

onHover: function () {

    var wrapper = doc.querySelector('div[role=main]');

    wrapper.addEventListener('mouseover', _private.onHoverEvent, false);

},

findUpId: function (elem) {

    while (elem.parentNode) {
        elem = elem.parentNode;
        // only use the right node type and that which has an id attribute
        if (elem.nodeType === 1 &amp;&amp; elem.hasAttribute('id')) {
            // only if the id attribute value contains block
            if (elem.getAttribute('id').indexOf('block') !== -1) {
                return elem.getAttribute('id');
            }
        }
    }
    return null;

},

onHoverEvent: function (event) {

    // check again to make sure the correct id is choose
    var domResult, idArray = ['block-1', 'block-2', 'block-3', 'block-4', 'block-5', 'block-6', 'block-7', 'block-8', 'block-9'];

    domResult = _private.findUpId(event.target);

    // check again to make sure that the right id block is used 
    if (domResult !== null &amp;&amp; idArray.indexOf(domResult) !== -1) {

        // place chosen id into object memory
        if (_private.dom === null || _private.dom !== domResult) {

            _private.changeRule();
            _private.dom = domResult;

        } // end if

    } // end if

}

</pre>

<p>The coding theory behind this is to set the event on the parent element – div[role=main]. On mouseover I wanted to use the parent id block of the item, ie block-1 or block-2, then change the animation. The choosen DOM block needed to be kept into the object memory on mouseover because I only want to fire the changeRule() method once for every div block.</p>

<p>The result? Not amazing. The problem is that the animation starts from the beginning rather than the colours changing mid-animation so it creates a stuttering affect. The needs to be a bit of morphing happening! To alleviate that I added an opacity and webkit filter blur rule to the animation.</p>

<p>The full code can be found on this <a href="https://gist.github.com/TCotton/4741915">GitGist</a>.</p>]]></description>
 <pubDate>2013-02-10T08:38:40Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">171 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Creating breadcrumbs for Wordpress with PHP]]></title>
<link>http://www.suburban-glory.com/blog?page=170</link>
<description><![CDATA[<p><img src="http://www.suburban-glory.com/images/wordpress-logo.png" alt="Wordpress logo" class="right" height="250" width="250" /></p>

<p>If you are creating a Wordpress website and you know PHP then it is good practice to avoid third-party plugins wherever possible. There is only minimal peer review of plugins on the Wordpress repository, and many are substandard with unnecessary database calls, sloppy code or outright security issues. And just because you have bought a Wordpress plugin don't presume that it is well-coded. I've seen some appalling paid-for Wordpress plugins. </p>

<p>There is third-party software to create a breadcrumb but it is easy enough to do it yourself. Googling this lead to dozens of results, but many are very verbose with one person even creating a whole class.</p>

<p>For my starting point I decided to use <a href="http://gregrickaby.com/2009/12/how-to-add-breadcrumbs-to-wordpress-without-a-plugin.html">Greg Rickaby's code</a>. However, there were some issues with this. For starters, he uses the the_category() function which only works in a loop, he also connects it via a add_action() hook which I believe to be unnecessary, plus it's a little too simple. </p>

<p>My version is as follows:</p>

<pre>

function my_breadcrumb($id = null) {

    echo '&lt;a href="';
    echo get_option('home');
    echo '"&gt;';
    echo 'Home';
    echo "&lt;/a&gt; &gt; ";

    if (is_category() || is_single()) {

        if (is_single()) {
            echo " &gt; ";
            the_title();
        }

        if(is_category()) {

            $category = get_category(get_query_var('cat'));
            $cat_id = $category-&gt;cat_ID;
            $cat = get_category_parents($cat_id, TRUE, ' &gt; ');
            // remove last &gt;
            echo preg_replace('/&gt;s$/', '', $cat);

        }

    } elseif (is_page()) {

        if ($id != null) {

            $parent = get_the_title($id);
            $parent = '&lt;a href="' . get_permalink($id) . '"&gt;' . $parent . '&lt;/a&gt;';
            echo !is_null($parent) ? $parent . "&gt; " : null;

        }

        echo the_title();

    }

}

</pre>

<p>This is added to the functions.php file.</p>

<p>It is then used in the theme like so:</p>

<pre>

&lt;div id="breadcrumb"&gt;

    &lt;?php if (!is_search() || !is_404()) {

        global $post;

        if ($post != null) {
            my_breadcrumb($post-&gt;post_parent);
        } else {
            my_breadcrumb();
        }

    } else {

        print ' ';

    } ?&gt;

&lt;/div&gt;

</pre>

<p>You can find it on this <a href="https://gist.github.com/TCotton/4714817">GitGist</a>.</p>

<p><strong>I've also created a more complex breadcrumb function that incorporates custom taxonomy on this <a href="https://gist.github.com/TCotton/4723438">GitGist</a></strong></p>]]></description>
 <pubDate>2013-02-05T14:47:03Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">170 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Is using @import in CSS really such a performance roadblock?]]></title>
<link>http://www.suburban-glory.com/blog?page=169</link>
<description><![CDATA[<p>Just recently I found myself returning to an old style sheet that I had coded last year. It was vanilla CSS written without the help of a pre-processor.</p>

<p>Locating and rewriting the CSS involved far too much scrolling through 2,000 lines of code for my liking. It stuck me that if the code was divided intelligently between several different files rather than one long one, then maintenance would be a whole lot easier.</p>

<p>Yes, SASS and Apache Ant give the coder the ability to merge several style sheets together, but it should be an inbuilt feature of the CSS browser implementation.</p>

<p>When Google employee and CSS Working Group member Tab Atkins wrote his post <a href="http://www.xanthir.com/b4N80">2013 Work Plans</a>, I left a comment underneath suggesting that there should be an alternative to @import which, although allowing you to insert separate style sheets into one, comes at a performance cost.</p>

<h3>Is @import the devil?</h3>

<p>Using @import is such a taboo that to use it in a production site is almost the equivalent of putting an “I'm an idiot coder” banner on the home page</p>

<p>But why is it so wrong and do these arguments stand up to scrutiny?</p>

<h3>@import and download speeds.</h3>

<p>Front-page optimization guru Steve Souders had <a href="http://www.stevesouders.com/blog/2009/04/09/dont-use-import/">this to say about @import in an article from 2009</a>:</p>

<blockquote><p>
* Using @import within a stylesheet adds one more roundtrip to the overall download time of the page.<br />
* Using @import in IE causes the download order to be altered. This may cause stylesheets to take longer to download, which hinders progress rendering making the page feel slower.
</p></blockquote>

<p>I thought I would test this out with the help of <a href="http://www.webpagetest.org">Web Page Test</a>, so changing the code to a finished website still sitting on a development server, I divided the CSS up into five separate files: reset, reusable classes, navigation, content and footer. It is object orientated CSS in its most primitive form. Then I added these five files to the central style sheet using @import.</p>

<p>I tested download times before and after:</p>

<table>
<caption>Before and after using css @import</caption>
<th id="table-ie7">IE 7</th>
<th id="table-ie8">IE 8</th>
<th id="table-ie9">IE 9</th>
<th id="table-firefox">Firefox</th>
<th id="table-chrome">Chrome</th>
<th id="table-nexus">Nexus Android 2.3</th>
<tr>
<td headers="table-ie7">Run 1: 2.872s <br /> Run 2: 2.198s</td>
<td headers="table-ie8">Run 1: 2.042s <br /> Run 2: 1.628s</td>
<td headers="table-ie9">Run 1: 2.324s <br /> Run 2: 1.866s</td>
<td headers="table-firefox">Run 1: 2.688s <br /> Run 2: 1.962s</td>
<td headers="table-chrome">Run 1: 3.423s <br /> Run 2: 2.319s</td>
<td headers="table-nexus">Run 1: 7.568s <br /> Run 2: 3.849s</td>
</tr>
<tr>
<td headers="table-ie7">Run 1: 4.63s <br /> Run 2: 2.657s</td>
<td headers="table-ie8">Run 1: 3.142s <br /> Run 2: 1.676s</td>
<td headers="table-ie9">Run 1: 2.596s <br /> Run 2: 1.865s</td>
<td headers="table-firefox">Run 1: 2.228s <br /> Run 2: 1.746s</td>
<td headers="table-chrome">Run 1: 3.861s <br /> Run 2: 2.614s</td>
<td headers="table-nexus">Run 1: 7.923s <br /> Run 2: 4.529s</td>
</tr>
</table>

<p>There is a noticeable difference in Internet Explorer 7 and 8, but far less so in IE9, Chrome, Firefox and Android. Perhaps if you are not bothered with IE 7 and 8 (and most of us are), then maybe the 100 milliseconds differences is something you could live with.</p>

<h3>@import placed in the footer</h3>

<p>The second point made by the prosecution against @import is that it loads the files in the footer, as is written in the Yahoo Performance guide:</p>

<blockquote><p>
One of the previous best practices states that CSS should be at the top in order to allow for progressive rendering. <br />
In IE @import behaves the same as using  at the bottom of the page, so it's best not to use it. 
</p></blockquote>

<p>Looking at the cascading downloaded resources that Web Page Test details, I can confirm that IE10, Firefox, Chrome and Andriod do load any style sheets added with @import as if they are in the footer, while IE7 to IE9 do not. It's extremely bad practice to place CSS in the footer as it will create a disconcerting page rendering experience for the user.</p>

<h3>Conclusion</h3>

<p>Avoid using CSS @import. It's not fit for purpose. You're probably thinking, Tell me something I don't know; but it's always good practice to question what your are told rather than accepting it as correct. As some dead guy with a beard once wrote: “We must have merciless criticism of all things existing”.</p>

<p>However, I do hope that browser manufacturers and the CSS Working Group will create an alternative to @import, although I don't see any evidence of demand coming from CSS coders themselves. While many talk about mixins, functions and variables, few seem interested in addressing this problem. 
</p>]]></description>
 <pubDate>2013-02-03T17:10:50Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">169 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Coders! Don't forget your CSS print styles!]]></title>
<link>http://www.suburban-glory.com/blog?page=168</link>
<description><![CDATA[<p>I rarely read long articles on the desktop instead preferring to print them out. I don't know if there are statistics out there, but I would imagine that this is a common practice.</p>

<p>Thankfully there is the wonderful Readability browser plugin that lets us change an article into a beautifully rendered page of text which is perfect for printing out. However, I'm amazed how many web design sites and blogs that, while look stunning, have given no thought at all to providing CSS rules for print. Surely this should come under the roof of good usability? Give your reader the choice of printing your article so that they can read it at their leisure later.</p>

<p>The sad thing about this is that it is so damn easy to implement as the CSS rules for print are the same for almost every web build.</p>

<p>Below is the print CSS I use on every site. It's based on the HTML5 Boilerplate code, but with some additions:</p>

<pre>

@media print {
    
    * {
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        background: none!important;
    }

/* below choose which page sections you want to hide for print */

    div[id=sidebar], div[role=navigation], div[id=footer] {
        display: none!important;
    }

    body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font: 62.5%  Garamond,"Times New Roman", serif!important;
        line-height: 2em;
    }

    h1,h2,h3,h4,h5,h6 {
        font-family: Helvetica, Arial, sans-serif;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 1em;
    }

    h2 {
        font-size: 1.9em;
        margin-bottom: 1.05263158em;
    }

    h3 {
        font-size: 1.8em;
        margin-bottom: 1.11111111em;
    }

    h4,h5,h6 {
        font-size: 1.7em;
        margin-bottom: 1.17647059em;
    }

    p, li {
        font-size: 1.6em;
        margin-bottom: 1.25em;
    }

    code, pre {
        font: 15px Courier, monospace;
	border : none!important;
    }

    blockquote {
        margin: 16px;
        padding: 1em;
    }

    img {
        display: block;
        margin: 1em 0;
    }

    a img {
        border: none;
    }

    table {
        margin: 1px;
        text-align: left;
    }

    th {
        border-bottom: 1px solid #333;
        font-weight: bold;
    }

    td {
        border-bottom: 1px solid #333;
    }

    th, td {
        padding: 4px 10px 4px 0;
    }

    caption {
        background: #fff;
        margin-bottom: 2em;
        text-align: left;
    }

    a {
        text-decoration: none;
        color: black;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
   
}

</pre>]]></description>
 <pubDate>2013-01-29T18:52:46Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">168 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using SVG in web design]]></title>
<link>http://www.suburban-glory.com/blog?page=167</link>
<description><![CDATA[<p>Within a few years SVG, rather than PNG, will be the preferred icon format used in web design. Primarily this is because SVG is vector-based and so holds up well on high-DPI screens. I'm not so sure whether there is a need for high DPI desktop monitors, but where tablets and the MacBook Pro are today, then all laptops and notebooks will be tomorrow.</p>

<p>The problem with using SVG at the moment is that it is either partially or not supported at all in Internet Explorer 7 and 8 and most Android-based devices. </p>

<p>This makes using inline SVG particularly problematic. Although I have experimented with using JavaScript as an image replacement technique (<a href="https://github.com/TCotton/SVG-Plug">SVG Plug</a>), this isn't a suitable commercial solution.</p>

<p>Just recently I was coding a Wordpress theme for a client and thought I'd try using SVG again but this time only as a background image rather than inline.</p>

<p>I asked the designer to import the icons into the PSD as an Illustrator vector object. From there it was a simple process of right clicking on the layer, choosing edit contents and opening it in Illustrator.</p>

<p><img src="http://www.suburban-glory.com/images/svg-photoshop-vector-smart-image-edit-final.jpg" width="267" alt="588" /></p>

<p>It was easy to then export the file as both SVG and PNG.</p>

<p>Instead of embedding these inline I used them as background images. A number of articles have recommended using background images with the background-size property as a solution to responsive design challenges, and I used the same technique but with a few changes.</p>

<p>To detect browser SVG support I used Modernizr so there is a fallback to non-SVG supporting browsers and those who choose to disable JavaScript.</p>

<p>The CSS typically looks like this:</p>

<pre>

div[id=logo] {
    height: 102px;
    width: 226px;
    display: block;
}

.svg div[id=logo] {
    background: url('/resources/svg/best-bits-logo.svg') no-repeat center center;
    background-size: contain;
}

.no-svg div[id=logo], .no-js  div[id=logo] {
    background: url('/resources/images/best-bits-logo.png') no-repeat center center;
}

</pre>

<p>Once you get into the swing of it it really doesn't add much time to the web build, and by my own testing I found that once GZIPed, SVG is up to a tenth smaller in size than its PNG equivalent.</p>

<p>The website in question is currently on a development server but will go live soon: <a href="http://bestbits.andywalpole.me/">http://bestbits.andywalpole.me/</a></p>]]></description>
 <pubDate>2013-01-27T07:36:16Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">167 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Responding to slow page rendering on the mobile network]]></title>
<link>http://www.suburban-glory.com/blog?page=166</link>
<description><![CDATA[<p>In London, my 3G network connection often has speeds of between 5 and 7mps: which is fine for casual browsing. But when travelling on public transport or at work, speeds are often pathetically prohibiting: pages hang and take far too long to load.</p>

<p>I've been coding a Wordpress theme that although wasn’t responsive didn’t mean that it was any the less likely to be accessed on the go by phone or tablet users.</p>

<p>It got me thinking about how to best deal with the perception of speed when the internet slows to a crawl.</p>

<p>Back in the day I’m sure you must remember those full-immersion Flash experiences that took an age to download. Thankfully, progress bars allowed the user to gauge the time until the site loaded and gave a sense of reassurance that sometime, eventually the website will be visible.</p>

<p>So for hanging pages on mobile couldn’t there a similar usability feature? Obviously, determining the page load time would be impossible, but by adding animation it could give a perception of speed despite in actual fact stalling.</p>

<p>Two ideas I had to bring this about were using the new webkit filters to blur the page and use a CSS3 spinning wheel that is centred in the foreground.</p>

<p>As this is feature would only be necessary on the mobile platform then my coding logic was as follows.</p>

<ol><li><p>Use the HTML5 API matchMedia to detect for smaller devices: </p>

<pre>

var matches = window.matchMedia("(max-width: 1024px)").matches;

</pre>

</li>

<li><p>Attach a click event to the body tag this filter links with event.target:</p>

<pre>

if (event.target.tagName.toLowerCase().toString() === 'a') {
// code here
}

</pre>

</li>

<li><p>On clicking a link add the blur class to the </p>

<pre>

body:document.body.classList.add('blur');

</pre>

</li>

<li><p>Then use setTimeout to display then loading spinning wheel and remove it after 5 seconds:</p>

<pre>

setTimeout(function () {
    // display ajax loading symbol
    doc.getElementById('ajaxLoader').style.display = 'block';
}, 100);
setTimeout(function () {
    doc.getElementById('ajaxLoader').style.display = 'none';
}, 5000);

</pre>

</li>
</ol>

<p>It’s important to only let the animation run for no more than five seconds in case the speed is so slow it leaves the user stranded on the same page. If the traffic speed is fast enough then the next page is loaded without any waiting animation running.</p>

<p>The JavaScript module code is here: <a href="https://gist.github.com/4564346">https://gist.github.com/4564346</a></p>

<p>For the CSS animation I based it on code Craig Buckler wrote for his article <a href="http://www.sitepoint.com/css3-ajax-loading-icon/">How to Create a CSS3 Ajax Loading Icon Without Images</a>:</p>

<pre>

div[id=ajaxLoader] {
    position: absolute;
    left: 45%;
    top: 50%;
    z-index : 999;
    display : none;
    width: 15vmin;
    height: 15vmin;
    border: 6px solid #fff;
    border-left-color: transparent;
    border-right-color: transparent;
    border-radius: 50%;
    box-shadow: 0 0 12vmin 0.8vmin #eee;
    -webkit-animation: spin 1s linear infinite;
    -moz-animation: spin 1s linear infinite;
    -ms-animation: spin 1s linear infinite;
    -o-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    background: -moz-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0)));
    background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
    background: -o-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
    background: -ms-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
    background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
}

div[id=ajaxLoader]::after{
	border-left-color: transparent;
	border-right-color: transparent;
}

@-webkit-keyframes spin {
    from {
        -webkit-transform: rotate(0deg);
        opacity: 0.4;
    }

    50% {
        -webkit-transform: rotate(180deg);
        opacity: 1;
    }

    to {
        -webkit-transform: rotate(360deg);
        opacity: 0.4;
    }
}

</pre>

<p>I made some changes such as using the new VM unit instead of pixels to allow the animation to scale to the device size.</p>

<p>Testing it in the real world showed that it is quite erratic, but then that’s because page load speeds on the mobile platform are.</p>

<p>Still, it’s just an idea.</p>]]></description>
 <pubDate>2013-01-19T12:04:13Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">166 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[On using IDs in CSS]]></title>
<link>http://www.suburban-glory.com/blog?page=165</link>
<description><![CDATA[<p>This year has seen a polite spat between web design “faces” on whether IDs should or should not be used in CSS files.</p>

<p>In the blue corner is new kid on the block and CSS Wizardry owner, <a href="http://csswizardry.com/2012/11/code-smells-in-css/">Harry Roberts</a>, who makes a stand with this argument:</p>

<blockquote><p>
This one is very specific to me, and to larger teams. I have written before about how IDs are a bad idea because of their heightened specificity; they are of no use to anyone and should never be used in CSS. Use IDs in HTML for fragment identifiers and JS hooks, but never in CSS.
</p></blockquote>

<p>In the red corner can be found <a href="http://www.zeldman.com/2012/11/21/in-defense-of-descendant-selectors-and-id-elements/">Jeffrey Zeldman</a>:</p>

<blockquote><p>Say it with me: There is nothing wrong with id when it is used appropriately (semantically, structurally, sparingly). There is plenty wrong with the notion that class is always preferable to descendant selectors and semantic, structural ids.</p></blockquote>

<p>Then followed a discussion about whether IDs are inherently semantic (they are not) but this missed the key point in Zeldman’s article:</p>

<blockquote><p>
To my knowledge, this notion comes out of Nicole Sullivan’s brilliant Object Oriented CSS, an approach for writing HTML and CSS that is designed to scale on sites containing thousands of pages, created by dozens of front-end developers over a period of years, generally with no rules or style guide in place (at least no rules or style guide until it is too late). On sites like these—sites like Amazon or Facebook that are hosed from the get-go thanks to too many cooks and no master chef—the use of structural id and descendant selectors can be problematic, especially when inept coders try to overwrite an id-based descendant selector rule by creating ever-more-specific descendant selector rules.
</p></blockquote>

<p>The same applies to JavaScript. Douglas Crockford, a man who I have immense respect for, is infamous for his intolerance towards deviations from his strict coding rules. Many of these rules are in place to deal with the inherent deficiencies to be found in JavaScript – and quite right too – but they also come from his experience of managing banks of developers at large multinational digital companies. In these circumstances it is understandable why all coders should adhere to such rigid rules. Smaller teams need to think about what works for them in their group.</p>

<p>But nevertheless should using IDs in a CSS file really be such a forbidden practice? I would argue not. For those of us that deal with CSS on a daily basis IDs signify the declaration block of an important layout element, ie #header, #content, #footer; while classes, traditionally, point to DOM children of the parent items.</p>

<p>When you need to scan a CSS sheet this helps in quickly appraising the code layout.</p>

<p>Personally, I’m in favour of using ARIA roles over HTML5 tags or IDs; but to deal directly with the CSS specificity argument, is there a way of using IDs without building specificity to high levels? Yes, by using attribute selectors. Instead of #testing write [id=”testing”]. This uses IDs but the selector is only given the number of points awarded to classes. Try it out on the <a href="http://specificity.keegan.st/">specificity calculator</a>. Attribute selectors like this work in all browsers from Internet Explorer 7 and up.</p>

<p>As a final word, Harry Roberts also argues against using, what he calls, qualified selectors. These can look like a.first-link or li.last-item. Instead, he pleads for coders to write .first-link and .last-item. </p>

<p>Because of the lack of universal CSS3 support in browsers, I often use HTML classes like this. When writing CSS it makes total sense to me to link them to their HTML hook because it makes reading CSS easier. </p>]]></description>
 <pubDate>2012-12-21T20:50:57Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">165 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Launch of TwtTwt – a Twitter service that uses unicode symbols]]></title>
<link>http://www.suburban-glory.com/blog?page=163</link>
<description><![CDATA[<p>I'm happy to announce, at last, the launch of <a href="https://twttwt.com/">TwtTwt</a>; a service that allows Twitter users to insert unicode symbols into their Tweets.</p>

<p>The original inspiration came from my use of a JavaScript bookmarklet. This service (sorry, can't find it now or I would give credit to the developer) allowed me to automatically add the name and shortened URL of the page I was visiting when clicking on my browser menu bar. This meant I could comment on an article or video without leaving the page or using the embedded Twitter link. I used it for ages because it was so convenient.</p>

<p><img src="http://www.suburban-glory.com/images/invite-bird.png" width="148" height="183" alt="bird image" class="right" /></p>

<p>It is possible to add unicode symbols to a Tweet to give a message a different twist to it, so I mixed the above idea with providing the ability to add unicode icons like a musical note or peace symbol. Unicode symbols were originally created in the 1990s but have never found any common use and so they remain largely unloved and ignored. </p>

<p>You can, if you wish, cut and past the unicode characters straight into your own Tweets, but TwtTwt allows the user to easily insert them into any part of a message.</p>

<p>Although there are hundreds of unicode characters only a few of them have universal browser support, so it took some research to find the couple of dozen that worked in all browsers. Oddly, Safari on Windows offered the worse support with IE9 and Firefox the best. Safari on the Mac accepts a far wider range of unicode symbols then its counterpart on the PC (this was before their recent branching).</p>

<p><img src="http://www.suburban-glory.com/images/post-bird.png" width="157" height="182" alt="bird image" class="right" /></p>

<p>The back-end and front-end coding are all my own work although I have made use of jQuery, Selectivizr and Modernizr, albeit only when absolutely necessary.</p>

<h3>Code hightlights</h3>

<p>The trickiest part of the JavaScript was allowing the user to insert the Unicode symbol anywhere in the body of text. I used the setSelectionRange method for this but, oh boy, is it tricky to get right. I had to seek help on Stackoverflow. setSelectionRange is implemented in IE9 but it wasn't working in the same way as all the other modern browsers so I fell back to a more simple solution for Internet Explorer 9 and below.</p>

<p>The JavaScript function for this is below:</p>

<pre>

function insert(elmt, txtToIns) {

    if (typeof _private.isIE === "undefined") {
        // setSelectionRange either doesn't work or fails to work properly on IE9 and below
        val = elmt.value;
        start = elmt.selectionStart;
        end = elmt.selectionEnd;
        elmt.value = val.slice(0, start) + txtToIns + val.slice(end);
        elmt.focus();
        caretPos = start + txtToIns.length;
        elmt.setSelectionRange(caretPos, caretPos);

        total = _private.total - elmt.value.length;
        _private.charId.textContent = total;

    } else {

        elmt.innerText += txtToIns;

        total = _private.total - elmt.value.length;
        _private.charId.innerText = total;

    }
}

</pre>

<p>Just like the message box on twitter.com, I wanted to count the number of characters as the user typed. This wasn't difficult, but I used two jQuery events that I didn't even know existed: cut and paste. So when a user cuts and pastes some text into the message box it counts them to. The snippet for that is here:</p>

<pre>

jQuery(_private.textArea).on('keyup', function () {

    total = _private.total - this.value.length;
    _private.charId.textContent = total;
    _private.charId.innerText = total;

});

jQuery(_private.textArea).on('cut paste', function () {

    // makes sure that any text cut and pasted into textarea is counted in character count

    var text = this;

    setTimeout(function () {
        total = _private.total - text.value.length;
        _private.charId.textContent = total;
        _private.charId.innerText = total;
    }, 150);

});

</pre>

<p>The website is not responsive. As it uses a JavaScript bookmarklet, mobile users are not going to be interested. I did though do some media query tweaks for tablets.</p>

<p>Nearly all the images are SVG. After being GZIPed they were up to a tenth smaller in size then their PNG equivalent and, of course, being vector based means their detail holds up well in devices and laptops with a high DPI.</p>

<p>To fall back to non supporting SVG browsers I used Modernizr object detection in the CSS and IE conditional comments in the HTML like so:</p>

<pre>

&lt;!--[if (!IE)]&gt; --&gt;
 &lt;object data="/resources/new-images/central-image.svg" type="image/svg+xml"  width="970" height="458" &gt;
      &lt;/object&gt;
&lt;!-- &lt;![endif]--&gt; 
      &lt;!--[if (IE 9)]&gt;
 &lt;object data="/resources/new-images/central-image.svg" type="image/svg+xml"  width="970" height="458" &gt;
      &lt;/object&gt;
&lt;![endif]--&gt; 
      &lt;!--[if lt IE 9]&gt;
&lt;img src="resources/no-svg/central-image.png" width="970" height="458"&gt;
&lt;![endif]--&gt; 

</pre>

<p>A lot of Android devices do not have SVG support so it's not a recommended markup solution until the latest Android version is more widely adopted.</p>

<p>The backend code that enabled me to access the Twitter API was the well-loved and well-used <a href="https://github.com/abraham/twitteroauth">TwitterOAuth</a> by Abraham Williams. It was relatively easy to implement. On the back of this I built my own classes to deal with user registration and sending Tweets. As has been documented countless times PHP is not naturally unicode friendly, so I had to enable the Internalization extension on my server so that I could access the Normalizer class.</p>

<p>I used the Google API URL shortener over other URL shortener APIs because it is so generous in it's daily limits (1 million!) and I presumed it would be the most reliable.</p>

<p>My approach to the project was to let the browser do all the work so instead of keeping user details in a database I stored them in cookies. To handle security issues I encrypted all details with rijndael-256 Mcrypt and used an SSL certificate. Although the user details I choose to store was only the bare minimum necessary like a user picture URL and their name.</p>

<h4>Conclusion</h4>

<p>I started the project before Twitter's recent shift in attitude to third-party services, and although I have invested a lot of time in the project I've barely spent any hard cash. So if Twitter pulls the plug, well, at least I have another collection of tested code that I can use in future projects.</p>

<p>I hope you are enjoy <a href="https://twttwt.com/">TwtTwt</a> as much as I have enjoyed making it. Tweet away!
</p>]]></description>
 <pubDate>2012-10-14T14:45:40Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">163 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Reflections on developing for Wordpress and Drupal]]></title>
<link>http://www.suburban-glory.com/blog?page=162</link>
<description><![CDATA[<p>Both Wordpress and Drupal are widely used and respected by a legion of developers. Wordpress is far more popular than Drupal, but Drupal is rapidly maturing with Version 8 looking likely to be a real serious contender that will breach the distance in takeup that is currently held by Wordpress.</p>

<p>Wordpress isn't a fully fledged CMS (I've avoided calling it as such in this article) but is a versatile blogging platform. This is not a criticism because that is what it is intended to be. Drupal, on the other hand, is a full-blown CMS that offers features in its core not found in Wordpress unless you add third-party plugins.</p>

<p><img src="http://www.suburban-glory.com/images/wordpress-logo.png" alt="wordpress logo" class="right" width="250" height="250" /></p>

<p>I've spend a lot of time developing for both platforms and this is my thoughts on their positive and negative sides.</p>

<p>This article is not a thorough review of both content platforms but is subjective opinion based on my experience. It would be interesting to hear the views of others who have experience of Drupal and Wordpress.</p>

<h3>The APIs</h3>

<p>The first thing of note if comparing the two is that their code is aimed at two different groups of users. Wordpress wants to allow non-professional developers to create themes and modules. Drupal was created and used by professional developers. This in itself lead to problems and the Drupal community has been engaging in a constant process of modifying and reviewing both the admin UX  and the APIs to allow greater access beyond hardcore developers.</p>

<p>The downside of the Wordpress approach is that there isn't the strict coding rules and the myriad of inbuilt functions that is a feature of Drupal. This leaves open the possibility to sloppy written third-party addons which is less likely in Drupal because of their strict coding standards and its bigger API collection.</p>

<p>A lot of the Drupal API is really nice to work with, although the learning process is somewhat steeper than that of Wordpress. I think the form API is the best PHP form creation code I have ever used. The database API uses PDO so if you have knowledge of PHP Data Objects you'll find working with the Drupal database abstraction layer a smooth experience as they also use a lot of the same PDO methods like fetchAll() and fetchObject().</p>

<p>The Wordpress form API, called Settings, isn't to my liking. For those that are used to creating PHP / HTML forms on a regular basis, then the user interface of the Settings API is too far removed from the meat and bones of HTML forms. It is important to create a user interface that allows the creation of form elements in the structure that you would if you handcoded it.</p>

<p>This is an example of creating a form in Drupal:</p>

<pre>

$form['affiliate_hoover_unique_form'] = array(
        '#type' =&gt; 'item',
        '#description' =&gt; 'Some description here for form intro',
        );

    $form['first_part'] = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t('Feed details for '.arg(4)),
        '#description' =&gt; 'Fieldset description here',
        );

    $form['first_part']['form_title'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Title'),
        '#required' =&gt; TRUE,
        '#maxlength' =&gt; 255,
        '#description' =&gt; t('Do not add anything other than the above codes for a title'),
        '#default_value' =&gt; !empty($_REQUEST['form_title']) ? check_plain($_REQUEST['form_title']) :
            check_plain($form_data-&gt;form_title),
        );

    $form['first_part']['form_body'] = array(
        '#type' =&gt; 'textarea',
        '#title' =&gt; t('Post body'),
        '#required' =&gt; TRUE,
        '#description' =&gt; t('You can use HTML in here. Examples:&lt;br&gt;To place an image: '.
            htmlspecialchars("&lt;img src="[#7#]"&gt;")."&lt;br&gt;To create a link: ".htmlspecialchars("&lt;a href="[#5#]"&gt;[#1#]&lt;/a&gt;").
            '&lt;br&gt;If you are going to include internal links you must write the full URL, ie '.
            htmlspecialchars("http://www.example.com/category/page-here")),
        '#default_value' =&gt; !empty($_REQUEST['form_body']) ? $_REQUEST['form_body'] : $form_data-&gt;
            form_body,
        );
    $form['first_part']['form_taxonomy'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Taxonomy'),
        '#maxlength' =&gt; 255,
        '#description' =&gt; t('Can be either text or code. All values must be separated with a comma'),
        '#default_value' =&gt; !empty($_REQUEST['form_taxonomy']) ? check_plain($_REQUEST['form_taxonomy']) :
            check_plain($form_data-&gt;form_categories),
        );

    $form['first_part']['post_status'] = array(
        '#type' =&gt; 'checkbox',
        '#title' =&gt; t('Status'),
        '#description' =&gt; t('Click to immediately publish the item. Otherwise, create item and manually switch to publish one at a time'),
        '#default_value' =&gt; !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : $form_data-&gt;
            post_status,
        );

    $form['update'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Update and create',
        '#submit' =&gt; array('affiliate_hoover_uniqueform_build_form_submit')
        );
        
     $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Create only',
        '#submit' =&gt; array('affiliate_hoover_uniqueform_build_form_two_submit'),
        );

    return $form;

</pre>

<p>Note the clear association between the form attributes and their values.</p>

<p>With the Wordpress Settings API this is largely absent and I found it unnecessarily confusing when I tried to push it beyond basic use.</p>

<p>In the end I created my own Wordpress form API which I documented in detail on <a href="http://www.problogdesign.com/wordpress/wordpress-development-bypassing-the-settings-api/">Pro Blog Design</a>.</p>

<h3>Less code is needed for Drupal development</h3>

<p>Writing modules for Drupal means writing less code.</p>

<p>As an example, when you uninstall a module on Drupal the database tables are automatically deleted, while with Wordpress you have to create a database call in the uninstall hook. It's touches like this that when all added together create a far smaller code base.</p>

<p><img src="http://www.suburban-glory.com/images/drupal1.png" width="250" alt="drupal logo" class="right" /></p>

<p>What warms me to Drupal is I feel that I am treading on the footsteps of previous work stretching back years. Drupal developers are particularly forward in adding inbuilt functions to deal with the many issues they have faced in the past. One negative aspect of this is that there are hundreds of functions in Drupal which, considering the already chaotic nature of the thousands of native PHP functions, means a lot more time is needed to fully learn the Drupal codex.</p>

<h3>Performance</h3>

<p>In my experience Drupal performance tops that of Wordpress. I created a module called Affiliate Hoover for both platforms. The module parses CSV data and creates individual posts from the content. As as test I parsed one file with 1153 content items, Drupal took 14 seconds while Wordpress took 37 seconds to create 1153 posts.</p>

<p>The variable isn't because of my code. The actual process of parsing the file into arrays / objects  ready for database entry takes less than a second. The rest of that time is used by the respective platforms creating database entries for each item.</p>

<p>Even when flicking between the two platforms, admin Wordpress pages have a noticeable time lag before they fully load while Drupal renders admin pages instantly.</p>

<h3>Hosting servers</h3>

<p>Both Drupal and Wordpress need at the very least a VPS but most likely a dedicated server. A big performance issue for Wordpress is the widespread availability of badly-coded plugins. If you start using a dozen of these in your build then Wordpress really has trouble coping on a server without generous memory allowance.</p>

<h3>Online documentation</h3>

<p>On a plus side for both platforms there are a ton of online videos and tutorials to refer to, with a particular help being the stackoverflow sub forms for each software item. Both, to, have a number of high quality published guides which are available for purchase.</p>

<h3>Easy of use for non-technical users</h3>

<p>The big win for Wordpress is its excellent admin section. This, I feel, is the main reason so many web designers are happy to recommend it to clients. The thought of handing over a site built with Drupal 6 to a client and expecting them to master it is laughable. Thanks to Mark Boulton's web design company Drupal 7 made dramatic improvements to the admin UX but there is still some way to go which I hope will be fully realised in version 8.</p>

<h3>Theming</h3>

<p>The next big win for Wordpress is its theming. It's a real pleasure to work with. The Drupal Theme API is horrendous. What with all the processor and pre-processor hooks there is often several different solutions to one problem. Please, just one solution for one problem and no more. Thankfully, Drupalistas now recognise this and in version 8 it will be replaced by the Symfony template system, Twig. Once implemented this has the potential to dramatically increase the take up of Drupal by web design agencies who need a faster and less complicated way of creating Drupal themes (time is money).</p>

<h3>Conclusion.</h3>

<p>There is no Drupal vs Wordpress debate. It's simply the case that one may be more suitable for a particular project than the other. Any commercial company should potentially be prepared to use either.</p>

<p>As detailed above, both have many positive sides to their API approach and each have some negative parts. Neither is perfect, but they are mature platforms much in demand by clients. If you are a professional developer it makes sense to learn both platforms so as to increase your opportunities in finding work.</p>

<p>If you are unfamiliar with developing for either or both here are some books that I would recommend:</p>

<p><strong><a href="http://goo.gl/ZKyW3">Pro Dupal 7 Development</a></strong> by Todd Tomlinson and John K. VanDyk (Apress, 2010)<br /><strong><a href="http://goo.gl/NdG7i">Professional Wordpress Plugin Development</a></strong> by Brad Williams, Ozh Richard and Justin Tadlock (Wrox, 2011)<br /><strong><a href="http://goo.gl/O7KrK">Drupal 7 Module Development</a></strong> by Matt Butcher, Matt Farina, Ken Rickard, Greg Dunlap, Larry Garfield and John Albin Wikins (Packt, 2010)</p>]]></description>
 <pubDate>2012-07-02T06:49:43Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">162 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using the Pomodoro technique for time management]]></title>
<link>http://www.suburban-glory.com/blog?page=161</link>
<description><![CDATA[<p>It would be nice to be hyper-enthusiastic for every single job but the truth is that some coding jobs are tedious and the temptation of Twitter, Urban75, BBC news site etc. has a habit of overriding the work on hand.</p>

<p>One method of handling these dull jobs was first introduced to me by a fellow member of Forrst.</p>

<p>The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. It works by breaking down the work time into the following segments:</p>

<ul><li>20 minutes of work</li>
<li>5 minutes break</li>
<li>20 minutes of work</li>
<li>5 minutes break</li>
<li>20 minutes of work</li>
<li>5 minutes break</li>
<li>20 minutes of work</li>
<li>20 minute break</li>
</ul>

<p>And then repeat again.</p>

<p>This has the advantage of making you more disciplined with the time at hand. Not only does this strict structure of working to the clock mean you are less likely to let your mind wander, but it is easy in coding to become fixated on minor bugs. With the clock ticking down I release that these minor problems aren't fundamental to the current state of the project and so I put them aside for later.</p>

<p>Another positive aspect is that it stops me from continuously working in front of a monitor for hours at a time. In the break segments I make myself a cup of tea or have a fag. These moments are also important reflection periods.</p>

<p>To assist with timekeeping I use a great AIR app called <a href="http://code.google.com/p/pomodairo">Pomodairo</a>. It's a small little device that runs in the background as you work and chimes when a segment has ended.</p>

<p>Give it a go and tell me what you think.
</p>]]></description>
 <pubDate>2012-06-29T12:44:56Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">161 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Penny Books launched, books for a penny À gogo]]></title>
<link>http://www.suburban-glory.com/blog?page=160</link>
<description><![CDATA[<p><img src="http://www.suburban-glory.com/images/pennybooks-logo.png" alt="penny books logo" class="right" /></p>

<p>I'm pleased to announce the launch of a little side project of mine, <a href="http://pennybooks.info/">Penny Books</a>. It is a quirky book search engine that uses the Amazon API to find books which are on sale for one penny.</p>

<p>This idea originally came to me years ago. I bought a book called The Web Developers Guide to Amazon eCommerce Service by Jason Levitt, but being the coding pup I was then, the contents went over my head. Today I'm more than intellectually equipped for the job!</p>

<p>Amazon uses SOAP as its preferred information sharing protocol but, thankfully, I didn't have to spend time on the details of this technology because I used Jan Eichhorn's <a href="https://github.com/Exeu/Amazon-ECS-PHP-Library">Amazon Product Lookup and Product Search Library</a>. This little script is fantastically user-friendly and I never had any problems that couldn't be easily overcome.</p>

<p>Another part of the server-side code was limiting the number of searches per person per hour. Amazon places very strict limits on access to its data and it would have taken only a small number of visitors to exhaust the hourly rate. The only foolproof method is by building a database and tracking visitors' IP addresses and their number of searches. It's important as well to have fields for the time of their last visit and the time of their “banning”. By using all these fields it is possible to effectively block access to the remote API call if the user exceeds the limit and also delete old and unwanted database entries.</p>

<p>Also on the server-side, the site uses Bad Behavior and Project Honeypot to help repulse spam.</p>

<p>For the client-side code I used the jQuery library for the usual cross-browser compatibility issues and the wonderful <a href="http://srobbin.com/jquery-plugins/backstretch/">Backstretch plugin</a> for the central fixed background image. It is possible to use a background image in CSS and the background-size property, but, like all CSS3, it isn't supported in Internet Explorer 8 and below. Also, I've used Backstretch on a number of different projects now and I've found that it renders the images a lot sharper than “background-size: contain” does.</p>

<p>As the site uses AJAX, I also used the HTML5 History API in order to create usable URLs (Twitter is currently in the process of swapping over to this new API). The only sane way of beginning to achieve acceptable cross-browser working code is to use Benjamin Lipton’s <a href="https://github.com/balupton/History.js/">History.js</a>. I write “beginning” on purpose because there are bugs in the code and it is necessary to write more JavaScript to fill in this hole.</p>

<p>The CSS is fully responsive with a dependence on relative and percentage measurements. </p>

<p>On the left hand side on the home page are social media buttons. I wanted these removed from the mobile version. The lazy way is to hide it with “display: none” but the mobile platform will still download the code. The method I used was to build the social media buttons with JavaScript and, using screen.width, to only access the code on large devices.</p>

<p>So, I hope you have fun with Penny Books and you find those reading bargains!
</p>]]></description>
 <pubDate>2012-06-13T13:51:24Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">160 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Hide CSS in Internet Explorer 8 and below]]></title>
<link>http://www.suburban-glory.com/blog?page=157</link>
<description><![CDATA[<p>There is, of course, an easy of way of targeting certain versions of Internet Explorer by using conditional comments. This allows you to separate your CSS into different files based on browser version.</p>

<p>If you know your CSS then you should only occasionally need to worry about targeting particular legacy versions of Microsoft's browser, but there are occasions when it is a necessity.</p>

<p>If you only require a small amount of code it hardly seems worth creating a different style sheet.</p>

<img src="http://www.suburban-glory.com/images/CSS3_Logo.png" width="240" height="278" alt="css3 logo" class="right" /><p>There are a number of hacks that enable the coder to target versions of Internet Explorer within the main CSS file. Here are a few of them. All that is needed is to add the following to the root of the selector list:</p>

<h3>IE6 and below</h3>

<pre>
* html /* selectors here */{

/* properties and values */

} 
</pre>

<p></p>

<h3>IE7 and below</h3>

<pre>
*:first-child+html /* selectors here */{

/* properties and values */

} 
</pre>

<h3>IE7 and up</h3>

<pre>
html&gt;body /* selectors here */{

/* properties and values */

} 
</pre>

<p>The last isn't really a hack as it just ultilizes the descendent selector that isn't understood by IE6.</p>

<p>I needed to hide a class called “spinning-wheel” from versions of IE8 and below. It used a lot of CSS3 and as it was only a minor usability feature so it was easier to hide it from older versions of IE rather backport the code.</p>

<p>One way of doing that was to create different style sheets with conditional comments and use display: none for the class. But that's overkill. Instead, I placed :root at the foot of the selector. In HTML the :root is <em>always</em> HTML (it's different in XML).</p>

<pre>
:root .spinning-wheel{

/* properties and values */

}
</pre>

<p>The CSS block is now totally ignored by IE8 and below.
</p>]]></description>
 <pubDate>2012-04-08T14:56:18Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">157 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[:focus pseudo-class feature detection]]></title>
<link>http://www.suburban-glory.com/blog?page=156</link>
<description><![CDATA[<p><img src="http://www.suburban-glory.com/images/240px-JavaScript-logo.png" width="240" height="240" alt="javascript logo" class="right" /></p>

<p>I'm not quite sure whose idea the CSS3 :focus pseudo-class class was, but including it in the CSS spec was a minor act of ingenuity.</p>

<p>When you view CSS-only animation then :focus is usually at the centre of the code. For examples, take a look at this <a href="http://tympanus.net/Tutorials/LoginRegistrationForm/">login and registration form</a>, <a href="http://tympanus.net/Tutorials/CSS3ContentNavigator/index.html#slide-main">content navigator</a> and <a href="http://tympanus.net/Tutorials/CSS3PageTransitions/index.html#home">page transition effect</a>.</p>

<p>As :focus is so wonderful why don't we see more use of it outside of exhibition demos? The answer is two words, Internet Explorer. Versions 8 and below of Microsoft's browser do not support this useful CSS pseudo-class.</p>

<p>Due to this lack of support coders have preferred using JavaScript and its event-driven programming approach to user interaction; but as the demise of the legacy browsers continues and CSS continues to claim greater chunks of the presentation layer, then the appeal of :focus will grow in tandem.</p>

<h3>JavaScript object detection</h3>

<p>I'm currently working on a version of the well-known lightbox script. I wanted to fully utilise CSS3 animation but have a credible full back for the legacy browsers. As my version was dependent on :focus, the first step was to create a feature detection script so as to then provide a JavaScript event-driven fallback.</p>

<p>It seems though that feature detection for :focus is far from straight forward so I had to resort to a hack. A hack, by my definition, is to use code for a purpose other that what it was intended for. In my example below, I looked for CSS opacity support. Now I know that this property is not supported in IE versions 8 and below and :focus is not supported in versions 8 and below so, therefore, I tested for opacity support because it is easier to script for.</p>

<p>JavaScript purists might throw their legs in the air and have a bit of a fit to this approach, but Internet Explorer is an imperfect browser so solutions to dealing with it are also sometimes imperfect.</p>

<p>The code I created is below. To see it working <a href="http://jsfiddle.net/TCotton/e37dG/17/">click through to this jsfiddle page I have created</a>.</p>

<pre>

var testFocus = (function () {

    var legacy = {
        test: function () {
            return document.getElementsByTagName('body')[0].style.opacity !== undefined;
        }
    };

    var nonLegacy = {
        test: function () {
            return document.getElementsByTagName('body')[0].style.opacity !== undefined;
        }
    };

    if (nonLegacy.test() !== undefined) {
        return nonLegacy;
    } else {
        return legacy;
    }

})();

// Run script like this:
testFocus.test();

</pre>]]></description>
 <pubDate>2012-04-05T17:34:48Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">156 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Centring elements horizontally and vertically with the CSS3 calc() function]]></title>
<link>http://www.suburban-glory.com/blog?page=155</link>
<description><![CDATA[<p>Another month arrives and more CSS3 comes into play. March was witness to calc() being incorporated into the Webkit engine.</p>

<p>I wrote back in <a href="http://www.suburban-glory.com/blog?page=130">January 2011</a> about the calc() function and stated it would be one to watch in the future:</p>

<blockquote><p>
I can guarantee that you will see a multitude of articles written about this function in the coming years. It will be particularly useful when a number of new CSS3 units such as viewport height and width come into play, and when the use of the attr() function is expanded upon.
</p></blockquote>

<p>Now that it has been incorporated into the Webkit engine the time of calc() has arrived, and one critical use will be the horizontal and vertical centring of page elements.</p>

<p>To briefly summarise calc(), it allows mathematical equations to be used in style sheets. So the basic mathematical operators are permitted and, importantly, so is the mixing of value types. As an example, the following is permissible:</p>

<pre>
calc(50% - 20px);
</pre>

<p>Its key benefit will be to responsive design as it allows for better control of fluid layouts.</p>

<p>As a demonstration I'll centre an image on a page. The dimensions of the image is 320 x 305. </p>

<p>The first part of the calculation reads as so:</p>

<pre>
img {
position : absolute;
 top: calc(100% - 50% );
 left: calc(100% - 50%);
}
</pre>

<p>That is 100% or the parent container's height and width minus 50% of this figure. It is not necessary to specify the height and width of the parent container in the HTML or CSS as the browser  calculates this.</p>

<p>The image is now semi-centred but it does so on its top and left axis.</p>

<p>We need to take the image dimensions into consideration:</p>

<pre>
img {
position : absolute;
 top: calc(100% - 50% - 305px);
 left: calc(100% - 50% - 302px);
}
</pre>

<p>Almost there, but we need to evenly distribute the image dimensions across all axis' like so:</p>

<pre>
img {
position : absolute;
 top: calc(100% - 50% - (305px / 2));
 left: calc(100% - 50% - (320px / 2));
}
</pre>

<p>Perfect! Now make sure the browser prefixes are present:</p>

<pre>
img {
position : absolute;
 top: -moz-calc(100% - 50% - (305px / 2));
 left: -moz-calc(100% - 50% - (320px / 2));
 top: -webkit-calc(100% - 50% - (305px / 2));
 left: -webkit-calc(100% - 50% - (320px / 2));
 top: calc(100% - 50% - (305px / 2));
 left: calc(100% - 50% - (320px / 2));
}
</pre>

<p><a href="http://www.suburban-glory.com/calc.html">Lets see the above code in action</a>.</p>

<p>Centring elements on a page like this is only possible if you know the dimensions of the object you wish to centre.</p>

<p>At the time of writing, calc() works in Firefox and Internet Explorer versions 9 and above. It is now a part of Webkit but has yet to filter out to Chrome or Safari.</p>

<p>calc() will become even more user-friendly once the attr() function is expanded on. We could then use code that looks like this:</p>

<pre>
img {
position : absolute;
 top: -moz-calc(100% - 50% - (attr(height) / 2));
 left: -moz-calc(100% - 50% - (attr(width) / 2));
 top: -webkit-calc(100% - 50% - (attr(height) / 2));
 left: -webkit-calc(100% - 50% - (attr(width) / 2));
 top: calc(100% - 50% - (attr(height) / 2));
 left: calc(100% - 50% - (attr(width) / 2));
}
</pre>

<p>As I wrote above, the main beneficiaries of calc() will be the responsive design crew but it's just as useful on the desktop.</p>

<p>Now it's over to you, dear coder, to see what other uses calc() can bring to the CSS-using masses. Report back!</p>]]></description>
 <pubDate>2012-04-02T10:23:38Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">155 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using cookies instead of wp_localize_script()]]></title>
<link>http://www.suburban-glory.com/blog?page=154</link>
<description><![CDATA[<p><img src="http://www.suburban-glory.com/images/wordpress-logo.png" width="250" height="250" alt="Wordpress logo" class="right" /></p>

<p>Sometimes the most obvious solution isn't the one that comes to you first. </p>

<p>wp_localize_script() is a wonderful little slice of Wordpress code that allows you to easily add PHP-created info into an accessible JavaScript object. </p>

<p>On an admin form I needed to trigger a JavaScript object on successful completion. My method was to create an option field which was updated on successful form completion, with the same option field being called by wp_localize_script() . </p>

<p>However, the JavaScript object created by wp_localize_script() was only ever updated after the form had been sumitted twice. Why? It took me a couple of hours to work it out but as the wp_localize_script() was called in the class constructor then any form action would always happen afterwards. </p>

<p>So now I'm thinking, What about using AJAX? But the best and most simple answer was to use cookies.</p>

<p>After form completion I set a cookie with a name of “_multi_cov” and the name of the form as its value:</p>

<pre>
setcookie("_multi_cov", $option_name);
</pre>

<p>The first part of the JavaScript checks to see if the "_multi_cov"cookie is set, if so run the object method:</p>

<pre>
if (document.cookie.indexOf("_multi_cov") !== -1) {
            OptionForm.multiFormName();
}
</pre>

<p>Now in the multiFormName() method it is necessary to filter out the name of the form from the cookie:</p>

<pre>
 var key, cookieMonster, mySplitResult, lastSplitResult;

 function removeArrayElement(element, index, array) {
     return (element !== "_multi_cov");
 }

 cookieMonster = document.cookie;
 mySplitResult = cookieMonster.split(";");

 for (x = 0, l = mySplitResult.length; x &lt; l; x += 1) {

     if (mySplitResult[x].indexOf("_multi_cov") !== -1) {
         lastSplitResult = mySplitResult[x].split("=");
         key = lastSplitResult.filter(removeArrayElement).toString();
     } // end if
 } // end for
</pre>

<p>In the key variable is the name of the form.</p>

<p>I also deleted the cookie at the end of the JavaScript method:</p>

<pre>
document.cookie = "_multi_cov" + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
</pre>

<p>The problem was that I was so in love with wp_localize_script() that it blinkered me to exploring a more appropriate alternative. In future I'll use wp_localize_script() for complex arrays and an alternative cookie solution for simple strings.</p>]]></description>
 <pubDate>2012-03-29T08:19:20Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">154 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Setting up Eclipse IDE for JavaScript and PHP development]]></title>
<link>http://www.suburban-glory.com/blog?page=153</link>
<description><![CDATA[<p>Everybody has their own IDE of choice with <a href="http://www.sublimetext.com/">Sublime Text</a> seemingly the most popular at the moment. A good IDE should be solid, stable software with full features and UX which leaves you, the coder, freedom to concentrate on the job in hand.</p>

<p>My personal favourite is phpDesigner 8. Although this is proprietary software, it has all the features needed for PHP and JavaScript devs. Included in the package is debugging, code beutifying and auto-completion. What I most like about it is that it comes complete in one install package and there is no need for modification.</p>

<p><img src="http://www.suburban-glory.com/images/eclipse.png" width="250" height="250" alt="Eclipse logo" class="right" /></p>

<p><a href="http://www.mpsoftware.dk/phpdesigner.php">phpDesigner</a> is for Windows but it is easy to install on Linux or a Mac if you use a Windows emulator like <a href="http://www.winehq.org/">Wine</a>.</p>

<p><a href="http://www.eclipse.org/">Eclipse</a> has been around for several years and is a particular favourite with Java programmers. It is also possible to customise Eclipse for use with PHP and JavaScript.</p>

<p>I just set up a version up on my desktop but I had a lot of problems along the way. Like a typical open source project, the online documentation is poor. Here is how I installed it.</p>

<p>Firstly, <a href="http://www.eclipse.org/downloads/">download the latest version of Eclipse here</a>. Make sure you download the JavaScript devs version.</p>

<p>Now you will need to install the Aptana plugin. <a href="http://aptana.com/products/studio3/download">Visit the Aptana website</a> and follow the instructions.</p>

<p>Next, you'll need to add some more plugins.</p>

<p><a href="http://web.napopa.com/en/2011/10/references/using-eclipse-ide-for-php-javascript-and-markup-web-development/">Go to this article here</a> and at the bottom download the attachment. Follow the instructions in the article about how to install the file.</p>

<p>My advice would be to deal with one plugin at a time rather than all together at once. Beware, some take a long time to download and install. Once you have installed all the addons go to “help” &gt; “check for updates” in the Eclipse menu. Again, this may take some time so go make yourself a cup of tea.</p>

<p>After you have achieved all of the above you now have Eclipse modified for PHP and JavaScript development installed on your OS.</p>

<p><strong>There is now a <a href="http://science.webhostinggeeks.com/eclipse-ide">Serbo-Croatian version of this article</a> which was translated by <a href="http://science.webhostinggeeks.com/">Anja Skrba</a></strong></p>]]></description>
 <pubDate>2012-03-20T06:45:30Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">153 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Checking for unique values in a multidimensional array]]></title>
<link>http://www.suburban-glory.com/blog?page=152</link>
<description><![CDATA[<p><img width="281" height="193" alt="PHP elephant" class="right" src="http://www.suburban-glory.com/images/elephpant_281_193.png" /></p>

<p>There are lots of different solutions to this problem posted on forums all over the web. But here is a very simple solution I came up with the other day.</p>

<p>Below was an array whose values were from a form. I wanted to make sure that the user only submitted unique data for every field.</p>

<pre>
array
  1 =&gt; 
    array
      'feedName' =&gt; string 'Name of feed here' (length=17)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a383a22666565644e616d65223b733a323a226964223b733a393a22666565642d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32313a22546865206e616d65206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22323030223b733a353a2276616c7565223b733a31373a224e616d65206f6620666565642068657265223b733a363a2273656c656374223b623a303b7d' (length=430)
  2 =&gt; 
    array
      'urlName' =&gt; string 'http://www.bbc.co.uk/news/world-middle-east-17323093' (length=52)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32303a225468652055524c206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a34373a22687474703a2f2f7068702e6e65742f6d616e75616c2f656e2f66756e6374696f6e2e61727261792d706f702e706870223b733a363a2273656c656374223b623a303b7d' (length=484)
  3 =&gt; 
    array
      'urlName' =&gt; string 'http://www.bbc.co.uk/news/uk-politics-17323504' (length=46)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32343a225468652055524c206f662074686520666565642074776f3a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a38313a22687474703a2f2f737461636b6f766572666c6f772e636f6d2f7175657374696f6e732f373338393137362f636f6d706172652d6d756c746964696d656e73696f6e616c2d6172726179732d696e'... (length=560)
  4 =&gt; 
    array
      'feedName' =&gt; string 'Name of feed here too' (length=21)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a383a22666565644e616d65223b733a323a226964223b733a393a22666565642d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32313a22546865206e616d65206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22323030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=400)
  5 =&gt; 
    array
      'urlName' =&gt; string 'http://www.bbc.co.uk/news/uk-england-tyne-17324795' (length=50)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32303a225468652055524c206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=394)
  6 =&gt; 
    array
      'urlName' =&gt; string 'http://www.bbc.co.uk/news/uk-17282903' (length=37)
      'input_gen' =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32343a225468652055524c206f662074686520666565642074776f3a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=402)
</pre>



<p>The first part of the code meant trimming down the multidimensional array to something more manageable like so (don't be distracted by the long strings of hex numbers - that's another story for another time):</p>

<pre>
$tmp = array();

foreach ($array as $row) {

    foreach ($row as $result) {

        $tmp[] = $result;

    } // end foreach
    
} // end foreach
</pre>

<p>So now the array looks like this:</p>

<pre>
array
  0 =&gt; string 'Name of feed here' (length=17)
  1 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a383a22666565644e616d65223b733a323a226964223b733a393a22666565642d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32313a22546865206e616d65206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22323030223b733a353a2276616c7565223b733a31373a224e616d65206f6620666565642068657265223b733a363a2273656c656374223b623a303b7d' (length=430)
  2 =&gt; string 'http://www.bbc.co.uk/news/world-middle-east-17323093' (length=52)
  3 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32303a225468652055524c206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a34373a22687474703a2f2f7068702e6e65742f6d616e75616c2f656e2f66756e6374696f6e2e61727261792d706f702e706870223b733a363a2273656c656374223b623a303b7d' (length=484)
  4 =&gt; string 'http://www.bbc.co.uk/news/uk-politics-17323504' (length=46)
  5 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32343a225468652055524c206f662074686520666565642074776f3a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a38313a22687474703a2f2f737461636b6f766572666c6f772e636f6d2f7175657374696f6e732f373338393137362f636f6d706172652d6d756c746964696d656e73696f6e616c2d6172726179732d696e'... (length=560)
  6 =&gt; string 'Name of feed here too' (length=21)
  7 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a383a22666565644e616d65223b733a323a226964223b733a393a22666565642d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32313a22546865206e616d65206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22323030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=400)
  8 =&gt; string 'http://www.bbc.co.uk/news/uk-england-tyne-17324795' (length=50)
  9 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32303a225468652055524c206f662074686520666565643a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=394)
  10 =&gt; string 'http://www.bbc.co.uk/news/uk-17282903' (length=37)
  11 =&gt; string '613a383a7b733a343a2274797065223b733a343a2274657874223b733a343a226e616d65223b733a373a2275726c4e616d65223b733a323a226964223b733a383a2275726c2d6e616d65223b733a353a22636c617373223b623a303b733a343a2264657363223b733a32343a225468652055524c206f662074686520666565642074776f3a223b733a393a226d61786c656e677468223b733a333a22333030223b733a353a2276616c7565223b733a333a22594553223b733a363a2273656c656374223b623a303b7d' (length=402)
</pre>

<p>The magic comes in using array_unique(). If there are any values that are the same then this function will remove them. So, by comparing the number of elements in the array with and without using array_unique() we know there is repetition if there is a dissonance between the numbers. How easy is that! </p>

<p>The full function looks like so:</p>

<pre>
function duplicate_entries($array) {

    $tmp = array();

    foreach ($array as $row) {

        foreach ($row as $result) {

            $tmp[] = $result;

        } // end foreach

    } // end foreach

    if (count($tmp) !== count(array_unique($tmp))) {
        return FALSE;
    }

}
</pre>]]></description>
 <pubDate>2012-03-10T15:39:55Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">152 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using PHP to parse XML, RSS or CVS files which are compressed with ZIP or  GZIP]]></title>
<link>http://www.suburban-glory.com/blog?page=151</link>
<description><![CDATA[<p>Reading and creating XML, RSS and CVS files is essential knowledge when it comes to using PHP because they are all formats commonly used for a wide range of purposes.</p>

<p>I'm just in the middle of creating a Wordpress plugin that downloads affiliate scripts from a remote server. The files can be in any of the three formats.</p>

<img src="http://www.suburban-glory.com/images/elephpant_281_193.png" width="281" height="193" class="right" alt="PHP elephant" /><p>Previously I've used the XMLWriter and XMLWriter classes, the SimplePie library and some dabbling with SOAP, but this was my first introduction to dealing with CVS.</p>

<p>Below are some functions that I created for this project with explanations. In time I'll re-factor the code into class methods and with the appropriate inbuilt Wordpress functions.</p>

<p>The first step in downloading a remote source is to check whether it actually exists. It may be the case that the user has wrongly typed the URL or maybe the server is temporarily down.</p>

<p>This is the function I created for this purpose:</p>

<pre>

function remote_file_exists($url) {

    // IMPORTANT : Check to see if the file exists on the remote server
    // If the HTTP code is 200 then return true - everything else false

    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_NOBODY, true);
    curl_exec($ch);
    $retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

    if ($retcode === 200) {

        return true;

    } else {

        return false;

    }
}

</pre>

<p>
It uses the Client URL (cURL) library which has been a component of PHP since version 4.0.2. CURLOPT_NOBODY used in the <a href="http://www.php.net/manual/en/function.curl-setopt.php">curl_setopt</a> function excludes the body from download as we are only after the header details, while CURLINFO_HTTP_CODE in <a href="http://www.php.net/manual/en/function.curl-getinfo.php">curl_getinfo</a> returns the HTTP status code. A 200 HTTP status code means the file is okay to download.</p>

<h3>PHP &amp; ZIP</h3>

<p>The first thing when accessing a ZIP file is to download it onto the server with the following code:</p>

<pre>

function grab_file($url, $new_file) {

    //get file
    $ch = curl_init();
    $fp = fopen("zip/$new_file", "w");

    $options = array(CURLOPT_URL =&gt; $url, CURLOPT_HEADER =&gt; 0, CURLOPT_FAILONERROR =&gt; 1, CURLOPT_AUTOREFERER =&gt; 1, CURLOPT_BINARYTRANSFER =&gt; 1, CURLOPT_RETURNTRANSFER =&gt; 1, CURLOPT_FOLLOWLOCATION =&gt; 1, CURLOPT_TIMEOUT =&gt; 5, CURLOPT_FILE =&gt; $fp);

    curl_setopt_array($ch, $options);
    $file = curl_exec($ch);
    curl_close($ch);
    fclose($fp);

    if (!$file) {
 
        return false;

    } else {

        return true;

    }
}

</pre>

<p>Again, back to cURL. This component of PHP can initially look deceptively simple but is a Swiss army knife that has a multitude of options. <a href="http://www.php.net/manual/en/function.curl-setopt.php">For a list of which take a look at this page.</a></p>

<p>CURLOPT_FILE is the new file the contents will be written to, CURLOPT_TIMEOUT is set to five seconds, CURLOPT_URL is the resource to be downloaded,  CURLOPT_RETURNTRANSFER sets the return as a string while  CURLOPT_BINARYTRANSFER permits binary data.</p>

<p>I had lot of trouble setting the right options in the function above but thankfully <a href="http://stackoverflow.com/questions/3713472/using-curl-with-pclzip-class">a thread on Stackoverflow</a> pointed me in the right direction.</p>

<p>Now there is a copy of the ZIP file on your server it is time to unzip it to reveal the goodies underneath. This can be done with the PHP ZipArchive class:</p>

<pre>

function get_zip($data) {

    $zip = new ZipArchive();
    $filename = $data;

    if ($zip-&gt;open($filename, ZIPARCHIVE::CREATE || ZIPARCHIVE::OVERWRITE)) {

        $zip-&gt;extractTo('feeds');
        $zip-&gt;close();

        return true;

    } else {

        return false;

    }
}

</pre>

<p>The above code should be self-explanatory. However, I have been informed that some shared servers have the PHP ZIP option switched off. I'm not sure if this is still the case in 2012 but I decided to use instead a third-party class called <a href="http://www.phpconcept.net/pclzip/">PclZip</a> which is released on a GPL and LGPL free software license. </p>

<pre>

function unzip($file) {

    $archive = new PclZip("zip/$file");

    $list = $archive-&gt;extract(PCLZIP_OPT_PATH, "feeds", PCLZIP_OPT_REMOVE_ALL_PATH);

    if (!$list[0]['filename']) {

        die("Error : " . $archive-&gt;errorInfo(true));

    } else {

        $path = "zip/$file";
        unlink($path);
        return $list[0]['filename'];

    }
}

</pre>

<p>There are a number of optional arguments that can be used when extracting the file for <a href="http://www.phpconcept.net/pclzip/user-guide/5">a full list of which read this page.</a></p>

<h3>PHP &amp; GZIP</h3>

<p>The difference between the Zip and the Zlib module is that it is possible to save a resource to memory which is why I haven't used cURL here.</p>

<pre>

function get_gzip($url, $new_file, $ext) {
    
    $new_file = "feeds/$new_file.$ext";

    $remote = gzopen($url, "rb");
    $home = fopen($new_file, "w");

    while ($string = gzread($remote, 4096)) {
        fwrite($home, $string, strlen($string));
    }
    gzclose($remote);
    fclose($home);
    
    if($home !== null) {
        
        return $new_file;
        
    } else {
        
        return false;
        
    }
}

</pre>

<p>Thanks go to a user on Stackoveflow who pointed out a far more memory efficient way of grabbing massive files by downloading it in chunks.</p>

<h3>RSS &amp; PHP</h3>

<p>There are several different RSS formats which are all XML but are radically different from each other. I would strongly suggest that you don't try to be a PHP superhero and attempt to write your own code for parsing RSS but instead use a third-party script.</p>

<p>The leading industry favourite for this job is <a href="http://simplepie.org/">SimplePie</a>, originally created by <a href="http://ryanparman.com/">Ryan Parman</a>, <a href="http://ryanmccue.info/">Ryan McCue</a> and <a href="http://gsnedders.com/">Geoffrey Sneddon</a>. Seriously, use SimplePie – the alternative may be premature ageing or madness.</p>

<p>Here is the most basic SimplePie example:</p>

<pre>

$feed = new SimplePie();

$feed-&gt;set_feed_url( url here );

$success = $feed-&gt;init();

</pre>

<p>After creating an instance of the class, call the feed and then run the init method. Easy!</p>

<h3>CVS &amp; PHP</h3>

<p>Comma-separated values (CSV) files are wildly popular amongst a whole range of software applications but it's not a format that finds common use amongst web developers. Unlike XML, CVS is not a mark-up language but plain text which uses commas to separate the data. <a href="http://php.net/manual/en/function.fgetcsv.php">PHP does have its own CVS file function</a>, but it's probably best if you use the PEAR class, <a href="http://pear.php.net/package/File_CSV_DataSource">File_CSV_DataSource</a>. Created by <a href="https://github.com/ktlacaelel">Kazuyoshi Tlacaelel</a> it is released under the permissive MIT license.</p>

<p>Here is File_CSV_DataSource used in a function that returns the entire CSV file in an array:</p>

<pre>

function parse_csv($file) {

    $csv = new File_CSV_DataSource;

    $feed = $file;

    if ($csv-&gt;load($feed)) {

        return $csv-&gt;getrawArray();

    } else {

        return false;

    } // end if ($csv-&gt;sadfsad
}

</pre>

<h3>XML &amp; PHP</h3>

<p>For XML use the <a href="http://php.net/manual/en/function.simplexml-load-file.php">simplexml_load_file</a>, a SimpleXML function.</p>

<p>In its most basic form we can create an array as so:</p>

<pre>

function parse_xml($file) {

    $xml = simplexml_load_file($file);

    return $xml;
}

</pre>

<p>If you are developer that has experience in the above areas then please feel free to leave a comment because in PHP there are many different ways to skin a cat.</p>]]></description>
 <pubDate>2012-02-23T16:26:31Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">151 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using advanced JavaScript array methods]]></title>
<link>http://www.suburban-glory.com/blog?page=150</link>
<description><![CDATA[<p>Advanced is an adjective used subjectively here because you may be already using the methods below on a regular basis, but in by using the term advanced I am referring to JavaScript from versions 1.6 to 1.8 that are not available in Internet Explorer versions 8 and below.</p>

<p>IE 8 was launched with the proud boast of being CSS 2.1 and ECMAScript 3 compliant, which for Microsoft was quite an achievement in 2009. But this technology is looking particularly old hat now. IE9 saw a massive jump in JavaScript support and I would expect that there will be an equally big jump between IE10 and IE9. <a href="http://kangax.github.com/es5-compat-table/">For ECMAScript 5 browser compatibility see kangax's pretty table here.</a></p>

<p><img src="http://www.suburban-glory.com/images/240px-JavaScript-logo.png" width="240" class="right" alt="240px-JavaScript-logo.png" /></p>

<p>However IE8 is still one of the most popular browsers but being held back by only using ECMAScript 3 is no longer a necessity because of <a href="http://documentcloud.github.com/underscore/">the underscore.js library</a>. Here you will find a full range of EMCA5 array methods which cannot be used in the legacy browsers. There may well be other JavaScript libraries that offer the same goodies but that isn't what this post is concerned with. Underscore.js nicely compliments jQuery so let them both flow some code love into your next project.</p>

<h3>indexOf</h3>

<p>JavaScript array methods are split into three camps: mutator, accessor and iteration.</p>

<p>You'll probably be already familiar with many JavaScript mutator methods, which are pop, push, reverse, shift, sort, splice and unshift; but JavaScript 1.6 introduced a new but extremely useful accessor method, indexOf.</p>

<p>This is already widely used as a string object method, but has now been extended to the array object and offers the equivalent to the PHP in_array function.</p>

<p>When Jonathan Snook wrote <a href="http://snook.ca/archives/javascript/testing_for_a_v">Testing for a Value in a JavaScript Array</a> in 2006 he fell back to using the in operator in the for loop to achieve the same result, but now the in operator can be thrown out and indexOf let loose:</p>

<pre>

var anArray = ['john','mary','george','freddy','jane']

console.log(anArray.indexOf("mary"));

// answer 1

</pre>

<h3>forEach</h3>

<p><a href="http://en.wikipedia.org/wiki/Foreach_loop">The foreach loop is a feature of all the main programming languages</a> and now, thanks to ECMAScript 5, we can use it in JavaScript. It is one of many new iteration methods incorporated into all modern browsers.</p>

<p>forEach is useful for looping through array values:</p>

<pre>

var anArray = ['john', 'mary', 'george', 'freddy', 'jane'];
var aString;

if (typeof anArray !== "sring") {

    console.log("I am an array object");

}

// result: I am an array object

anArray.forEach(function (result) {

    aString = result;

    if (typeof result === "string") {
        aString += " is a string";
    }

    console.log(aString);

});

// Result:
// john is a string
// mary is a string
// george is a string
// freddy is a string
// jane is a string

</pre>

<h3>filter</h3>

<p>This allows the coder to take out values from an array like so:</p>

<pre>

var anArray = ['john', 'mary', 'peter', 'susan', "", 'mark', 'sarah', undefined];

var newArray = anArray.filter(function (value) {

    return !(value === 'john' || value === 'peter' || value === 'mark' || value === "" || value === undefined);

});

console.log(newArray);

// return ["mary", "susan", "sarah"]

</pre>

<p>Above removes the boys from the list plus empty or undefined values. Admittedly, the repeated use of OR in the example above is a little clumsy but it demonstrates the purpose of filter clearly. This is   an array iteration method that would buddy up well with regex.</p>

<h3>every</h3>

<p>This allows you to loop through an array to find all elements that meet the declared criteria and returns true or false. This new method is particularly useful for dealing with numbers like so:</p>

<pre>

var anArray = [10, 21, 56, 124, 450];

anArray.every(function (value) {

    return (value &gt; 50);

});
// returns false

anArray.every(function (value) {

    return (value &gt; 5);

});
// returns true

</pre>

<h3>map</h3>

<p>In the above methods .forEach() returns nothing (it iterates through array and spits out strings), .every() returns a boolean value, while .map() returns a new array of objects. Let me explain with an example:</p>

<pre>

var anArray = [2, 67, 789, 223454];

var newArray = anArray.map(function (result) {

    return Math.sqrt(result) + Math.PI - Math.LOG10E * Math.LN10;

});

console.log(newArray)

// result: [3.555806215962888, 10.326945425462243, 30.23073646396607, 474.85080559533054]

</pre>

<p>Above used an array of digits, did some funky maths manipulation and then returned the results into a new array.</p>

<h3>Some end notes</h3>

<p>Hopefully this short post has opened up a number of possibilities for array iteration to you other than using the for loop.</p>

<p>The code in this post uses anonymous functions as callbacks but they can also be named. Also, I referenced underscore.js in the introduction but you don't even have to go as far using this script. The Mozilla developers have provided compatibility code for all the array methods which extend the Array.Prototype. As an example, cut the paste the code below and place it at the beginning of your script if you want to start using the filter method in all browsers. <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array">For other code visit their global objects page</a>.</p>

<pre>

if (!Array.prototype.filter) {
    Array.prototype.filter = function (fun /*, thisp */ ) {
        "use strict";

        if (this == null) throw new TypeError();

        var t = Object(this);
        var len = t.length &gt;&gt;&gt; 0;
        if (typeof fun != "function") throw new TypeError();

        var res = [];
        var thisp = arguments[1];
        for (var i = 0; i &lt; len; i++) {
            if (i in t) {
                var val = t[i]; // in case fun mutates this
                if (fun.call(thisp, val, i, t)) res.push(val);
            }
        }

        return res;
    };
}

</pre>

<p>For a further more fuller intellectual appraisement read <a href="http://dmitrysoshnikov.com/">Dmitry Soshnikov's</a> article, <a href="http://dev.opera.com/articles/view/javascript-array-extras-in-detail/">JavaScript array “extras” in detail</a>, on the Opera Developers website</p>]]></description>
 <pubDate>2012-02-22T06:40:24Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">150 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Resources for learning CodeIgniter]]></title>
<link>http://www.suburban-glory.com/blog?page=149</link>
<description><![CDATA[<p>It could be argued that <a href="http://codeigniter.com">CodeIgniter</a> is the most popular Open Source PHP framework around. It certainly features heavily on developer and designer sites like <a href="http://forrst.com">Forrst</a>.</p>

<p>Written in OOP code it takes a liberal approach to the <a href="http://en.wikipedia.org/wiki/Model-View-Controller">Model–view–controller</a> (MVC) architecture that underpins all modern PHP frameworks, and it has a very active and supportive community around it.</p>

<p><img src="http://www.suburban-glory.com/images/codeigniter.jpg" width="150" height="164" alt="codeigniter logo" class="right" /></p>

<p>I put aside some time during the winter to learn CodeIgniter. Anybody who has prior experience of using OOP PHP should pick up most of the code within a couple of weeks, but I went further and created my own Content Management System which I called <a href="https://github.com/TCotton/CodeSharp">CodeSharp</a>.</p>

<p>It was a fun but lengthy exercise as it stretched on further that I expected not least because of the JavaScript and AJAX I added to the administration section, but it pays dividends to recreate the wheel if you are trying to fully understand a new web technology.</p>

<h3>Learning Resources</h3>

<p>There are a number of tutorials that I used while learning this MVC framework, the most important of which were the Nettnuts+ online <a href="http://net.tutsplus.com/sessions/codeigniter-from-scratch/">CodeIgniter from Scratch</a> video series. Easy to follow and free to watch they cover most of the code basics. Just using this online series alone will provide a solid foundation to your learning process.</p>

<p>Nearly all available resources concerning CodeIgniter are for the older 1.7 version so the least confusing option for me was to pick up the framework using 1.7. Afterwards, I updated the code from 1.7 to the current 2.1. The backwards compatibility between the two major versions was excellent and it required very little code change. At the time of writing the next version will be 3.0 and it is currently in development stage.</p>

<p>The second must-use online resource is the <a href="http://codeigniter.com/user_guide">CodeIgniter User Guide</a>, available for both versions 1.7 and 2. I think this is the most easy to use and comprehensive online guide for any web technology that I have ever come across. Perhaps this is because a private company – Ellis Labs – is behind the entire initiative and so is better organised than other Open Source projects I have used in the past. As opposing examples, php.net and the jQuery documentation contains valuable information but they are non-user friendly and need to rewritten from the ground up.</p>

<p>I brought two books on the Packt imprint: CodeIgniter 1.7 by Jose Argudo Blanco &amp; David Upton and CodeIgniter 1.7: Professional Development by Adam Griffiths. They were useful but the beef I have with Packt is that their books lack the depth that you would find in an O'Reilly or Apress publication. The feeling after finishing a Packt book is akin to eating a sandwich when you was hoping for a three-course meal.</p>

<h4>Some CodeIgniter feedback</h4>

<p>If anybody is looking for a PHP framework to learn then I would certainly recommend CodeIgniter. Below are elements of the script I liked, and some which I didn't.</p>

<p><strong><a href="http://codeigniter.com/user_guide/libraries/pagination.html">Pagination class</a></strong>: Pagination is one of the more trickier server-side coding problems to solve. Using the CodeIgniter pagination class makes this challenge dead easy with typical code in the controller class looking like this:</p>

<pre>

$config['base_url'] = site_url("content/index/");

$config['total_rows'] = $this-&gt;content_model-&gt;find_content_rows($visible = true);

$config['per_page'] = 3;

$config['num_links'] = 2;

$config['uri_segment'] = 3;

$this-&gt;pagination-&gt;initialize($config);

</pre>

<p><strong><a href="http://codeigniter.com/user_guide/libraries/encryption.html">Encryption class</a></strong>: If want to be 100% sure of securing your database in the event of a cracking, then using PHP Mcrypt is the only feasible solution. Hashing using SHA1 alone will not secure your data to the necessary unbreakable level. CodeIgniter has its own encryption class that uses PHP Mcrypt, hashing, base64 encoding and adds cipher noise to protect against Man-in-the-middle attacks.</p>

<p>The encryption class, while being secure, increases the size of the encoded messages 2.6 times the size of the original message – according to the documentation. I found that it was increasing the size of my data by as much as eight or nine times. If you use the encryption class keep an eye on this expansion because if the database field isn't big enough then the encrypted information becomes unusable.</p>

<p><strong><a href="http://codeigniter.com/user_guide/database/index.html">The Database class</a></strong>: I used the <a href="http://codeigniter.com/user_guide/database/active_record.html">Active Record Class</a> (ARC) for all database queries as I prefer the placeholder method of inserting database info rather than escaping data. As I am already using PDO I'm not sure whether the ARC brought anything new to the table, and it will be slower than using straight inbuilt PHP objects.</p>

<p><strong><a href="http://codeigniter.com/user_guide/helpers/form_helper.html">Form helper</a></strong>: I used the form helper in  my views but it never saved any time as I am already more than familiar with correct HTML form markup. Perhaps its useful if you are working on a collaborative project and need to make sure that the code is consistent throughout.</p>

<p><strong><a href="http://codeigniter.com/user_guide/libraries/image_lib.html">Image manipulation class</a></strong>. I wasn't happy with the quality of the image thumbnails it was producing so I used the <a href="https://github.com/avalanche123/Imagine">Imagine</a> script instead.</p>

<p><strong><a href="http://codeigniter.com/user_guide/libraries/typography.html">Typography class</a></strong>: The auto_typography() class is really useful for formatting non-HTML text taken from the database. On previous PHP builds I was using HTML Purifier for the same functionality.</p>

<p><strong>Routes / _remap</strong>: This is a sane way of creating human and search engine friendly URLs without pissing around with regex in the .htaccess file. It took a bit of tinkering to work out the correct code,  but it is the most sensible method for altering a URL.</p>

<h5>Conclusion</h5>

<p>I hope above has given you some enthusiasm to try out CodeIgniter if you haven't already. If you want to write safe, well-tested PHP code then this certainly is a framework that you will need to investigate. It is not the only <a href="http://www.phpframeworks.com/">PHP framework</a> but it is one that is widely used in commercial development.</p>

<p>Footnote: PHP queen Lorna Jane Mitchell has just written a short piece on the net magazine site called <a href="http://www.netmagazine.com/opinions/php-land-thousand-frameworks">PHP: land of a thousand frameworks</a> and which is worth reading as a supplementary article to this post.</p>]]></description>
 <pubDate>2012-02-10T07:47:40Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">149 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Some more tips on learning JavaScript]]></title>
<link>http://www.suburban-glory.com/blog?page=148</link>
<description><![CDATA[<p>In February 2011 Think Vitamin published an article written by me entitled <a href="http://thinkvitamin.com/code/tips-on-learning-javascript/">Tips on Learning JavaScript</a>. In 2010 I had added learning JavaScript to my “things to do list” for that year, and the Think Vitamin item offered feedback on my progress so far. Re-reading my article nearly all the advice I gave out is correct but I did write: “I would now classify my skills as intermediate”. I was a little hasty in making that statement.</p>

<p>One year on and I've learned so much more about JavaScript. Having gone through various stages of anger and confusion, I have got to a state where I've grown quite fond of its peculiar idiosyncrasies and welcome the challenge JavaScript coding brings. Dare I say it, JavaScript is fun!</p>

<p>If you have just started learning JavaScript then you too will go through the stages of anger, acceptance and then, hopefully, enjoyment.</p>

<p>In the same spirit as my original item, I hope some points below will help you in your quest to learn this important development language.</p>

<h3>JavaScript isn't PHP (or Ruby or any other common web development language)</h3>

<p>The first point of confusion many new users face is: Where are all the functions? If you have used a server-side language like PHP then you would be familiar with clicking through the php.net trying to find the right inbuilt function as solution for your problem. There are thousands of inbuilt functions that come with PHP. JavaScript only has a fraction of these functions (actually they are methods not functions in JS) and it even has some vital functions missing that are regularly used in PHP like trim() (now in modern browsers – see <a href="http://kangax.github.com/es5-compat-table/">ECMA5</a>) or a simple way of formatting dates and times such as used in PHP date().</p>

<p>What initially seems like a handicap then hits you as liberation because you realise that you don't have to worry about thousands of already existing functions, with many – like in PHP – not subservient to a standard naming convention. In JavaScript, when necessary, you create your own functions and methods to be reused again in later jobs.</p>

<p>There is a well established Open Source project called <a href="http://phpjs.org">phpjs.org</a>. On this site contributors have recreated dozens if not hundreds of PHP functions in JavaScript. I've no doubt that the intention behind this project is well-meaning but aiming to ape PHP in JavaScript is not the way forward.</p>

<p>JavaScript has its own unique approach different to common web development languages and that is prototypal inheritance. To understand this and use it is to truly harness the power of this client-side script (Now server-side also too! See node.js for further details).</p>

<p>Take for instance the <a href="http://phpjs.org/functions/trim:566">trim function on php.js</a>:</p>

<pre>

function trim(str, charlist) {
    // Strips whitespace from the beginning and end of a string  
    i = 0;
    str += '';

    if (!charlist) { // default list
        whitespace = " nrtfx0bxa0u2000u2001u2002u2003u2004u2005u2006u2007u2008u2009u200au200bu2028u2029u3000";
    } else {
        // preg_quote custom list
        charlist += '';
        whitespace = charlist.replace(/([[]().?/*{}+$^:])/g, '$1');
    }

    l = str.length;
    for (i = 0; i &lt; l; i++) {
        if (whitespace.indexOf(str.charAt(i)) === -1) {
            str = str.substring(i);
            break;
        }
    }
    l = str.length;
    for (i = l - 1; i &gt;= 0; i--) {
        if (whitespace.indexOf(str.charAt(i)) === -1) {
            str = str.substring(0, i + 1);
            break;
        }
    }

    return whitespace.indexOf(str.charAt(0)) === -1 ? str : '';
}

</pre>

<p>I count two loops in there and some regex plus lots of use of the indexOf and charAt methods.</p>

<p>Now take a look at a version as created by <a href="http://javascript.crockford.com/remedial.html">Douglas Crockford using the prototype object</a>. This means that in browsers where there is no trim string method (IE8 and below) then the regex will be used.</p>

<pre>

if (!String.prototype.trim) {
    String.prototype.trim = function () {
        return this.replace(/^s*(S*(?:s+S+)*)s*$/, "$1");
    };
}

</pre>

<p>This seems to me a much more manageable solution.</p>

<p>You would use the above code like so:</p>

<pre>

var aString = “ This is a sentence that needs white space from the beginning and end to be removed ”; 
var newString = aString.trim();

</pre>

<p></p>

<h4>Object Orientated JavaScript and Design Patterns</h4>

<p>If you are serious about learning JavaScript then make a point of using Object Orientated Programming (OOP) as early on as you can. <a href="http://ejohn.org/">John Ressig</a> has a whole chapter donated to OOP techniques in his book Pro JavaScript Techniques but I found Ross Harmes and Dustin Diaz's book <a href="http://jsdesignpatterns.com/">Pro JavaScript Patterns</a> particularly invaluable in dramatically improving the quality of my code.</p>

<p>It's a bit confusing talking about Object Orientated Programming with JavaScript as nearly everything in the language is an object, but I use OOP and design patterns interchangeably in this section as a means of a call to bring order to the code.</p>

<p>Before using OOP my output was becoming a mess with all the code written procedurally and which became impossible to maintain beyond 500 lines. If any poor bugger had hoped to collaborate with me on a project she would have run away screaming!</p>

<p>Using some of the design patterns in Harmes and Diaz's book made my output so much more manageable. If you don't come from a programming background then you would not of heard of the singleton, facade or module patterns (amongst many others). Nevertheless, these are well-established programming approaches that are applied to lots of different languages, JavaScript included, and understanding them will result in more professionally written code.</p>

<p>There are also other advantages to OOP like the ability to use a global namespace. This means that clashes between other JavaScript libraries you might be using or somebody else's code is kept to a minimum. Also, using OOP properly will mean a far more efficient code reuse and ultimately a much shorter page of script.</p>

<p>Much that we take for granted in other languages such as private and public attributes and methods, constants, passing variables by reference and even classes themselves are not used in JavaScript. But there are various ways to emulate them. “My god,” I hear you cry, “This is nothing but a hack script!”. Well, that's one of looking at the Big J, but if you are programmer who loves a challenge - and what programmer worth his / her salt doesn't? - then you will enjoy climbing over the hurdles JavaScript brings.</p>

<p>One last point about OOP design patterns in JavaScript. In my previous Think Vitamin article I stated that I used a dollar sign in front of variables so as to make scanning a document easier. Once I started using OOP and in particular the <a href="http://www.yuiblog.com/blog/2007/06/12/module-pattern/">module pattern</a> which uses private and public attributes and methods, the addition of the dollar sign for extra readability became unnecessary.</p>

<h5>Use semantic names</h5>

<p>Try to avoid abbreviations or, heaven forbid, just a single letter for variables and attributes.</p>

<p>I use single letters in loops when that letter represents a digit:</p>

<pre>

for (var i = 0; i &lt; form.elements.length; i += 1) {

    // loop through the values of the form elements
    alert(form.elements[i].values);

} // end for loop

</pre>

<p>But other than for loops I use names for variables / attributes that demonstrate their purpose.</p>

<p>As an example, look at the names for the attributes I created in an object called CS.GlobalSet:</p>

<pre>

nameForm: null,
sloganForm: null,
emailForm: null,
metaDescription: null,
metaKeywords: null

</pre>

<p>These were the name of the form fields from where they took their values.</p>

<pre>

CS.GlobalSet.nameForm = this.nameForm.value.trim();
CS.GlobalSet.sloganForm = this.sloganForm.value.trim();
CS.GlobalSet.emailForm = this.emailForm.value.trim();
CS.GlobalSet.metaDescription = this.metaDescription;
CS.GlobalSet.metaKeywords = this.metaKeywords;

</pre>

<p>This makes the code far easier for others to understand then if I had given them initials like nF, sF or eF.</p>

<p>(<a href="https://github.com/TCotton/CodeSharp/blob/master/javascript/admin/main-file.js#L580">The full object referenced above can be found here</a>).</p>

<p>There are lots of JavaScript coding standards that should be observed. Read from beginning to end the collaborative document hosted on GitHub called <a href="https://github.com/rwldrn/idiomatic.js">Principles of Writing Consistent, Idiomatic JavaScript</a>. No matter your level of JavaScript skills, you will find some new ideas in this extensive article.</p>

<h6>Keep you code neat and tidy</h6>

<p>In my 2011 article “Tips on Learning JavaScript” I endorsed using <a href="http://jsbeautifier.org/">JSBeautifier</a> for automatic spacing and advocated liberally using comments so as to leave a clear explanation of the purpose of the code for when you return to utilize it at a later date. I still state that the correct use of space and full commenting are not optional, but essential.</p>

<p>If you want to see JavaScript as code poetry then look at some work produced by Juriy Zaytsev - aka kangax – in his <a href="https://github.com/kangax/fabric.js/blob/master/dist/all.js">fabric.js project</a>. Note how he spaces out his code and how and when he leaves comments. This clearly is a project intended for collaboration between two or more developers and with over 12,000 lines of code it needs to be super-organised so as to keep it manageable.</p>

<h6>Can you use JavaScript and never use a library?</h6>

<p>Well that depends on the complexity of the code you are writing and the experience of the coder. But it's really tough to use 100% of your own DOM JavaScript and never, ever use a library.</p>

<p>As an example, I just recently I created a form with two different submit buttons. Each button produced two totally different outcomes: submit and delete. This wasn't a problem for the server-side script to handle, but JavaScript was a bloody nuisance. I found one event property called explicitOriginalTarget that was perfect for the purpose, but it is only used in Firefox! Similar alternatives in Webkit such as originalTarget were not cutting the mustard.</p>

<p>Eventually, I fell back to using jQuery like so:</p>

<pre>

$(document.forms['adminEditContent'].elements['submit']).click(function (event) {

                    // code here for form submission
                    event.preventDefault();
                });

$(document.forms['adminEditContent'].elements['detete']).click(function (event) {

                    // code here for deletion
                    event.preventDefault();
                });

</pre>

<p>Clearly, there is JavaScript solution because jQuery are using it in their script, but I didn't have the experience to work it out myself so I used a library. There's nothing wrong with relying on an established Open Source project when needs must. Just make a note of trying to crack the problem yourself at a later date.</p>

<p>I've also had a lot of problems in creating smooth animation in Internet Explorer so I use a library like animator.js or one of the big beasts such as jQuery or Dojo if I need to use JS animation.</p>

<p>And if you are working on a commercial project such as creating a Drupal or Wordpress theme, then using jQuery is a logical solution as it will save you considerable time. This is an important consideration if you are a professional because time is money.</p>

<h6>Conclusion</h6>

<p>So after two years of learning JavaScript can I now state that I have reached an intermediate skill level? Yes, I think so, but thoroughly learning any programming language is an exhaustive process that takes years; and although I have learned a hell of a lot there's still so much more to soak up yet.</p>

<p>I say, bring it on! I'm loving it.</p>]]></description>
 <pubDate>2012-02-09T09:14:53Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">148 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Pushing CSS to its limits]]></title>
<link>http://www.suburban-glory.com/blog?page=147</link>
<description><![CDATA[<p>As CSS3 roars ahead in spite of the old Internet Explorer legacy browsers acting like a drag weight on faster adoption, there have been some really fascinating experiments with CSS3 properties and values which have created design styles far beyond what the original participants behind the W3C CSS modules could have imagined.</p>

<p>There seems to be a craze for recreating cartoon characters like <a href="http://www.radium-v.com/stuff/homer/">Homer Simpson</a> in HTML and CSS only, but I don't see any point in creating work with no practical value. Of far more interest to me are those that are pushing CSS to its limit but whose work can be replicated and expanded upon by other coders.</p>

<h3>Pseudo Elements, Box Shadows and some CSS3 animation</h3>

<p>Pseudo elements have a lot of practical, albeit minor uses. I've use them to add typographically correct smart quotes around blockquotes such as below (note the added space in the value for the before content property):</p>

<pre>
blockquote:before {
	content :"201C" ' ';
	font-size : 2em;
	vertical-align : middle;
	font-style : italic;
}

 blockquote:after {
	content : "201D";
	font-size : 2em;
	vertical-align : middle;
	font-style : italic;
}
</pre>

<p>I use unicode characters rather than HTML entities because the latter has a habit of producing strange mistakes when cutting and pasting CSS.</p>

<p>I have also used pseudo elements in the past to add an extra oomph to menu links on the hover state like so:</p>

<pre>
#main-menu ul li a:hover:after {
content: " GO! -&gt;";
color : #ffffff;
}
</pre>

<p>Other coders are taking it further.</p>

<p>I really like Chris Coyier's use of pseudo elements to create<a href="http://css-tricks.com/examples/FullBrowserWidthBars/"> full browser width bars</a>, while Nicolas Gallagher combines CSS3 transitions with ::before to create <a href="http://jsfiddle.net/necolas/KbNq7/">impressive shiny buttons</a> (hover over the them).</p>

<p>The W3C working draft document <a href="http://www.w3.org/TR/css3-content/">CSS3 Generated and Replaced Content Module</a> dated May 2003 and allows multiple pseudo elements per element. When browsers implement this standard expect another wave of ultra-complex CSS experimentation on par or more inventive then these <a href="http://nicolasgallagher.com/pure-css-gui-icons/demo/">pure CSS GUI icons</a>.</p>

<p>Unfortunately, CSS 2.1 pseudo elements :before and :after do not work in Internet Explorer versions 6 and 7. Thankfully though there is a polyfil in the form of Dean Edwards <a href="http://code.google.com/p/ie7-js/">ie7-js script</a>. This script covers a myriad of <a href="http://ie7-js.googlecode.com/svn/test/index.html">advanced CSS not used in IE versions 6-8</a>. It is the only script that gives support to pseudo elements. Be careful when using it though as it is a big file and it will create a Flash of Unstyled Content as the JavaScript is loaded.</p>

<p>Box shadows have been implemented for a couple of years now in Firefox and Webkit-based browsers. It didn't take long for coders to realise that adding layers of values, with pseudo elements and CSS3 transforms can create amazingly attractive and complex shadows.</p>

<p><a href="http://nicolasgallagher.com/css-drop-shadows-without-images/demo/">A popular demo was created by Nicolas Gallagher</a>.</p>

<p>Likewise the Viget crew have had a lot of fun creating their <a href="http://www.viget.com/uploads/file/boxshadows/">39 Box Shadows, No Good Reason</a> page (only works in Webkit-based browsers).</p>

<p>Like Nicolas Gallagher they only achieved their complex shadow effects by mixing box shadows with other important CSS3. In their case they liberally used gradients, pseudo classes and animation.</p>

<p>CSS3 transitions and transforms are a nice added bonus to the coders arsenal. When they first appeared my initial reaction was, 'Well that is what JavaScript is there for'; but they do add another welcome means of adding motion to elements on a page.</p>

<p>In its favour the syntax is easy to implement. There really is very little to using CSS3 animation. Secondly, it can animate elements on a page and animate them in particular ways that would be difficult even with a JavaScript library like jQuery.</p>

<p>I particularly like using animation on forms to give an extra usability feature. On the :focus selector I add a scale value like so:</p>

<pre>
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus {
	-moz-transform : scale(1.05);
	-webkit-transform : scale(1.05);
	-o-transform : scale(1.05);
	transform : scale(1.05);
}
</pre>

<p>Through experience I wouldn't recommend using CSS3 animation on page load and only use it on mouse and keyboard events. Presumably CSS3 transitions and transforms are quite resource hungry as whenever I have added them to a style sheet to fire on page load it creates a stuttering, non-smooth movement on the page.</p>

<p>Unfortunately, due to lack of support in the legacy browsers, you would have to be cautious in using a lot of the above in commercial jobs; but they clearly signpost a future direction for CSS users in which far, far more complex code will become standard.</p>

<h4>CSS branching</h4>

<p>Due to the frustrations of using a non-programming language like CSS, JavaScript and Ruby developers have created their own forks called <a href="http://lesscss.org/">LESS</a> and <a href="http://sass-lang.com/">Sass</a> respectively.</p>

<p>Here you can create CSS but do so too with variables, mixins, namespaces and nested rules amongst much else. Both LESS and Sass have their own bands of loyal users who would only reluctantly return to straight CSS as used by the vast majority of front-end developers.</p>

<p>Both of these projects have created a valuable contribution to the industry because they present working alternatives to CSS that are radically different to the current W3C recommendations and drafts. However, should we be branching out into mutually exclusive CSS formats? To me this seems like walking into an uninspiring dead-end rather a viable and sustainable future.</p>

<h5>Boilerplates &amp; resets</h5>

<p>A number of years ago Eric Mayer produced his famous <a href="http://meyerweb.com/eric/tools/css/reset/">CSS reset</a>. It allowed web developers to approach a project knowing that before they have even written a single line of code, many browser inconstancies and quirks had been levelled.</p>

<p>Today, <a href="http://developer.yahoo.com/yui/reset/#code">YUI reset</a> and David Hellsing's <a href="http://www.cssreset.com/scripts/tripoli-css-reset-david-hellsing/">Tripoli Reset</a> have been become, if not obsolete, then certainly dated in the face of software and HTML and CSS changes.</p>

<p>As a modern CSS reset, Nicolas Gallagher (him again!) and Jonathan Neal created <a href="http://necolas.github.com/normalize.css/">normalize.css</a>. I'm particularly impressed with their detailed comments that describe the purpose of every line of code and I like the attention to detail in the form section.</p>

<p>Beyond just a CSS reset is <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>, the creation of Irish Paul. There's a ton of code in this project to learn from. I really like the work they have done in the <a href="https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess">.htaccess file</a>. Proper Apache configuration is vital for a fast, non-buggy website, and they have covered a wide territory including GZIP, expires headers, proper MIME types and UTF-8 encoding.</p>

<p>Building upon this project is Andy Clarke's <a href="http://stuffandnonsense.co.uk/projects/320andup/">320 and Up Boilerplate</a> that takes a “mobile first” approach to web design. Again, this is a really interesting project to study and use.</p>

<p>I can't begin to tell you how much I have learned by examining the code in these boilerplates and resets. But, as a word of caution, the worse thing you can do is just cut and paste code without a clear understanding of what it does. Question everything. Just because a face like Irish Paul or Eric Mayer deems a particular line of CSS a necessity, doesn't mean that it is or is suitable for your web builds.</p>

<h6>New layout modules</h6>

<p>Last year saw a buzz of activity around new CSS layout modules. Originally back in the 90s tables were the preferred method of page layout. During the last decade this approach was chased out of existence by standards evangelists such as Jeffrey Zeldman who insisted on the separation between presentation and content, and in its place came the CSS solution of floats. However, CSS floats were never intended as means of laying out an entire page but of positioning objects like images within a body of text. Many involved in the web design industry have longed for a different approach to layout.</p>

<p>By my counting there are now five different W3C sponsored alternatives to floats! They are <a href="http://dev.w3.org/csswg/css3-exclusions/">Exclusions and Shapes</a>, <a href="http://dev.w3.org/csswg/css3-regions/">Regions</a>, <a href="http://www.w3.org/TR/css3-layout">Template Layout</a>, <a href="http://dev.w3.org/csswg/css3-grid-align/">Grid Layout</a> and <a href="http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/">Flexible Box Layout</a>. For a thorough explanation of all of them read net magazine's article <a href="http://www.netmagazine.com/features/future-css-layouts">The Future of CSS Layouts</a>.</p>

<p>I find it difficult to get exciting about these new layout options. Using floats can be tricky (hello clearfix), but ultimately I've never had any serious problems creating complex layouts. Also, none of the above will be backwards compatible. I'm not against a fundamentally different approach to CSS page layout, but I would baulk at having different layout systems for different browsers in the same web build. It's also worth noting that Flexibox was first introduced in 2009 and it is now going through a radical rethink because the original draft proved lacking. I wonder how many of the other four will also be subject to major revision in the coming years?</p>

<h6>Conclusion</h6><p>
 
CSS: use and abuse it. Time spend trying out new techniques is important to personal development. Make sure that you set aside some quality time to play around with CSS3 and see what you can produce. Look at the code linked to above and learn from it. Use it as a base for further experimentation. <em>Avante!</em></p>]]></description>
 <pubDate>2012-02-06T10:47:19Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">147 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Barking and Dagenham Chamber of Commerce seminar: Practical Advice for Smaller Businesses]]></title>
<link>http://www.suburban-glory.com/blog?page=146</link>
<description><![CDATA[<p>Topics and speakers include:</p>

<p>Search Engine Optimisation, Andy Walpole, Suburban Glory Web Design</p>

<p>How to Maximise your Branding, Ray Calder, Acumen Design</p>

<p>Simple tips to increase your £££ Flow and reduce Tax bill in 2012, Ron Mansfield, TaxAssist Accountants</p>

<p>Date: Wednesday, 1 February, 2012</p>

<p>Time: 9.30am - 12.30pm</p>

<p>Address: Seminar Room, Ground Floor, Roycroft House , 15 Linton Road, Barking, IG11 8HE</p>

<p>No Cost to Attend but please download and fill in the form below and send to the B&amp;D Chamber of Commerce: <a href="http://www.bdchamber.co.uk/i/events/1325604512.pptx">http://www.bdchamber.co.uk/i/events/1325604512.pptx</a></p>]]></description>
 <pubDate>2012-01-29T14:47:08Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">146 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[An introduction to Deck JS]]></title>
<link>http://www.suburban-glory.com/blog?page=145</link>
<description><![CDATA[<p>PowerPoint has been the choice of software for corporate presentations since the 1990s. Easy to use and configure, it takes real skill to mess a PowerPoint presentation up. However, for web coders seeking greater visual flare there are now a number of browser-based solutions that are dependent on HTML, CSS and JavaScript.</p>

<p>One such script is <a href="http://imakewebthings.github.com/deck.js/">Deck JS</a>. Created by <a href="http://imakewebthings.com/">Caleb Troughton</a>, it is a jQuery plugin and has recently recently been exposed to wider attention after being promoted on the Smashing Magazine Twitter feed.</p>

<p><img src="http://www.suburban-glory.com/images/deckjs.jpg" alt="deck js" width="417" height="255" /></p>

<p>I recently spent a few days using Deck JS in order to create a presentation for a forthcoming <a href="http://www.suburban-glory.com/blog?page=143">Foundation Internet Marketing course</a> at Redbridge College, and I would recommend this nifty little script to others.</p>

<p>Using it is straightforward and requires only the bare minimum knowledge of jQuery.</p>

<p>Firstly, download the files and link to them from the head of the document.</p>

<p>Then, create you HTML as so:</p>

<pre>

&lt;div class="slide" id="frame-one"&gt;
  &lt;h1&gt;Frame One&lt;/h1&gt;
  &lt;p&gt;Sed sem ligula, rhoncus et pharetra vel, vulputate interdum lacus. Ut turpis magna, dictum vel porttitor eu, mattis ut ipsum. Vestibulum varius lorem a diam varius pretium. Phasellus condimentum, turpis id pretium accumsan, augue felis adipiscing orci, vitae ultricies massa justo vitae ipsum. Maecenas consectetur, ligula sit amet auctor dictum, orci odio elementum nulla, in rutrum lectus lectus vel ipsum. &lt;/p&gt;
&lt;/div&gt;
&lt;div class="slide" id="frame-two"&gt;
  &lt;h1&gt;Frame Two&lt;/h1&gt;
  &lt;p&gt;Integer massa massa, tincidunt interdum convallis vitae, sollicitudin id nisi. Aenean dictum hendrerit metus, eu tempus eros placerat eleifend. Vivamus mi felis, ultrices at dapibus nec, dapibus eget odio. &lt;/p&gt;
&lt;/div&gt;
&lt;div class="slide" id="frame-three"&gt;
  &lt;h1&gt;Frame Three&lt;/h1&gt;
  &lt;p&gt; Sed nulla libero, scelerisque nec laoreet a, pellentesque sed diam. Donec venenatis, arcu ac tempus cursus, mi felis malesuada justo, vel consectetur eros diam vel diam. Proin non risus ut elit tristique gravida eget sed mauris. Praesent neque dolor, rhoncus eu lobortis facilisis, consequat et lacus. Praesent scelerisque viverra arcu ut aliquam. Ut luctus sapien vehicula nibh tristique hendrerit. &lt;/p&gt;
&lt;/div&gt;

</pre>

<p>And now in the head add the following jQuery:</p>

<pre>

/* &lt;![CDATA[ */
$(document).ready(function() {

$.deck('.slide');

$.deck([
 '#frame-one',
 '#frame-two',
 '#frame-three'
]);

}); // End document ready
/*  */

]]&gt;</pre>

<p>And that is it. Easy. Note that the order of presentation is decided by jQuery not the divs in the HTML.</p>

<p>In the best tradition of Blue Peter here is one I made earlier: <a href="http://www.linkbuilding.suburban-glory.com/">http://www.linkbuilding.suburban-glory.com/</a></p>

<p>And here is another one: <a href="http://www.keywords.suburban-glory.com/">http://www.keywords.suburban-glory.com/</a></p>

<p>The biggest upside of creating a presentation with Deck JS is that you also have the full arsenal of HTML, CSS and JavaScript at your disposal and all you need to display it is a browser.</p>]]></description>
 <pubDate>2011-08-30T14:00:43Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">145 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[An easy way to use the Twitter API]]></title>
<link>http://www.suburban-glory.com/blog?page=144</link>
<description><![CDATA[<p>Twitter, surely, has had one of the most successful developer outreach programmes of all time. Their relaxed attitude to data access has meant that a myriad of superb side projects has sprung up and which, in turn, fed back into the popularity of Twitter.</p>

<p>Universally loved by software developers, the Twitter API has set the standard for other companies when allowing open access to their database.</p>

<p>Recently I had reason to use the Twitter API on a personal project (<a href="http://www.andywalpoletwo.suburban-glory.com/">a new personal portfolio actually</a>). Since the summer of 2010 Twitter has made access to their API mandatory only if using QAuth authentication – or so I thought.</p>

<p>The problem with using QAuth for Twitter is one of finding the right script because you'll stumble upon that old chestnut - <a href="http://pear.php.net/package/Services_Twitter/">a PEAR module without any documentation</a>.</p>

<p>After faffing around for a couple of hours I thought, “Why do I need QAuth for if all I want to do is access my personal Twitter stream and not update it on a third-party site?”</p>

<p>Then a more simple method hit me and all it involved was building up a query string from <a href="https://dev.twitter.com/docs/api/1/get/statuses/user_timeline">GET statuses/user_timeline</a> like so: http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=true&amp;screen_name=andywalpole&amp;count=20&amp;exclude_replies=true</p>

<p>If you read the Twitter resource linked to above then you can add many different queries to the string including specifying whether you would like the returned resource to be JSON or XML; the number of tweets, or whether you would like to exclude replies.</p>

<p>From there it is just a case of using PHP's trusted Client URL Library (cURL) like so:</p>

<pre>
$ch = curl_init();

$file = fopen("textfile.json", "w+");

curl_setopt($ch, CURLOPT_URL,
    'http://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&amp;include_rts=true&amp;screen_name=andywalpole&amp;count=20&amp;exclude_replies=true');

curl_setopt($ch, CURLOPT_FILE, $file);

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);

fclose($file);
</pre>

<p>Now that you have your Twitter stream in a JSON file it is just a question of accessing and then looping through the content:</p>

<pre>
$twitter = file_get_contents('textfile.json');

$twitter = json_decode($twitter);

$rows = "";

foreach ($twitter as $keys =&gt; $rows) {
    
    // looped data here

    }
</pre>

<p>And that is it :)
</p>]]></description>
 <pubDate>2011-08-22T17:48:00Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">144 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Redbridge College Workshop: Foundation Internet Marketing]]></title>
<link>http://www.suburban-glory.com/blog?page=143</link>
<description><![CDATA[<p>Speakers Andy Walpole from Suburban Glory Web Design &amp; Rob Keating from <a href="http://www.offlinetoonline.co.uk/">Offline to Online</a>.</p>

<p><img src="http://www.suburban-glory.com/redbridge/images/redbridge_logo.jpg" width="167" height="50" alt="redbridge_logo.jpg" /></p>

<p>Tuesday September 20th, 6.30pm – 8.30pm</p>

<p>Are you starting a business or already running a business? Are you frustrated that your competitors outrank you on Google? If you are unhappy with your current online marketing or just want to find out more come along to our workshop. It has been designed for small to medium-sized businesses and is delivered by two industry experts. The aim of this two hour workshop is to teach you both the theory and practice of some key aspects of online marketing.</p>



<p>A one-off workshop especially for business owners in east London including Romford, Ilford, Barking and Dagenham who are interesting in learning about some of the basic concepts behind internet marketing and SEO.</p>

<p><a href="http://us2.campaign-archive2.com/?u=3bfb657e8bdb9c1973d89c48f&amp;id=d94efe3093">For more information please visit this site.</a></p>

]]></description>
 <pubDate>2011-08-13T09:07:08Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">143 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using JavaScript to emulate HTML5 placeholders in Internet Explorer]]></title>
<link>http://www.suburban-glory.com/blog?page=142</link>
<description><![CDATA[<p>HTML5 is now the default choice of HTML version for most developers but poor support in Internet Explorer has proven to be a hindrance to the wider adoption of the language.</p>

<p>This lack of native support in IE has lead to a wide array of workarounds which now come under the banner of polyfills. These usually consist of a JavaScript solution that replaces the lack of advanced HTML support in legacy browsers.</p>

<p>A comprehensive polyfill list curated by Paul Irish can be <a href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills">found on GitHub</a>.</p>

<img src="http://www.suburban-glory.com/images/html5-alternative.png" alt="alternative HTML5 logo" class="right" height="324" width="324" /><span class="right">Image reproduced with kind permission from Phil Banks.Twitter: <a href="https://twitter.com/#!/emirpprime">https://twitter.com/#!/emirpprime</a>; Website: <a href="http://stickmanphotography.co.uk/">http://stickmanphotography.co.uk/</a></span>

<p>But where possible it is always best to create your own solution rather than rely on somebody else's script.</p>

<p>Placeholders are a new HTML5 attribute which allow text to be placed in a form input field so as to guide the user to what they should be entering. They are a great asset to usability in form design.</p>

<p>Form placeholders are integrated in the latest version of Safari, Firefox, Opera and Chrome but are absent from versions of Internet Explorer 9 and below.</p>

<p>Using a little DOM JavaScript and the for loop it is possible to emulate their behaviour in IE.</p>

<p>This tutorial will run through the following steps:</p>

<p>1. Use Modernizr object detection to check whether the browser is capable of using HTML5 placeholders.</p>
<p>2. If not, loop through form elements replacing the blank input value with that of the placeholder attribute value.</p>
<p>3. Make sure placeholder text in Internet Explorer is a light colour.</p>
<p>4. Make sure placeholder text disappears when user enters value into the input form.</p>
<p>5. Text entered into the input field must have high contrast with the background.</p>

<p>Firstly, if you have not come across <a href="http://www.modernizr.com/">Modernizr</a> before then let me introduce you to this essential third party script.</p>

<p>This little helper is an intelligent way of detecting whether various components of HTML5 and CSS3 are present in the user's browser. In this tutorial we will use its object sniffing method like so:</p>

<pre>

if (!Modernizr.input.placeholder) {

// code here

}

</pre>

<p>If placeholder is not an active feature of this browser then run some code. First we'll take all the elements for the form with an id of “contact-form” and declare them in a variable called $form.</p>

<pre>

if (!Modernizr.input.placeholder) {

    var $form;

    $form = document.getElementById('contact-form').elements;

}

</pre>

<p>Now we'll use a common method to loop through all the form elements and which allows us to give the placeholder value to the form input value. If you are unsure about this method then read <a href="http://pietschsoft.com/post/2006/06/01/Javascript-Loop-through-all-elements-in-a-form.aspx">Chris Pietschamnn's tutorial</a>.</p>

<pre>

if (!Modernizr.input.placeholder) {

    var $form, $i;

    $form = document.getElementById('contact-form').elements;

    $i = 0;

    //set placeholder values for internet explorer
    for ($len = $form.length; $i &lt; $len; $i += 1) {

        if ($form[$i].getAttribute(“placeholder”) != undefined) {

            // five placeholder value to form value
            $form[$i].value = $form[$i].getAttribute(“placeholder”);

        } // if not undefined
    } // end for loop

}

</pre>

<p>And that is it. If you have used the HTML5 placeholder attribute in your form, the text will now be visible in Internet Explorer.</p>

<p>However, we also need to make sure that the placeholder text itself is a light colour. If you need to change the placeholder text in Firefox or Chrome then you can use the follow CSS:</p>

<pre>

::-webkit-input-placeholder {
   color: #cccccc;
}

:-moz-placeholder {
    color: #cccccc;
}

</pre>

<p>
In JavaScript we'll need to do it by looping through the form input values. Notice the !== submit. We are not interesting in styling the submit input field here, just the input fields such as text and email.</p>

<pre>

$inputField = document.forms.contactUs.getElementsByTagName('input');

$x = 0;

// loop through input areas to make sure placeholder disappears on focus
for ($len = $inputField.length; $x &lt; $len; $x += 1) {

    if ($inputField[$x].type !== "submit") {

        $inputField[$x].style.color = "#999";


    }

</pre>

<p>Lastly, we need to make sure that the placeholder text disappears when the user starts to enter their own text and the colour changes to something more darker and readable:</p>

<pre>

   $inputField = document.forms.contactUs.getElementsByTagName('input');

$x = 0;

// loop through input areas to make sure placeholder disappears on focus
for ($len = $inputField.length; $x &lt; $len; $x += 1) {

    if ($inputField[$x].type !== "submit") {

        $inputField[$x].style.color = "#999";

        // place holder text disappears on focus
        $inputField[$x].onfocus = function () {

            this.value = "";
            this.style.color = "#000";

        };

    }

</pre>

<p>And altogether the code looks like this:</p>

<pre>
if (!Modernizr.input.placeholder) {

    // always declare javascript variables at the top of the script
    var $elements, $i, $x, $len, $formInput, $inputField, $form;

    $form = document.getElementById('contact-us').elements;

    $i = 0;

    //set placeholder values for internet explorer
    for ($len = $form.length; $i &lt; $len; $i += 1) {

        if ($form[$i].getAttribute("placeholder") != undefined) {

            $form[$i].value = $form[$i].getAttribute("placeholder");

        } // if not undefined
    } // end for loop

    $inputField = document.forms.contactUs.getElementsByTagName('input');

    $x = 0;

    // loop through input areas to make sure placeholder disappears on focus
    for ($len = $inputField.length; $x &lt; $len; $x += 1) {

        // Don't change the submit input!
        if ($inputField[$x].type !== "submit") {

            // Give placeholder text a grey colour
            $inputField[$x].style.color = "#999";

            //Delete the placeholder text and change CSS text colour to black on user focus
            $inputField[$x].onfocus = function () {

                this.value = "";
                this.style.color = "#000";

            };

        }

    } // if not undefined
} // end modernizr
</pre>

<p>You can see a live example of this code on a website I built here - <a href="http://www.expertwillwriter.com/">will writer</a> - and you grab the code on <a href="https://gist.github.com/1078011">Gist</a>.</p>

<p>This code has been tested on IE versions 7, 8 and 9.</p>]]></description>
 <pubDate>2011-08-03T14:42:39Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">142 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Review of HTML5 Canvas Libraries]]></title>
<link>http://www.suburban-glory.com/blog?page=141</link>
<description><![CDATA[<p>There's been a buzz around HTML5 for some time now with many leading commentators in the online tech community heavily pushing the new standard.</p>

<p>With the last version of HTML being released back in 1997 and XHMTL never really fulling its initial promises, a new version is needed that reflects the exhilarating pace of technological change and in particular meets the needs of the new platforms such as mobile and tablets.</p>

<p>And some of the biggest web opinion formers and industrial heavyweights are HTML5 evangelists.</p>

<p>When in 2010 Steve Jobs published a demolition job of Adobe's animation software in an article entitled “<a href="http://www.apple.com/hotnews/thoughts-on-flash/">Thoughts on Flash</a>”, it brought a lot of focus to the maturing standard:</p>

<blockquote><p>Rather than use Flash, Apple has adopted HTML5, CSS and JavaScript – all open standards. Apple’s mobile devices all ship with high performance, low power implementations of these open standards. HTML5, the new web standard that has been adopted by Apple, Google and many others, lets web developers create advanced graphics, typography, animations and transitions without relying on third party browser plug-ins (like Flash). HTML5 is completely open and controlled by a standards committee, of which Apple is a member.
</p></blockquote>

<p>When the boss of Apple Inc. makes announcements like above then every developer should sit up and listen.</p>

<img src="http://www.suburban-glory.com/images/html5-alternative.png" width="324" height="324" alt="alternative HTML5 logo" class="right" /><span class="right">Image reproduced with kind permission from Phil Banks.Twitter: <a href="https://twitter.com/#!/emirpprime">https://twitter.com/#!/emirpprime</a>; Website: <a href="http://stickmanphotography.co.uk/">http://stickmanphotography.co.uk/</a></span>

<p>The other great commercial tech player, Microsoft, has also thrown their immense weight behind HTML5 with Vice President Julie Larson-Green <a href="http://arstechnica.com/microsoft/news/2011/06/html5-centric-windows-8-leaves-microsoft-developers-horrified.ars">recently announcing</a> their intention to focus on the new format for their Windows 8 developer platform.</p>

<p>When I wrote an introduction to <a href="http://www.suburban-glory.com/blog?page=135">HTML5 Canvas</a> at the beginning of the year I noted how limited the new technology is with a big block to uptake being the prohibitive low-end, verbose coding, especially when compared to ActionScript.</p>

<p>I finished the article with this paragraph:</p>

<blockquote><p>Hopefully, somebody will create a code library for canvas animation. Creating objects is cumbersome but straight forward; however, in order for the popularity of this particular HTML5 API to spread there needs to be easy access to animation features as you would find in jQuery or Mootools.
</p></blockquote>

<p>In this article I will examine a number of HTML5 canvas libraries. This is mainly a usability review and I won't examine the code too closely, but I also wanted to create some solid code examples with supporting comments as an aid to other developers interested in using these projects.</p>

<p>The projects reviewed are jCanvaScript, CAKE, fabric.js and doodle.js</p>

<p>If you do want to try these scripts out then you really need knowledge of vanilla JavaScript. If your only experience is through a package like jQuery or Mootools then you'll struggle when attempting to use any of these tools.</p>

<p>I should firstly state that they are all competent libraries but some are more ready for wider adoption than others, in particular a couple have a lack of documentation and working demos. </p>

<p>They are all open source and are issued under liberal licenses that allow integration into commercial projects. Also note that all the libraries featured are being regularly updated by their respective developers.</p>

<h3>jCanvaScript</h3>

<p><img src="http://www.suburban-glory.com/images/jcanvascript-html5-canvas-library.jpg" width="450" height="450" alt="jCanvaScript HTML5 Canvas Library homepage" /></p>

<p>Alexander Savin is the prime mover behind this library released under the MIT and GPL2 licenses. The <a href="http://jcscript.com/">jCanvaScript</a> beta was launched at the beginning of 2011 and several versions have since been released.</p>

<p>The features of this library are the main planks of HTML5 canvas: the ability to create shapes, animation, images and text and to animate them and also allowing user interactivity via the mouse or keyboard.</p>

<p>To use jCanvaScript you first need to create the jc object and from their you can access its methods. The code below creates a white circle 100px wide positioned 150px from the left and 250px from the top of the canvas:</p>

<pre>
jc.start("canvas_1");

jc.circle({
    x: 150,
    y: 250,
    radius: 100,
    color: '#ffffff',
    fill: 1
});
</pre>

<p>The above method uses literal notation but it's also possible to use shorthand like so:</p>

<pre>
jc.circle(150.250.100,'#ffffff',true);
</pre>

<p>I prefer to use the more robust literal notation where ever possible, that way the objects are labelled and are also self documenting which serves a similar purpose to code comments.</p>

<p>The documentation for jCanvaScript is excellent with clear examples of both functions and objects given. I would state that it would take a day to master the entire library. </p>

<p>An example of animation is as below:</p>

<pre>
jc.start('canvas_1', 160);
jc.circle({
    x: 90,
    y: 500,
    radius: 150,
    color: 'rgb(255,241,12)',
    fill: 1
}).animate({
    x: 500,
    y: 90
}, 100, {
    type: 'in',
    fn: 'linear'
}).fadeOut(100, {
    type: 'in',
    fn: 'linear'
});
</pre>

<p>The second parameter in jc.start is frames per second. It's possible to join the methods together – in the above example animation and fadeOut are added to circle object. Anybody familiar with a common JavaScript library will be familiar with this syntax. The use of object notation for animation reminds me of Dojo.</p>

<p>I was using setTimeout to repeat the animation but I found it confusing to compare the FPS of the library code with the milliseconds of setTimeout, but that's says more about my skills than the library.</p>

<p><a href="http://www.suburban-glory.com/html5-experiments/jcanvascript.php">Click on here to see a jCanvaScript demo</a>.</p>

<p>Compressed, the script weighs 50kB.</p>

<h4>Fabric.js</h4>

<p><img src="http://www.suburban-glory.com/images/fabricjs-html5-library.jpg" width="450" height="450" alt="fabric.js HTML Canvas library homepage" /></p>

<p>Released under a MIT license fabric.js is the work of former Prototype developer <a href="http://perfectionkills.com/">Juriy Zaytsev</a> - aka <a href="https://twitter.com/#!/kangax">kangax</a> - that grew from a commercial project he was engaged in.</p>

<p>The first commit on GitHub dates from the summer of 2010 and since then the principle coder has been regularly expanding and revising the script.</p>

<p>Fabric.js is a far more feature rich offering than jCanvaScript. Included in the hefty download file is an SVG-to-canvas parser, unit testing and even limited IE support through Explorer Canvas.</p>

<p>Below is how to use fabric.js to create a red triangle 200px by 200px in size:</p>

<pre>
// create the canvas object
$canvas = new fabric.Canvas('canvas_1');

// create a triangle
$triangle = new fabric.Triangle({
    top: 450,
    left: 500,
    width: 200,
    height: 200,
    fill: 'rgb(204,0,107)'
});

// add it to the canvas
$canvas.add($triangle);
</pre>

<p>The quality of the code is fantastic – it's more like looking at art; but the entry point for interested users is too high.</p>

<p>The documentation is minimal or non-existent with the technical manual being impenetrable for those not already familiar with the code. For instance, could you work out how to create a gradient from the <a href="http://kangax.github.com/fabric.js/docs/symbols/fabric.Gradient.html">information on this page?</a>. No, neither could I and as there isn't a live example to study this makes matters especially problematic. An API reference is important – but there needs to more than just that.</p>

<p>The are some live demos but too few of them – there needs to be examples of every type of class / shape. Of those that exist none feature crucial code commenting as this <a href="http://kangax.github.com/fabric.js/demos/cross/index.html">animation page highlights</a>.</p>

<p>It looks promising as feature-rich HTML5 canvas Swiss army knife, but there's too many unnecessary barriers that will prevent wider adoption.</p>

<p><a href="http://www.suburban-glory.com/html5-experiments/fabric-library.php">Click on here to see a fabric.js demo</a></p>

<h5>CAKE</h5>

<p><img src="http://www.suburban-glory.com/images/cake-html5-library.jpg" width="450" height="450" alt="CAKE HTML5 Canvas library homepage" /></p>

<p>Written principally by Google employee <a href="http://fhtr.blogspot.com/">Ilmari Heikkinen</a> <a href="http://code.google.com/p/cakejs/">CAKE</a> is, in a description from the homepage, “a JavaScript scene graph library for the HTML5 canvas tag. You could think of it as SVG sans the XML and not be too far off.”</p>

<p>Ilmari is a regularly contributor to <a href="http://www.html5rocks.com/en/">HTML5 Rocks</a> and has a host of <a href="http://fhtr.org/">HTML5 related projects under his belt</a>.</p>

<p>Unlike all the other libraries reviewed in this post, CAKE actually has a number of comprehensive online tutorials. Written by <a href="https://twitter.com/#!/mcasperson">Matthew Casperson</a> they cover both a <a href="http://www.codeproject.com/KB/scripting/GettingStartedWithCAKE.aspx">basic introduction</a> and more <a href="http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2009/08/24/cake-programming-tutrorials.aspx">complex animation</a>.</p>

<p>The code below is how to create a yellow circle 150px wide with a 20px border stroke.</p>

<pre>
var $canvas, $circle;

$canvas = new Canvas(document.getElementById("code"), 600, 400);

$circle = new Circle(150, {
    x: 200,
    y: 200,
    fill: 'rgb(0,147,211)',
    stroke: 'rgb(255,241,12)',
    strokeWidth: 20,
    endAngle: Math.PI * 2
});

$canvas.append($circle);
</pre>

<p>Notice that with CAKE you create the HTML element first – declared above to be the child of “code” and 600 x 400 – rather than reference an already existing one.</p>

<p>Also note the value for endAngle – ouch. A library should avoid the use of radians for creating basic shapes.</p>

<p>Beyond the Casperson tutorials there a number of working demos: a <a href="http://glimr.rubyforge.org/cake/hello_world.html">simple introduction</a> and a serious of <a href="http://glimr.rubyforge.org/cake/canvas.html#KeyboardTest">full-on examples</a>.</p>

<p>There is also some <a href="http://code.google.com/p/cakejs/w/list">limited documentation on the home page</a>.</p>

<p>The whole point of creating a HTML Canvas library is to create an accessible entry point for developers. CAKE fails to do that. While there are a number of clear tutorials, CAKE has an over-reliance on geometry for even basic functionality. While this can't be avoided altogether (see the conclusion) it should be minimalised. </p>

<p>It's just far too low level for a library – I laughed at the complexity of some of the coding examples.</p>

<p>Finn <a href="https://twitter.com/#!/ilmarihei">Ilmari Heikkinen</a> is clearly a coding genius but he's left most of us behind with CAKE.</p>

<p><a href="http://www.suburban-glory.com/html5-experiments/cake-library.php">Click here to see a demo of CAKE</a>.</p>

<h6>Doodle.js</h6>

<p><img src="http://www.suburban-glory.com/images/doodlejs-html5-canvas-library.jpg" width="450" height="450" alt="doodle.js HTML5 Canvas library homepage" /></p>

<p><a href="https://github.com/billyist/doodle-js">Doodle.js</a> takes a totally different approach to all the other libraries presented here in that it doesn't try to fit in with either JavaScript or the Canvas API but instead mimics ActionScript.</p>

<p>It's an original take on Canvas and one worthy of further inspection.</p>

<p><a href="http://www.lamberta.org/">Billy Lamberta</a> together with <a href="http://www.bit-101.com/blog/">Keith Peters</a> created the library for their forthcoming book <a href="http://www.amazon.co.uk/Foundation-HTML5-Animation-with-JavaScript/dp/1430236655/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1310818598&amp;sr=8-1">Foundation HTML5 Animation with JavaScript</a> [edit: this wrong. See comments]. The premise behind the project is that it will be of assistance to Flash developers who are interested in using HTML5.</p>

<p>This is how you create a circle with doodle.js:</p>

<pre>
 // declare variables
 var $canvas, $element, $circle;

 //dom block element wrapper
 $element = doodle.createDisplay("canvas");
 //creates new canvas element wrapper
 $canvas = $element.createLayer();

 $circle = doodle.createSprite();
 $circle.graphics.beginFill(0xfff10c);
 $circle.graphics.circle(0, 0, 150);
 $circle.graphics.endFill();

 $circle.x = $element.width / 2;
 $circle.y = $element.height / 2;

 $canvas.addChild($circle);
</pre>

<p>The breadth of <a href="http://www.lamberta.org/doodle-js/doc/examples/making-things-move/">coding demos</a> attached to doodle.js is easily the most thorough of all the other libraries reviewed. By studying the code you'll be able to create smooth <a href="http://www.lamberta.org/doodle-js/doc/examples/making-things-move/chap03/02-up_down_motion.html">up and down motion</a>, make the <a href="http://www.lamberta.org/doodle-js/doc/examples/making-things-move/chap05/04-follow_mouse_1.html">object follow the mouse</a> and even create <a href="http://www.lamberta.org/doodle-js/doc/examples/making-things-move/chap16/08-pyramid.html">complex 3d shapes</a>.</p>

<p>Doodle.js also has the most complex <a href="http://lamberta.org/doodle-js/doc/api/">API reference</a> of the lot.</p>

<p>As it's a relatively new project and built to coincide with the release of a yet to be published book, hardly any attention has been given to doodle.js from the wider developer community. But don't let that put you off from trying it out. It's one to watch.</p>

<p><a href="http://www.suburban-glory.com/html5-experiments/doodle.php">Click on here to see a demo of doodle.js</a>.</p>

<h6>Conclusion</h6>

<p>Due to time restrictions none of the above are complete reviews but I hope they gave you a flavour of what to expect if you try either jCanvaScript, fabric.js, doodle.js or CAKE.</p>

<p>There are a number of other Canvas projects out there such as <a href="https://github.com/rsandor/gury">Gury</a>, <a href="https://canvastoolkit.codeplex.com/">HTML5 Canvas Library</a> and <a href="http://forvar.de/js/mcl/examples.html">MooTools Canvas Library</a> but they are either too fresh or too stagnant to be worthy of review.</p>

<p>From my investigation all have elements which are commendable but all are far from being complete, rounded libraries.</p>

<p>Many coders have been spoilt by JavaScript libraries such as jQuery and Dojo over the last few years. The ease of creating animation means no more than adding slideUp() or slideDown() at the end of a coding chain.</p>

<p>These are at such a high-level that they bear no resemblance whatsoever to the underlying JavaScript that creates these methods.</p>

<p>jCanvaScript attempts to follow this path and because of that it is easy learn. However, as we look to using the Canvas API for more complex purposes other than fade in and out or horizontal linear movement, more full code will be required – complex animation <em>will</em> require complex code.</p>

<p>Sure, a library will assist in this process but it will require a deeper understanding by the developer of programming techniques that use geometry calculations.</p>

<p>For that reason, I really don't see how jCanvaScript can produce the sort of necessarily complex animation such as <a href="http://lamberta.org/doodle-js/doc/examples/making-things-move/chap13/10-real_walk.html">this</a> and <a href="http://lamberta.org/doodle-js/doc/examples/making-things-move/chap16/12-move_cube_2.html">this</a> (created with doodle.js).</p>

<p>So for now perhaps doodle.js edges in front of the others but fabric.js could be a serious contender if usability issues are addressed.</p>

<p>If you have tried any of the above then please feel free to add your thoughts below.</p>]]></description>
 <pubDate>2011-07-18T10:38:12Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">141 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Replace a form submit button with an image using just CSS]]></title>
<link>http://www.suburban-glory.com/blog?page=140</link>
<description><![CDATA[<p>There are tons of articles out there on the subject of styling forms with individual web designers developing their own particular coding preferences over time. </p>

<p>For developers and designers, creating and styling forms is the bread'n'butter of their trade and one of their most regular activities.</p>

<p>Some parts of the form such as checkboxes and file uploads can only be partially altered by CSS with these form elements being reliant on the inbuilt OS and browser style, but the submit button can be radically altered. It can even be totally replaced with an image like so:</p>

<pre>
Image submit button:
&lt;input type=”image” src=”button.png” alt=”submit” name=”submit” /&gt;

Normal submit button:
&lt;input type=”submit” name=”submit” value=”submit” /&gt;
</pre>

<p>As creating an image button is so straight forward it may seem pointless to use another method; however, there are a number of problems with HTML image buttons.</p>

<p>Firstly, there are issues with PHP form submission because it follows the mouse coordinates and creates two different values based on the X and Y coordinates instead of just one straight submission.</p>

<p>Secondly, you may be using a CMS and it may be not immediately obvious just how to alter an HTML form.</p>

<p>This is a foolproof way of using an CSS to replace a form submit button with an image and which works in any browser and platform.</p>

<p>The first part of the code uses <a href="http://www.suburban-glory.com/blog?page=130">CSS3</a> attribute selectors and places an image as a background for the element (use an alternative selector method for Internet Explorer). Make sure the background image isn't repeated and is centred on both axis'. The width and height must be the same as the image.</p>

<p>Now make sure that there is no border and the text has a transparent colour so that it is invisible.</p>

<pre>
form input[type=submit] {
	background : url("submit.png") no-repeat center center;
	width : 115px;
	height :52px;
	border : none;
	color : transparent;
}
</pre>

<p>One problem though is that Internet Explorer below version 8 doesn't recognise transparent as a valid value so for the legacy browsers we'll give the font a size of zero.</p>

<pre>
form input[type=submit] {
	background : url("submit.png") no-repeat center center;
	width : 115px;
	height :52px;
	border : none;
	color : transparent;
	font-size : 0
}
</pre>

<p>It's easy to change the image on the hover state:</p>

<pre>
form input[type=submit]:hover {
	background : url("submit-hover.png") no-repeat center center;
}
</pre>

<p>Screen readers will still be able to read the submit button text despite it being invisible to other web users.</p>

<p>These are a couple of examples from recent jobs that I have done:</p>

<p><img src="http://www.suburban-glory.com/images/submit-button-image-one-small.jpg" alt="Submit button example one" width="300" height="200" /><img src="http://www.suburban-glory.com/images/submit-button-two-small.jpg" alt="submit button example two" width="300" height="200" /></p>

<h3>Using sliding doors for submit buttons</h3>

<p>It is also possible to use the sliding doors technique for submit buttons. For those that don't know, sliding doors is a means of creating a dynamic background image that expands as the text increases. It is most commonly used on menu list items.</p>

<p>Here's the image. A left hand side and a right hand side:</p>

<p><img src="http://www.suburban-glory.com/images/submit-button-image-small-four.png" alt="sliding doors images" width="500" height="32" /></p>

<p>The HTML submit button is as before but this time we will encase it in a div like so:</p>

<pre>
&lt;div class=”outer-submit”&gt;
&lt;input type=”submit” name=”submit” value=”submit” /&gt;
&lt;/div&gt;
</pre>

<p>
And here is the CSS code:</p>

<pre>
form .outer-submit {
	margin : 0 auto;
	background:transparent url("images/topic_button.png") no-repeat top left;
	max-width : 240px;
	width : 50%;
	padding : 0 0 10px 0;
}
form input[type=submit] {
	color : #fff;
	padding:9px;
	margin:0px 0px 5px 3px;
	border : none;
	width : 100%;
	background:transparent url("images/topic_button.png") no-repeat top right;
}
form .outer-submit:hover {
	background:transparent url("images/topic_button_hover.png") no-repeat top left;
}
form input[type=submit]:hover {
	background:transparent url("images/topic_button_hover.png") no-repeat top right;
}
</pre>

<p>This is what the above code looks like on a website.</p>

<p><img src="http://www.suburban-glory.com/images/submit-button-image-three-small.jpg" alt="sliding doors submit button" width="300" height="200" /></p>]]></description>
 <pubDate>2011-06-25T17:21:17Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">140 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Creating a pull down (nested) menu in Drupal 7]]></title>
<link>http://www.suburban-glory.com/blog?page=139</link>
<description><![CDATA[<p><strong>Special note: Don't follow this tutorial just download and use the <a href="http://drupal.org/project/menu_block">Menu Block module</a> instead.</strong></p>

<p>Drupal was originally a developers toy but over the last few years the thrust of the CMS has been to try lower the entry point for non-technical users.</p>

<p>The administration section in version 7 is now far, far more user friendly to lay people and is closer to Wordpress in its logical layout and smooth navigation.</p>

<p>However, creating themes can still be a taxing process.</p>

<p>Out of the box, primary and secondary menus do not allow nested structures (unless you use them in the blocks). This isn't a CSS issue – it simple won't publish the necessary HTML despite being allowed to create a nested menu in the admin section.</p>

<p>Secondary and primary are placed into the theme by using the <a href="http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7">theme()</a> function which creates a nested array like so:</p>

<pre>

        &lt;?php print theme('links__system_main_menu', array('links' =&gt; $main_menu, 'attributes' =&gt; array('id' =&gt; 'main-menu', 'class' =&gt; array('links', 'inline', 'clearfix')), 'heading' =&gt; t('Main menu'))); ?&gt;

</pre>

<p>The above sets the id, classes and a header title and associates this with the menu in the database.</p>

<p>In order to allow nested menus it is necessary to replace the above code with this:</p>

<pre>

	&lt;?php
$pid = variable_get('menu_main_links_source', 'main-menu');
$tree = menu_tree($pid);
$tree = str_replace(' class="menu"', '', $tree);
$main_menu = drupal_render($tree);
print $main_menu; 
?&gt;

</pre>

<p>This uses three different inbuilt Drupal functions: <a href="http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/variable_get">variable_get()</a>, 
<a href="http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_tree/7">menu_tree()</a> and
<a href="http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_render/7">drupal_render()</a>.</p>

<p>To explain, persistent variables are created with the variable_set() function and are kept cached in the database to prevent easy retrieval with variable_get().</p>

<p>The id of the main menu – called 'main-menu' – is then used as a parameter in the menu_tree() function. This calls the nested array for the main menu.</p>

<p>The magic comes with the simple PHP str_replace() function. You are looking for the needle menu class in the menu nested array haystack and removing it.</p>

<p>Then it is stuck back together again using the drupal_render() function.</p>

<p>Isn't there a way of doing this with just the theme() function? Those nested arrays make my head spin. Perhaps a more experienced Drupalista can comment.
</p>]]></description>
 <pubDate>2011-04-13T11:26:32Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">139 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Altering the read more link in Drupal 7]]></title>
<link>http://www.suburban-glory.com/blog?page=138</link>
<description><![CDATA[<p>How to change the position of the read more link at the bottom of node teasers has been a discussion point for Drupal themers for years. Four Kitchens even created a module to add this functionality: <a href="http://drupal.org/project/ed_readmore">http://drupal.org/project/ed_readmore</a>.</p>

<p>For those not familiar with the default Drupal layout, the read more link is at the bottom of the node teaser with other links such as comments. It's positioning there  doesn't flow very well and it looks better  sitting directly underneath the teaser text.</p>

<p>It is easy to remove this link in Drupal 7 by using the new functions <a href="http://api.drupal.org/api/drupal/includes--common.inc/function/hide/7">hide()</a> and <a href="http://api.drupal.org/api/drupal/includes%E2%80%94common.inc/function/render/7">render()</a>. ( render() uses an old Drupal function, drupal_render() ).</p>

<p>Drupal code originates from a PHP era before the widespread adoption of Object Orientated Programming, therefore much of it is dependent on nested arrays.</p>

<p>These can be quite maddening to deal with and it is not recommended do so without the <a href="http://drupal.org/project/devel">Devel module</a> and using the Devel helper dsm() function.</p>

<p>Hide() and render() allows themers to modify arrays without using preprocess functions in the template.php file.</p>

<p>In node.tpl.php they work as so.</p>

<p>By using render() it is possible to display the whole node – text, date, comment, links, the lot:</p>

<pre>

&lt;div&gt;
&lt;?php print render($content); ?&gt;
&lt;/div&gt;

</pre>

<p>Removing parts of the page and then placing them elsewhere is easy with Drupal 7.</p>

<p>Before calling the parent $content you can hide some or all of its children.</p>

<p>Below prevents comments from being rendered.</p>

<pre>

&lt;div&gt;
&lt;?php
hide($content['comments']);
php print render($content); 
?&gt;
&lt;/div&gt;

</pre>

<p>If you then wish to display them separately you'd then need to call comments like so elsewhere on the page:</p>

<pre>

&lt;?php print render($content['comments']); ?&gt;

</pre>

<p>Using this method hiding the read more link is achieved with the following:</p>

<pre>

&lt;?php hide($content['links']['#links']['node-readmore']); ?&gt;

</pre>

<p>Simple, er?</p>

<p>Inserting it elsewhere requires the use of the <a href="http://api.drupal.org/api/drupal/includes--common.inc/function/l">l()</a> and <a href="http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7">t()</a> functions to create a link:</p>

<pre>

  &lt;?php 
if($teaser){
      print l(t('Read more'), 'node/' . $nid, array('attributes' =&gt; array('class' =&gt; t('node-readmore-link')))); 
  } 
?&gt;

</pre>

<p>The l() and t() functions are needed when inserting links into Drupal so as to ensure they integrate safely with the rest of the code.</p>

<p>Adding all of the above together would create a node.tpl.php page like so:</p>

<pre>

&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="&lt;?php print $classes; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;

  &lt;div class="content-box"&gt;
  
    &lt;div class="views-field-title"&gt; &lt;?php print render($title_prefix); ?&gt;
    
      &lt;?php if (!$page): ?&gt;
      
      &lt;p&gt;&lt;?php print $title; ?&gt;&lt;/p&gt;
      &lt;?php endif; ?&gt;
      
      &lt;?php print render($title_suffix); ?&gt; &lt;/div&gt;
    &lt;!-- End views-field-title --&gt;
    
    &lt;?php
	
		hide($content['comments']);
      hide($content['links']);
	  hide($content['field_image']); 
	  hide($content['links']['#links']['node-readmore']);
	 ?&gt;
     
    &lt;div class="field-content"&gt; 
	&lt;?php print render($content['field_image']); ?&gt;
    
      &lt;div class="content-date"&gt;&lt;?php print $date; ?&gt;&lt;/div&gt;
	  
      &lt;?php print render($content); ?&gt;
      
      &lt;?php if($teaser){ ?&gt;
      &lt;p class="last-read"&gt;&lt;?php print l(t('Read more'), 'node/' . $nid, array('attributes' =&gt; array('class' =&gt; t('node-readmore-link')))); ?&gt;&lt;/p&gt;
      &lt;?php } ?&gt;
    &lt;/div&gt;
    &lt;!-- End field-content --&gt;
    
    &lt;div class="read-more"&gt; &lt;?php print render($content['links']); ?&gt;&lt;/div&gt;
    &lt;!-- End read-more --&gt;
    
  &lt;/div&gt;
  &lt;!-- End content box --&gt;
  
  &lt;?php print render($content['comments']); ?&gt; 
  
  &lt;/div&gt;

</pre>]]></description>
 <pubDate>2011-04-12T18:34:32Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">138 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using JavaScript to create equal height columns]]></title>
<link>http://www.suburban-glory.com/blog?page=137</link>
<description><![CDATA[<p>Creating websites with tables didn't have many advantages over using CSS, but the ability to easily create equal height columns was one of them. </p>

<p>There are a small number of tried and tested CSS techniques to achieve equal height columns but an ever increasing favourite amongst designers is to use server-side script.</p>

<p>This can be achieved by using DOM JavaScript as below:</p>

<pre>
// This function below is necessary to take the CSS values as they appear in the external style sheet
function retrieveComputedStyle(element, styleProperty) {
    var computedStyle = null;

    if (typeof element.currentStyle != "undefined") {
        computedStyle = element.currentStyle;
    } else {
        computedStyle = document.defaultView.getComputedStyle(element, null);
    }
    return computedStyle[styleProperty];
}

var $columnOne = document.getElementById("content-left");
var $columnTwo = document.getElementById("content-right");

var $columnOneHeight = document.getElementById("content-left").offsetHeight;
var $columnTwoHeight = document.getElementById("content-right").offsetHeight;

var $columnOneBorderTopWidth, $columnOneBorderBottomWidth, $columnOnePaddingTop, $columnOnePaddingBottom;
var $columnTwoBorderTopWidth, $columnTwoBorderBottomWidth, $columnTwoPaddingTop, $columnTwoPaddingBottom;

// Find border and padding dimensions of #content-left
$columnOneBorderTopWidth = retrieveComputedStyle($columnOne, "borderTopWidth");
$columnOneBorderBottomWidth = retrieveComputedStyle($columnOne, "borderBottomWidth");
$columnOnePaddingTop = retrieveComputedStyle($columnOne, "paddingTop");
$columnOnePaddingBottom = retrieveComputedStyle($columnOne, "paddingBottom");

// Find border and padding dimensions of #content-right
$columnTwoBorderTopWidth = retrieveComputedStyle($columnTwo, "borderTopWidth");
$columnTwoBorderBottomWidth = retrieveComputedStyle($columnTwo, "borderBottomWidth");
$columnTwoPaddingTop = retrieveComputedStyle($columnTwo, "paddingTop");
$columnTwoPaddingBottom = retrieveComputedStyle($columnTwo, "paddingBottom");

// Remove pixels with replace method aand then add top and botton heights
var $columnOneBorderNumber = Number($columnOneBorderTopWidth.replace("px", "")) + Number($columnOneBorderBottomWidth.replace("px", ""));
var $columnOnePaddingNumber = Number($columnOnePaddingTop.replace("px", "")) + Number($columnOnePaddingBottom.replace("px", ""));
var $columnTwoBorderNumber = Number($columnTwoBorderTopWidth.replace("px", "")) + Number($columnTwoBorderBottomWidth.replace("px", ""));
var $columnTwoPaddingNumber = Number($columnTwoPaddingTop.replace("px", "")) + Number($columnTwoPaddingBottom.replace("px", ""));

// Now take the total margins and padding numbers away from the height
var $columnOneFinal = $columnOneHeight - $columnOneBorderNumber - $columnOnePaddingNumber;
var $columnTwoFinal = $columnTwoHeight - $columnTwoBorderNumber - $columnTwoPaddingNumber;

// Use the Maths object to find the highest number and set that in the maxNumber variable
var maxNumber = Math.max($columnOneFinal, $columnTwoFinal);

// Set the height of the columns to be equal
$columnOne.style.height = maxNumber + "px";
$columnTwo.style.height = maxNumber + "px";
</pre>

<p>The enormous slab of code above creates equal heights for two divs, but by using a library such as jQuery it is possible just to use this:</p>

<pre>
    var $columnOne = $('#content-left').height();
    var $columnTwo = $('#content-right').height();

    var maxNumber = Math.max($columnOne, $columnTwo,);

    $('#content-left').css("height", maxNumber + "px");
    $('#content-right').css("height", maxNumber + "px");
</pre>

<p>The above finds the height of the two columns and then uses the JavaScipt Math object to find which value is the largest and then sets that in the CSS. This method does not take into account padding or margin measurments. If required, you'll have to add that separately.</p>

<p>Using this method recently I had a problem with the Webkit browsers. I worked out that Webkit was adding the height of the images to the above calculations, thus, creating uneven columns.</p>

<p>Thinking that it was a new Webkit DOM glitch that jQuery hadn't caught up with yet I tried the JavaScript longhand method but it was still the same.</p>

<p>I finally worked out that the problem lay in how JavaScript was being called as the page loaded.</p>

<p>The usual method of placing jQuery on the page is by using the $(document).ready() function. This calls the JavaScript <em>after</em> the DOM has loaded but <em>before</em> the page content.</p>

<p>Another option is to use the  $(window).load() function like so:</p>

<pre>

$(window).load(function() {

// Code here

});
</pre>

<p>This allows the script to be executed after both the DOM and the page has been rendered. </p>

<p>Using this function meant that the equal height columns code now worked perfectly.
</p>]]></description>
 <pubDate>2011-03-24T16:48:17Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">137 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Ideas of March]]></title>
<link>http://www.suburban-glory.com/blog?page=136</link>
<description><![CDATA[<p>It can be argued that blogging and blog commenting is on the wane because social media – in particular Twitter and Facebook – has captivated web users attention, but none of these services are in themselves a replacement for blogging.</p>

<p>Twitter is first-class for the quick dissemination of breaking news stories and the writing of witty one-liners has become an art in itself, but with only 140 characters maximum this provides a break on the style and substance of the platform. Bloggers face no such restraints.</p>

<p>There is still a need for traditional blogging.</p>

<p>At the moment Google is waging a war against content farms as it seeks to improve the quality of the search index. Few, if any, could seriously complain that this isn't a righteous move by the big G. At <a href="http://www.webpronews.com/did-googles-algorithm-update-go-far-enough-on-content-farms-2011-02">WebProNews</a> Chris Crum questions whether we want high ranking content from non-professional sources on important subjects such as cancer:</p>

<blockquote><p>
You can still search for "level 4 brain cancer" on Google and the top 2 results are from eHow. The top one comes from a freelance writer with a background in marriage psychology and family therapy, whose other featured articles on the site include titles like "Kohler Toilet Won’t Flush Completely", "Roper Dryer Won’t Start", and "My Toilet Water Smells</p></blockquote>

<p>In my Google reader I subscribe to about 100 feeds. Some of these are magazines such as Sitepoint, Smashing and SeoMOZ, but most of them are individual bloggers like <a href="http://www.copywritingdean.com/">Stephen Dean</a>, <a href="http://cruncht.com/">Murray Woodman</a>, <a href="http://davidwalsh.name/">David Walsh</a>, <a href="http://www.jankoatwarpspeed.com/">Janko Jovanovic</a>, <a href="http://www.linkspiel.com/">Debra Mastaler</a> and <a href="http://perishablepress.com/css3-remove-box-shadow/">Jeff Starr</a>.</p>

<p>If, during my web travels, I come across a quality post then I check the output of the author and if they write consistently top notch items I subscribe to their feed. Using this methodology rarely do I subsequently unsubscribe.</p>

<p>For the online industries such as web design and search engine optimization, bloggers have played a crucial role in the dissemination and revision of ideas and best work practices. Blogging, at its best, provides quality information to the web audience.</p>

<p>I don't envisage this changing in the future.</p>

<p><a href="http://www.rachelandrew.co.uk/archives/2011/03/15/the-ideas-of-march/">Rachel Andrew</a> reflects on ten years of blogging and how Twitter has eaten into her daily routine:</p>

<blockquote><p>
As I stopped posting trivial stuff to my blog, without any conscious decision, the blog then became the place I posted <em>important</em> things. My recent posts tend to be about business or web issues, and take the form of short essays rather than the short posts of the past. Again, this hasn’t been a conscious change of direction for the blog, however the more I post things I feel are important, the less I feel able to post the trivial. (her emphasis)
</p></blockquote>

<p>I would suggest that Rachel's experience of moving the whimsical to Twitter and leaving in-depth analysis on her blog is the norm rather than the exception.</p>

<p>So if blogging is on the retreat then perhaps this is just the quantity rather than quality?</p>

<p>Intellectual detractors of the net often disparagingly talk about “the cult of the amateur”. But this is both a strength and weakness. Clearly, I don't want to be handed information about brain cancer by a non-medical writer; but the professional, semi-professional or amateur enthusiasts are an essential part of the web environment and especially in the new media and creative industries.</p>

<p>To celebrate and rejuvenate blogging Chris Shiflett recently issued a call under the banner of “<a href="http://shiflett.org/blog/2011/mar/ideas-of-march">Ideas for March</a>”. The points of his manifesto read:</p>

<ul><li>Write a post called Ideas of March.</li>
<li>List some of the reasons you like blogs.</li>
<li>Pledge to blog more the rest of the month.</li>
<li>Share your thoughts on Twitter with the #ideasofmarch hashtag.</li>
</ul><p>This is my contribution under the Shiflett standard.</p>

<p>I blog for both altruistic and selfish reasons. Sometimes during the course of work I come across tricky problems that take time to solve. Often partial ideas for solutions have already been recorded by other bloggers or forum users and I want to contribute to the wider discourse. <a href="http://www.suburban-glory.com/blog?page=133">Using PEAR Cache Lite with Drupal 6 and Varnish</a> and <a href="http://www.suburban-glory.com/blog?page=134">Google Analytics and Drupal</a> are two recent articles in this vein. I don't do anything to promote these types of posts. I just write them, publish them and then let them float.</p>

<p>Other posts are about self-promotion (SEO) and autodidacticism. As an example, I recently spent a few days playing around with HTML5 canvas. Afterwards I wrote what I had learnt into a tutorial and then went on a link building exercise. Writing my coding experience down solidifies my knowledge of the subject matter and improves the learning process. Read <a href="http://www.suburban-glory.com/blog?page=135">Using HTML5 canvas</a>, <a href="http://www.suburban-glory.com/blog?page=130">A Complete Guide to CSS Functions</a> and <a href="http://www.suburban-glory.com/blog?page=125">A complete guide to CSS pseudo-classes</a>.</p>

<p>Most importantly, I enjoy writing. As a young adult I had little grasp of the English language and I found it impossible to spell any word over six letters. I was so awful that I wondered whether I was dyslexic (Don't be stupid, my mum said, You just didn't pay any attention at school).</p>

<p>Many years have passed since then but throughout most of my adult life I have learned to love both writing and reading and consider them fundamental to a healthy, informed outlook to life. Indeed, the written word is the bedrock of modern civilisation.</p>

<p>Writing quality blog posts takes time. For me, they are often 1,500 to 2,000 words long, and I want to be certain that all information is correct and spelling and grammar mistakes are kept at a minimum. This often means revisions before publication. To sum up, I take it seriously. </p>

<p>This is why I blog: contributing to a community, self-promotion and enjoyment.</p>

<p>And in keeping with the spirit of things I pledge to write one extra article in March.</p>

<p>Fellow bloggers trending at the moment for <a href="http://twitter.com/#!/search/ideasofmarch">#ideasofmarch</a> are </p>

<p><a href="http://weierophinney.net/matthew/archives/259-The-Ideas-of-March.html">Matthew Weier O'Phinney</a>, <a href="http://lisamusing.com/writes">Lisa Denlinger</a>, <a href="http://nateabele.com/the-ideas-of-march">Nate Abele</a>, <a href="http://www.eschrade.com/page/ideas-of-march/">Kevin Schroeder</a>, <a href="http://theother.leonpaternoster.com/the-ideas-of-march">Leon Paternoster</a>, <a href="http://alwaystwisted.com/post.php?s=2011-03-15-ideas-of-march">Stu Robson</a>, <a href="http://vampyrebytes.com/2011/03/15/the-ideas-of-march/">Sean Prunka</a>, <a href="http://naramore.net/blog/the-ide-a-s-of-march">Elizabeth Naramore</a>, <a href="http://stream.thisisapipe.com/post/3877904308/ideas-of-march">Cameron Koczon</a>, <a href="http://blog.rafaeldohms.com.br/2011/03/15/the-ideas-of-march/">Rafael Machado Dohms</a> and <a href="http://nocturnalmonkey.com/writing/entry/ideas_of_march">Sam Hardacre</a></p>]]></description>
 <pubDate>2011-03-16T13:04:41Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">136 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using HTML5 canvas]]></title>
<link>http://www.suburban-glory.com/blog?page=135</link>
<description><![CDATA[<p>Unless you have been in a coma for the last couple of years you would have noticed the upturn in interest in HTML5 and the canvas tag.</p>

<p>The Canvas API is a means of creating shapes, graphs and even animation using just JavaScript and which, unlike Flash, doesn't require a plug-in and, unlike Flash again, is not proprietary but open.</p>

<p>Due to all the euphoria around HTML5 you may have come across list articles such as <a href="http://www.hongkiat.com/blog/48-excellent-html5-demos/">48 Potential Flash-Killing Demos</a> and <a href="http://webdesignledger.com/inspiration/10-html5-demos-to-make-you-forget-about-flash">10 HTML5 Demos to Make You Forget About Flash</a>, and which in their screaming hyperbole give the impression that all the cool kids hang out with HTML5 while Flash is the preferred technology for your senile, incontinent granddad. </p>

<p>But this is not the case. HTML5 canvas is still a juvenile cousin to a much more mature Flash. As Mozilla themselves admit on their own <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ABasic_animations">canvas guide</a>:</p>

<blockquote><p>
Unfortunately the canvas element was never designed to be used in this way [to make animation] (unlike Flash) so there are limitations.</p>

<p>Probably the biggest limitation is that once a shape gets drawn it stays that way. If we need to move it we have to redraw it and everything that was drawn before it. It takes a lot of time to redraw complex frames and the performance depends highly on the speed of the computer it's running on.
</p></blockquote>

<p>A user on Stack Overflow started a thread entitled <a href="http://stackoverflow.com/questions/4737258/why-is-creating-content-with-html5-canvas-much-more-complicated-than-authoring-wi">Why is creating content with HTML5 Canvas much more complicated than authoring with Flash?</a> with the following exasperated plea: </p>

<blockquote><p>
Hi, I've been doing Flash for couple of months and I love it. I can easily use a rectangle tool to draw a rectangle and do shape/motion tweening within seconds.</p>

<p>Lots of people are talking about HTML5 vs Flash nowadays and I took a look on HTML5 Canvas today. To my surprised, I see whole bunch of "code". It's so complicated, they need to make a lot of calls (fill, stroke, moveto, closepath etc...) to make a simple shape. And even dozens lines of code mixing with javascript to do a simple movement???</p>

<p>Am I missing something? It'll make animation 10x more complicated with HTML5 Canvas than Flash.
</p></blockquote>

<p>Read the answers to understand both the underlying differences between the two different technologies and reasons why Flash is still best for online animation.</p>

<p>Two problems for canvas at the moment are the lack of thorough tutorials and a decent library so as to allow more widespread access to the complicated animation features.</p>

<p>At the time of writing there is no one comprehensive book on the subject although a number are due to be released in 2011 including <a href="http://oreilly.com/catalog/0636920013327/">HTML5 Canvas</a> by Steve and Jeff Fulton on the O'Reilly imprint (Send me a copy to review please!!).</p>

<p>Nevertheless despite these handicaps below are some ways that it can be used.</p>

<h3>Create a rectangle with HTML5 canvas</h3>

<p>The current development of the canvas API means that it is only possible to create rectangles or squares – all other shapes need to be made using paths.</p>

<p>The first and most important thing is to create the html:</p>

<pre>

&lt;canvas id=”canvas-one” width=”400” height=”400”&gt;&lt;/canvas&gt;

</pre>

<p>If no width or height is specified then the browser will fall back to a pre-defined size.</p>

<p>Every use of the canvas API must begin with calling the rendering context, which below is 2d:</p>

<pre>

var $canvas = document.getElementById(“canvas-one”);
var $cd = $canvas.getContext('2d');

</pre>

<p>Note that there is no 3d rendering yet.</p>

<p>If you are creating a rectangle shape you will need to first declare the colour of the body and specify the colour and width of the border:</p>

<pre>

    $cd.strokeStyle = "#000";
    $cd.fillStyle = "#FFFF00";
    $cd.lineWidth = "5";

&lt;/pre&gt;

&lt;p&gt;And now reference the above and create a rectangle:&lt;/p&gt;

&lt;pre&gt;&lt;![CDATA[

$cd.fillRect(30,30,200,300);
$cd.strokeRect(30,30,200,300);

</pre>

<p>The values above are, from left to right, x coordinate, y coordinate, width in pixels and height.</p>

<p>Place all of the above in an object detection statement so that it looks like below:</p>

<pre>

if ($canvas.getContext) {

    $cd = $canvas.getContext('2d');

    $cd.strokeStyle = "#000";
    $cd.fillStyle = "#FFFF00";
    $cd.lineWidth = "5";

$cd.fillRect(30,30,200,300);
$cd.strokeRect(30,30,200,300);

} else {

    alert("Your browser does not support HTML5 canvas. Use a decent browser, douchebag");

}

</pre>

<p>This creates the following shape:</p>

<p><img src="http://www.suburban-glory.com/images/canvas-one-rectangle.jpg" width="300" height="366" alt="rectangle created with HTML5 canvas" /></p>

<p>It is possible to delete all the canvas content by using the following line of code:</p>

<pre>

$cd.clearRect(0,0,$canvas.width,$canvas.height);

</pre>

<p>Or just:</p>


<pre>

$canvas.height = $canvas.width;

</pre>

<h4>Create a face with HTML5 canvas</h4>

<p>Now use some different methods and create a face like so:</p>

<p><img src="http://www.suburban-glory.com/images/canvas-two-face.jpg" width="300" height="223" alt="face created with HTML5 canvas" /></p>

<p>Start off as before:</p>

<pre>

var $canvas = document.getElementById("canvas-one"),
    $cd;

if ($canvas.getContext) {

$cd = $canvas.getContext('2d');

$cd.strokeStyle = "#000";
$cd.fillStyle = "#FFFF00";
$cd.lineWidth ="2";

// New code here

} else {

alert("Your browser does not support HTML5 canvas. Use something decent, douche bag");

}

</pre>

<p>To create a face you are going to need different shapes to represent the different parts. </p>

<p>You'll need to create a circle for the face shape. Unlike the previous rectangle you always begin creating a shape by calling the <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ADrawing_shapes#section_5">beginPath</a> method:</p>

<pre>

$cd.beginPath();
$cd.arc(300,200,50,0,Math.PI*2, false);
$cd.fill();

</pre>

<p>The <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ADrawing_shapes#section_10">arc</a> method creates a circle. The measurements, from left to right, are the x coordinate, the y coordinate, the radius size, the start angle, the end angle and whether it runs clockwise or anti-clockwise. Note how the mathematical formula PI is used to create a perfect circle. </p>

<p>Now for a mouth:</p>

<pre>

$cd.beginPath();
$cd.moveTo(270,210)
$cd.lineTo(330,210);
$cd.stroke();

</pre>

<p>Again, call the beginPath method before you create the shape. Here the straight line moves along the specified X and Y coordinates. <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ADrawing_shapes#section_6">MoveTo</a> starts the line and <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ADrawing_shapes#section_8">lineTo</a> is the next coordinate. By using more lineTo methods it is possible to create a myriad of different shapes.</p>

<p>Now add some more line paths to create the eyes and the final code looks like this:</p>

<pre>

var $canvas = document.getElementById("canvas-one"),
    $cd;

if ($canvas.getContext) {

    $cd = $canvas.getContext('2d');

    $cd.strokeStyle = "#000";
    $cd.fillStyle = "#FFFF00";
    $cd.lineWidth = "2";

    $cd.beginPath();
    $cd.arc(300, 200, 50, 0, Math.PI * 2, false);
    $cd.fill();

    $cd.beginPath();
    $cd.moveTo(270, 210)
    $cd.lineTo(330, 210);
    $cd.stroke();

    $cd.fillStyle = "#000";
    $cd.beginPath();
    $cd.arc(285, 180, 5, 0, Math.PI * 2, false);
    $cd.fill();

    $cd.beginPath();
    $cd.arc(315, 180, 5, 0, Math.PI * 2, false);
    $cd.fill();


} else {

    alert("Your browser does not support HTML5 canvas. Use something decent, douche bag");

}

</pre>

<p>Note above how the colour isn't kept in a variable but needs to be changed as the document progresses.</p>

<h5>Create a smiling face with HTML5 canvas</h5>

<p>The face looks very glum so give him a smile by using the <a href="https://developer.mozilla.org/en/Canvas_tutorial%3ADrawing_shapes#section_12">quadratic bezier curve method</a>.</p>

<pre>

$cd.moveTo(270, 210);
$cd.quadraticCurveTo(300, 250, 330, 210);
$cd.stroke();

</pre>

<p>As always, moveTo is at the start. The measurements in the quadraticCurveTo, from left to right, are the first control point, the second control point, the x coordinate and the y coordinate. Just like using bezier curves in Illustrator, they are not easy to master.</p>

<p>Added with the rest of the code it looks as so:</p>

<pre>

var $canvas = document.getElementById("canvas-one"),
    $cd;

if ($canvas.getContext) {

    $cd = $canvas.getContext('2d');

    $cd.strokeStyle = "#000";
    $cd.fillStyle = "#FFFF00";
    $cd.lineWidth = "2";

    $cd.beginPath();
    $cd.arc(300, 200, 50, 0, Math.PI * 2, false);
    $cd.fill();

    $cd.strokeStyle = "#000";
    $cd.beginPath();
    $cd.arc(300, 200, 50, 0, Math.PI * 2, false);
    $cd.stroke();

    $cd.moveTo(270, 210);
    $cd.quadraticCurveTo(300, 250, 330, 210);
    $cd.stroke();

    $cd.fillStyle = "#000";

    $cd.beginPath();
    $cd.arc(285, 180, 5, 0, Math.PI * 2, false);
    $cd.fill();

    $cd.beginPath();
    $cd.arc(315, 180, 5, 0, Math.PI * 2, false);
    $cd.fill();

} else {

    alert("Your browser does not support HTML5 canvas. Use something decent, douchebag");

}

</pre>


<p>
<img src="http://www.suburban-glory.com/images/canvas-three-face.jpg" width="300" height="199" alt="smiling face created with HTML5 canvas" /></p>

<h6>Create random multiple circles with HTML5 canvas</h6>

<p>Next, create this:</p>

<p><img src="http://www.suburban-glory.com/images/canvas-four-circle.jpg" width="300" height="206" alt="circles created with HTML5 canvas" /></p>

<p>It is 5,000 little circles of varying size and colour and uses the methods already detailed above:</p>

<pre>

var $canvas = document.getElementById("canvas-one"),
    $cd;

if ($canvas.getContext) {

    $cd = $canvas.getContext('2d');

    for (i = 0; i &lt;= 5000; i++) {

        $cd.fillStyle = "rgb(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + ")";

        $cd.strokeStyle = "rgb(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + ")";

        $cd.lineWidth = "2";

        var $x = 150 + Math.floor(Math.random() * 150);
        var $y = 150 + Math.floor(Math.random() * 150);
        var $radius = 0.1 + Math.floor(Math.random() * 10);

        $cd.beginPath();
        $cd.arc($x, $y, $radius, 0, Math.PI * 2, true);

        $cd.stroke();
        $cd.fill();

    }
}

</pre>

<h6>Create random multiple spots with HTML5 canvas</h6>

<p>Finally, introducing the essential JavaScript method for animation and motion, <a href="http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/">setTimeout</a>. This instructs the browser to re-run the function after the number of milliseconds specified:</p>

<pre>

var $canvas = document.getElementById('canvas-one'),
 $cd;
if ($canvas.getContext) {

    function create_spots() {

        $cd = $canvas.getContext('2d');

        for (i = 0; i &lt;= 100; i++) {

            $cd.fillStyle = "rgba(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 10) / 10 + ")";

            $cd.strokeStyle = "rgba(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 10) / 10 + ")";

            var $x = 10 + Math.floor(Math.random() * 491);

            var $y = 10 + Math.floor(Math.random() * 491);

            var $radius = 0.1 + Math.floor(Math.random() * 2);

            $cd.beginPath();

            $cd.arc($x, $y, $radius, 0, Math.PI * 2, true);

            $cd.stroke();

            $cd.fill();

        } // End for loop
        setTimeout('create_spots()', 1000);

    } // end create spots functions
    create_spots();

</pre>

<p>The above code creates 100 multi-coloured spots every 1000 milliseconds: <a href="http://www.testing-two.suburban-glory.com/">check it out here</a>.</p>

<p>The truth is that apart from the famous website for Arcade Fire's <a href="http://www.thewildernessdowntown.com/">The Wilderness Down</a>, much of the current showcased HTML5 looks no more impressive than Java animation from 10 or 15 years ago. </p>

<p>Of course, this will change. The Canvas API will develop, browsers will become faster and more capable and the community of users around this HTML5 feature will grow and become stronger.</p>

<p>Hopefully, somebody will create a code library for canvas animation. Creating objects is cumbersome but straight forward; however, in order for the popularity of this particular HTML5 API to spread there needs to be easy access to animation features as you would find in jQuery or Mootools.</p>

<p>If you are interested in finding out more about canvas then read the following guides:</p>

<ul><li>
<a href="http://www.ibm.com/developerworks/web/library/wa-html5canvas/index.html?cmp=dw&amp;cpb=dwwdv&amp;ct=dwgra&amp;cr=twitter&amp;ccy=zz&amp;csr=dehtml5canvas">Create great graphics with the HTML5 canvas</a></li>

<li><a href="https://developer.mozilla.org/en/Canvas_tutorial">Mozilla canvas tutorial</a></li>

<li><a href="http://www.storiesinflight.com/html5/">Stories in Flight: HTML5 / CSS3 cheatsheet</a></li>

<li><a href="http://waynecater.wordpress.com/2011/02/07/html5-canvas-animation-overview/">HTML5 Canvas Animation Overview</a></li>

<li><a href="http://www.html5canvastutorials.com/">HTML5 Canvas Tutorials</a></li>

<li><a href="http://diveintohtml5.org/canvas.html#divingin">Lets Call it a Draw(ing Surface) – Dive Into HTML5</a></li>

<li><a href="http://dev.opera.com/articles/view/html-5-canvas-the-basics/">HTML5 canvas - the basics</a></li>

<li><a href="http://answers.oreilly.com/topic/1929-how-to-use-the-canvas-and-draw-elements-in-html5/">How to Use the Canvas and Draw Elements in HTML5</a></li>

<li><a href="http://sixrevisions.com/html/canvas-element/">HTML5 Canvas Element Guide</a></li>

</ul>]]></description>
 <pubDate>2011-02-15T11:53:35Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">135 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Varnish, Google Analytics and Drupal]]></title>
<link>http://www.suburban-glory.com/blog?page=134</link>
<description><![CDATA[<p>If you are using Drupal on a virtual or dedicated server and you haven't yet installed <a href="http://www.varnish-cache.org/">Varnish</a> then make sure you set aside some time in the near future to do so. It is, by far, the most effective way of presenting a cache to anonymous users.</p>

<p>The best guide for setting up Varnish can be found in the excellent Lullabot video <a href="http://drupalize.me/videos/drupal-performance-scalability">Drupal Performance &amp; Scalability</a>. This video covers Varnish, Pressflow and PHP and MySQL optimisation techniques. However, although only released at the turn of the year, some of the information is now out of date. For instance, it recommends using a <a href="https://wiki.fourkitchens.com/display/PF/Replacement+init+script+for+memcached+on+CentOS+5">replacement init script for memcached</a>; but the latest version of the Memcache Drupal module makes this script redundant.</p>

<p>You can also find help on the <a href="http://groups.drupal.org/high-performance">Drupal Performance group site</a>.</p>

<p>One big issue with Varnish is that the presence of even a single cookie will mean the user bypasses the cached content. That is why it is essential to use <a href="http://pressflow.org/">Pressflow</a> because it removes unnecessary session cookies that can be found in Drupal.</p>

<p>If you follow the existing guides carefully then you shouldn't encounter too many problems installing Varnish, however trying to deal with Google Analytics cookies gave me a real headache.</p>

<p>There is a <a href="https://wiki.fourkitchens.com/display/PF/Configure+Varnish+for+Pressflow">Drupal-optimised Varnish configuration file script</a> that is possible to cut and paste into the default.vcl file; but getting to grips with it requires knowledge of the homegrown language that it uses, details of which can be <a href="http://www.varnish-cache.org/docs/2.1/">found here</a>.</p>

<p>In the script linked to above there is a line that strips Google Analytics cookies before it is processed, thus allowing the cache to proceed.</p>

<pre>

  // Remove has_js and Google Analytics cookies.
  set req.http.Cookie = regsuball(req.http.Cookie, "(^|;s*)(__[a-z]+|__utma_a2a|has_js)=[^;]*", "");

</pre>

<p>I've tried the above code and a number of different variations that I found elsewhere on the web and I couldn't get the cache to work with Google Analytics. There is clearly something fundamental I'm misunderstanding about how the script processes cookies.</p>

<p>However, there is an alternative to the standard JavaScript analytics code and which is not dependent on cookies.</p>

<p>Because a number of mobile phone browsers don't accept JavaScript or cookies, in 2009 Google released a version that was non-JavaScript and non-cookie analytics code for sites aimed at this market.</p>

<p>So what is good for mobile phones is good for Varnish. When you sign up and grab the code click on the advanced tab and then click on “a site built for a mobile phone” and from there use the code provided.</p>

<p>As an aside, I use a couple of co.cc domains for sites in development. I couldn't get Google to recognise the tracking code when placed on co.cc domains. Has anybody else encountered this problem before? It is mickey mouse domain so I suppose there must be problems with the DNS.</p>]]></description>
 <pubDate>2011-02-02T16:14:45Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">134 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using PEAR Cache Lite with Drupal 6]]></title>
<link>http://www.suburban-glory.com/blog?page=133</link>
<description><![CDATA[<p>The PEAR repository is a well-used and well-loved library of reusable Open Source PHP code. Perhaps in recent years it has fallen a bit out of favour and has become somewhat neglected; but there are some useful scripts to be found on there, with one of those being Cache Lite.</p>

<p>This article describes how I implemented Cache Lite with Drupal CMS.</p>

<p>One aspect of Drupal that can give users grief is its cache. The inbuilt Drupal cache is, although better than nothing, dependent on database storage and isn't the best solution. Easily the best solution for top notch Drupal performance is using Alternative PHP Cache (APC), Varnish HTTP accelerator and Memcache for the database. Most major Drupal sites use all or some of these three.</p>

<p>It is unthinkable to run Drupal without a server-side cache as slow load times are detrimental to the user experience, especially for an eCommerce cart where there is a well-proven correlation between fast page load times and happy customers.</p>

<p>However, if you are running Drupal on a shared server then these solutions are not going to be possible to use. There are a number of credible Drupal third-party cache modules such as Boost but I wanted to try Drupal with <a href="http://pear.php.net/package/Cache_Lite/redirected">PEAR Cache Lite</a>.</p>

<p>If I was to build a PHP site from scratch I would consider using PEAR Cache Lite which uses PHP output buffering with OOP.</p>

<p>It's certainly one of the easiest solutions to implement. </p>

<p>Lets take a look at Cache Lite implemented for caching various blocks on the standard Drupal page.tpl.php page:</p>


<pre>

&lt;?php
require_once (drupal_get_path('module', 'cachelite') . '/Cache/Lite/Output.php');

$id = md5('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);

$options = array(
'cacheDir' =&gt; './sites/default/files/cache/',
'lifeTime' =&gt; 3600,
'caching' =&gt; TRUE
);

/* Set a key for this cache item */
$cache = new Cache_Lite_Output($options);

if ( !($cache-&gt;start($id . 'block-one')) ) {
	 
    	     echo '&lt;!-- Served From Cache block one: '. date('l jS of F Y h:i:s A').' --&gt;';
	
				 ?&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="&lt;?php print $language-&gt;language ?&gt;" lang="&lt;?php print $language-&gt;language ?&gt;" dir="&lt;?php print $language-&gt;dir ?&gt;"&gt;

&lt;head&gt;
  &lt;?php print $head; ?&gt;
  &lt;title&gt;&lt;?php print $head_title; ?&gt;&lt;/title&gt;
  &lt;?php print $styles; ?&gt;
  &lt;?php print $scripts; ?&gt;
  &lt;script type="text/javascript"&gt;&lt;?php /* Needed to avoid Flash of Unstyled Content in IE */ ?&gt; &lt;/script&gt;
&lt;/head&gt;
&lt;body class="&lt;?php print $body_classes; ?&gt;"&gt;
  &lt;div id="page"&gt;
    &lt;div id="header"&gt;
      &lt;div id="logo-title"&gt;

        &lt;?php if (!empty($logo)): ?&gt;
          &lt;a href="&lt;?php print $front_page; ?&gt;" title="&lt;?php print t('Home'); ?&gt;" rel="home" id="logo"&gt;
            &lt;img src="&lt;?php print $logo; ?&gt;" alt="&lt;?php print t('Home'); ?&gt;" /&gt;
          &lt;/a&gt;
        &lt;?php endif; ?&gt;
		
		&lt;?php  

$cache-&gt;end();

	}

?&gt;

&lt;p&gt;This will not be cached&lt;/p&gt;

&lt;?php
if ( !($cache-&gt;start($id . 'block-two')) ) {
	 
    	     echo '&lt;!-- Served From Cache block two: '. date('l jS of F Y h:i:s A').' --&gt;';
	
				 ?&gt;

        &lt;div id="name-and-slogan"&gt;
          &lt;?php if (!empty($site_name)): ?&gt;
            &lt;h1 id="site-name"&gt;
              &lt;a href="&lt;?php print $front_page ?&gt;" title="&lt;?php print t('Home'); ?&gt;" rel="home"&gt;&lt;span&gt;&lt;?php print $site_name; ?&gt;&lt;/span&gt;&lt;/a&gt;
            &lt;/h1&gt;
          &lt;?php endif; ?&gt;

          &lt;?php if (!empty($site_slogan)): ?&gt;
            &lt;div id="site-slogan"&gt;&lt;?php print $site_slogan; ?&gt;&lt;/div&gt;
          &lt;?php endif; ?&gt;
        &lt;/div&gt; &lt;!-- /name-and-slogan --&gt;
      &lt;/div&gt; &lt;!-- /logo-title --&gt;

      &lt;?php if (!empty($search_box)): ?&gt;
        &lt;div id="search-box"&gt;&lt;?php print $search_box; ?&gt;&lt;/div&gt;
      &lt;?php endif; ?&gt;

      &lt;?php if (!empty($header)): ?&gt;
        &lt;div id="header-region"&gt;
          &lt;?php print $header; ?&gt;
        &lt;/div&gt;
      &lt;?php endif; ?&gt;

    &lt;/div&gt; &lt;!-- /header --&gt;
	
		&lt;?php  

$cache-&gt;end();

	}

?&gt;

&lt;p&gt;This will not be cached&lt;/p&gt;

&lt;?php
if ( !($cache-&gt;start($id . 'block-three')) ) {
	 
    	     echo '&lt;!-- Served From Cache block three: '. date('l jS of F Y h:i:s A').' --&gt;';
	
				 ?&gt;

    &lt;div id="container" class="clear-block"&gt;

      &lt;div id="navigation" class="menu &lt;?php if (!empty($primary_links)) { print "withprimary"; } if (!empty($secondary_links)) { print " withsecondary"; } ?&gt; "&gt;
        &lt;?php if (!empty($primary_links)): ?&gt;
          &lt;div id="primary" class="clear-block"&gt;
            &lt;?php print theme('links', $primary_links, array('class' =&gt; 'links primary-links')); ?&gt;
          &lt;/div&gt;
        &lt;?php endif; ?&gt;

        &lt;?php if (!empty($secondary_links)): ?&gt;
          &lt;div id="secondary" class="clear-block"&gt;
            &lt;?php print theme('links', $secondary_links, array('class' =&gt; 'links secondary-links')); ?&gt;
          &lt;/div&gt;
        &lt;?php endif; ?&gt;
      &lt;/div&gt; &lt;!-- /navigation --&gt;

      &lt;?php if (!empty($left)): ?&gt;
        &lt;div id="sidebar-left" class="column sidebar"&gt;
          &lt;?php print $left; ?&gt;
        &lt;/div&gt; &lt;!-- /sidebar-left --&gt;
      &lt;?php endif; ?&gt;

      &lt;div id="main" class="column"&gt;&lt;div id="main-squeeze"&gt;
        &lt;?php if (!empty($breadcrumb)): ?&gt;&lt;div id="breadcrumb"&gt;&lt;?php print $breadcrumb; ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;
        &lt;?php if (!empty($mission)): ?&gt;&lt;div id="mission"&gt;&lt;?php print $mission; ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;
		
			&lt;?php  

$cache-&gt;end();

	}

?&gt;

&lt;p&gt;This will not be cached&lt;/p&gt;

&lt;?php
if ( !($cache-&gt;start($id . 'block-four')) ) {
	 
    	     echo '&lt;!-- Served From Cache block four: '. date('l jS of F Y h:i:s A').' --&gt;';
	
				 ?&gt;

        &lt;div id="content"&gt;
          &lt;?php if (!empty($title)): ?&gt;&lt;h1 class="title" id="page-title"&gt;&lt;?php print $title; ?&gt;&lt;/h1&gt;&lt;?php endif; ?&gt;
          &lt;?php if (!empty($tabs)): ?&gt;&lt;div class="tabs"&gt;&lt;?php print $tabs; ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;
          &lt;?php if (!empty($messages)): print $messages; endif; ?&gt;
          &lt;?php if (!empty($help)): print $help; endif; ?&gt;
          &lt;div id="content-content" class="clear-block"&gt;
            &lt;?php print $content; ?&gt;
          &lt;/div&gt; &lt;!-- /content-content --&gt;
          &lt;?php print $feed_icons; ?&gt;
        &lt;/div&gt; &lt;!-- /content --&gt;

      &lt;/div&gt;&lt;/div&gt; &lt;!-- /main-squeeze /main --&gt;

      &lt;?php if (!empty($right)): ?&gt;
        &lt;div id="sidebar-right" class="column sidebar"&gt;
          &lt;?php print $right; ?&gt;
        &lt;/div&gt; &lt;!-- /sidebar-right --&gt;
      &lt;?php endif; ?&gt;

    &lt;/div&gt; &lt;!-- /container --&gt;

    &lt;div id="footer-wrapper"&gt;
      &lt;div id="footer"&gt;
        &lt;?php print $footer_message; ?&gt;
        &lt;?php if (!empty($footer)): print $footer; endif; ?&gt;
      &lt;/div&gt; &lt;!-- /footer --&gt;
    &lt;/div&gt; &lt;!-- /footer-wrapper --&gt;

    &lt;?php print $closure; ?&gt;

  &lt;/div&gt; &lt;!-- /page --&gt;

&lt;/body&gt;
&lt;/html&gt;
	&lt;?php  

$cache-&gt;end();

	}

?&gt;

</pre>

<p>At the top of the page the require_once is used to link to the Cache Lite PHP file that is in the module; cacheDir is the folder that needs to be manually created and where the cache files will be stored; lifeTime is the amount of seconds that the cache will be kept and caching can either be TRUE or FALSE.</p>

<p>For a full list of parameters read the manual: <a href="http://pear.php.net/manual/en/package.caching.cache-lite.cache-lite.cache-lite.php">http://pear.php.net/manual/en/package.caching.cache-lite.cache-lite.cache-lite.php</a></p>

<p>From there the first cache block is built. The $id I used was a uniquely generated number for every individual page plus the block number for every section. I also added a time stamp so that it can be determined whether the section has been cached or not. In the example above the areas not being cached are clearly labelled. </p>

<p>There is no mechanism for flushing the cache and that needs to be integrated with the administration section. The code below will do that:</p>

<pre>

&lt;?php
// $ID$
// Andy Walpole andy@suburban-glory.com January 23 2010

// Sets permissions
function cachelite_perm()
{
    return array(
        'cachelite module'
    );
    
}

// Implementation of hook_menu()
function cachelite_menu()
{
    $items = array();
    
    $items['admin/settings/cachelite'] = array(
        
        // Title of module as it appears on the &lt;title&gt; tags
        'title' =&gt; t('Cache Lite Settings'),
        
        // Appears at the top of the screen
        'description' =&gt; t('Configuration options for the Cache Lite module'),
        
        // Function that is called when the page is loaded
        'page callback' =&gt; 'cachelite_admin_form',
        
        // find more about access callback
        'access callback' =&gt; 'user_access',
        
        'access arguments' =&gt; array(
            'administer site configuration'
        )
        
    );
    
    return $items;
    
}


function cachelite_admin_form()
{
    // call the function below
    return drupal_get_form('cachelite_form');
    
}

function cachelite_form()
{
    $form = array();
    
    // This below creates a fieldset for the submit button
    $form['fieldset-one'] = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t('Flush the cache here')
    );
    
    $form['fieldset-one']['submit'] = array(
        // creates the submit button
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Submit'
        
    );
    
    return $form;
    
}


// Presents message on successful completion of email
function cachelite_form_submit($form_id, &amp;$form_state)
{
    $result = "";
    
    require_once(drupal_get_path('module', 'cachelite') . '/Cache/Lite/Output.php');
    
    $options = array(
        'cacheDir' =&gt; './sites/default/files/cache/'
    );
    $cache   = new Cache_Lite($options);
    $cache-&gt;clean();
    $result = true;
    
    
    if ($result == true) {
        drupal_set_message(t('The cache has been flushed'));
    } else {
        drupal_set_message(t('There have been problems with the cache'));
    }
    
} // end cachelite_form_submit

</pre>

<p>The code above is standard Drupal module creation code and uses hook_perm() and hook_menu() as well as the Form API. In the admin section it is now possible to flush the cache with just a quick form submission.</p>

<p>But this still leaves the problem of old pages from the cache being called despite user interaction. For instance, if you want to show a message after the user has submitted the form this will not be possible with the current set up because it will pull an old page from the cache.</p>

<p>So I added a bit more code to the module file:</p>

<pre>

function cachelite_form_alter(&amp;$form, $form_state, $form_id)
{
    $key = $form_id;
    
    // Flushes the cahce on submitting a button - clumsy
    
    $form['#submit'][] = 'cache_flush';
    
    switch ($key) {
        
        case 'uc_cart_view_form':
            $form['checkout']['#submit'][] = 'cache_flush';
            $form['update']['#submit'][]   = 'cache_flush';
            break;
            
            
    }
    
    
} // end cachelit_form_alter


// Presents message on successful completion of email
function cache_flush()
{
    $result = "";
    
    require_once(drupal_get_path('module', 'cachelite') . '/Cache/Lite/Output.php');
    
    $options = array(
        'cacheDir' =&gt; './sites/default/files/cache/'
    );
    $cache   = new Cache_Lite($options);
    $cache-&gt;clean();
    
} // end cache_flush

</pre>

<p>Whenever a user submits a form the cache is now flushed. It's a clumsy, primitive way of regenerating the cache but it is okay for now.</p>

<p>So above is an implementation of PEAR Cache Lite for Drupal.</p>

<p><em>BUT</em> testing the page rendering times with Apache benchmark it is apparent that there is hardly any gain by using Cache Lite with Drupal – at least, not the class I have used.</p>

<p>So in conclusion Cache Lite is... useless with Drupal. LOL! Oh well, it doesn't hurt to try these things out.</p>

<p>The full code including that of Cache Lite is in a module which you can <a href="http://www.suburban-glory.com/cachelite.zip">download here</a>. Be my guest if you want to persist with this experiment.</p>

<p>For more info on Cache Lite then read: <a href="http://kevin.vanzonneveld.net/techblog/article/speedup_your_website_with_cache_lite/">Speedup your website with Cache_Lite</a> and <a href="http://articles.sitepoint.com/article/caching-php-performance">Cache it! Solve PHP Performance Problems</a>.
</p>]]></description>
 <pubDate>2011-01-31T17:25:34Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">133 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A Complete Guide to CSS Colour and Background Properties]]></title>
<link>http://www.suburban-glory.com/blog?page=132</link>
<description><![CDATA[<p>The background colour and images are the basics of any website build. The first section of this article, for CSS2.1, covers the more rudimentary aspects, while the second part covers CSS3 and in particular properties for multiple images for backgrounds, background-origin, background-clip and background-size.</p>

<h3>CSS 2.1 colour and background properties</h3>

<p>Level 2.1 CSS colour and background is the nuts and bolts of any website build. If you aren't familiar with any of these then practice and practice until you are and then move on to CSS3 later.</p>

<p><strong>color</strong></p>

<p>For newcomers this can an early stumbling block because although color can refer to any foreground colour of an element it is always used for the color of text only. </p>

<p>An example being:</p>

<pre>

p {
color: #008000;
}

</pre>

<p>The above would change the text in the paragraph (stipulated by the p selector) to green. </p>

<p>There are several different ways of specifying colour in CSS and they are HEX, RGB, RGBA, HSA, HSLA and <a href="http://www.w3schools.com/css/css_colornames.asp">set CSS color names</a>.</p>

<p>This post does not concern itself with the different web colour values but the official W3C guide to colour units is here: <a href="http://www.w3.org/TR/css3-iccprof#colorunits">http://www.w3.org/TR/css3-iccprof#colorunits</a>. As with all W3C documents it is a dull read – if you know of a worthy article on this subject then post a link in the comments section.</p>

<p>Those not familiar with colour on the web should familiarise themselves with HEX and RGB (the same values but two different formats) first and then pay closer attention to the remainders listed above later.</p>

<p>Newbies please also note the American English spelling of color (compared to British standardised colour). It has to be spelled color in your stylesheet.</p>

<p><strong>background-color</strong></p>

<p>Following on from changing the colour of text here is how you change the colour of the background. An example being:</p>

<pre>

#example {
background-color : #000000;
}
</pre>

<p>This would change the background of the HTML element on the page labelled with the id of example to black. The notation is a HEX value.</p>

<p><strong>background-image</strong></p>

<p>Images are placed into a stylesheet by using the URL path, for instance:</p>

<pre>

#example {
background-image : url(images/background-portrait.jpeg);
}

</pre>

<p>This places the JPEG called “background-potrait” into the example id. </p>

<p>The path can be absolute or relative. To explain, this is an absolute path: http://www.suburban-glory.com/images/main-icon.png, while this is a relative path: /images/main-icon.png/. It means relative to the page you are currently on.</p>

<p><strong>background-position</strong></p>

<p>Once you have specified an image to be used for a background then you may need to position it. This is done on the X and Y coordinates. </p>

<pre>

#example {
background-image : url(images/background-portrait.jpeg);
background-position : right bottom;
}

</pre>

<p>This places the image in the bottom right-hand corner. A background position of “left top” would place the image in the top left-hand corner.</p>

<p>The total list of usable keywords are:</p>

<p>left top<br />
left center<br />
left bottom<br />
right top<br />
right center<br />
right bottom<br />
center top<br />
center center<br />
center bottom </p>

<p>These should be self-explanatory.</p>

<p>The values can also be specified as pixels or percentages:</p>

<pre>

#example {
background-image : url(images/background-portrait.jpeg);
background-position : 40px 50px;
}

</pre>

<p>The above places the image 40px from the left and 50px from the top.</p>

<p><strong>background-repeat</strong></p>

<p>Unless you specify otherwise any background image is automatically repeated both along its X and Y coordinates until the element is filled.</p>

<p>You can take control of that by using the background-repeat property:</p>

<pre>

#example {
background-image : url(images/background-portrait.jpeg);
background-position : right bottom;
background-repeat : no-repeat;
}

</pre>

<p>Using the same declaration block as previous we have now made sure that the image appears only once.</p>

<p>Simple, yes? Changing the value of “no-repeat” to “repeat-x” or “repeat-y” means that the image can be repeated along either the x or y axis respectively.</p>

<p><strong>background-attachment</strong></p>

<p>Out of all of the above this is probably the least used but can provide an impressively stylistic touch. All background images scroll with the content, but be declaring a fixed background attachment the image remains static no matter the scrolling.</p>

<pre>

body (
background-image : url(images/background-portrait.jpeg);
background-repeat : no-repeat;
background-attachment:fixed; 
}

</pre>

<p>The above will fix an image to the body of an html page. Note that background-attachment does not work in Internet Explorer 6.</p>

<p>As a live example see <a href="http://www.salon-one.suburban-glory.com/">this website I created here</a> – the fixed background is on #wrapper.</p>

<p>It is worth noting that all of the above five properties can be shortened onto one line; however, this isn't an article about CSS shorthand and for that I would recommend Dustin Diaz's feature <a href="http://www.dustindiaz.com/css-shorthand/">CSS Shorthand Guide</a> or Shane Jeffers item <a href="http://www.threestyles.com/tutorials/css-shorthand-guide/">CSS Shorthand – A Guide to Cleaner and Faster Coding</a>.</p>

<h4>CSS3 colour and background properties</h4>

<p>These are now regarded as advanced features of CSS, but very soon – when all the browsers catch up with CSS3 specifications – they will be regarded as basic to a designer as 2.1 is now.</p>

<p><strong>background (multiple images)</strong></p>

<p>With CSS2.1 it is only possible to add one background image for every element, but with CSS3 it is now possible to add as many images as you desire. </p>

<p>The only way this could be done before was to add extra HTML markup but now it is possible to do this as so:</p>

<pre>

#example {
background : url(images/picture-one.jpg), url(images/picture-two.jpg), url(images/picture-three.jpg);
}

</pre>

<p>Just list the images and separate them with a comma.</p>

<p>I cannot begin to tell you just what a bonus this is when it comes to web design. It really does open up new aesthetic doors to explore. </p>

<p>The bad news? It doesn't work in the legacy browsers, namely Internet Exploer 6, 7 and 8. The good news? Use <a href="http://css3pie.com/">CSS3 Pie</a> for a solution to this problem. I bless thee CSS3 Pie developer, <a href="http://twitter.com/lojjic">Jason Johnston</a>.</p>

<p><strong>background-size</strong></p>

<p>This, as the name suggests, changes the background image size; and, like much of CSS3, lacks IE support (apart from version 9).</p>

<p>However, this CSS3 property has been receiving a lot of attention and is being widely adopted despite of the usual IE issues.</p>

<p>Although Webkit (Safari and Chrome) have supported this property for sometime; Firefox 3.6, launched in January 2010, added it to their browser through the usual Mozilla prefix.</p>

<p>There are two basic values that can be used: cover and contain.</p>

<p>They are written like so:</p>

<pre>

#example {
background : url(images/picture-one.jpg);
-moz-background-size : cover;
background-size : cover;
}

</pre>

<p>(-moz-background-size is required for versions of Firefox less than 4). </p>

<p>This stretches the image to cover the entire container, in this case the example id.</p>

<p>To stretch the image but keep it's proportions then use contain instead:</p>

<pre>

#example {
background : url(images/picture-one.jpg);
-moz-background-size : contain;
background-size : contain;
}

</pre>

<p>But the fun doesn't stop there. It is also possible to specify percentages and pixels.</p>

<p>This would change the dimensions of the image to 75% of the size of the container (not shrinking to 75% of the original size!)</p>

<pre>

#example {
background : url(images/picture-one.jpg);
-moz-background-size : 75%;
background-size : 75%;
} 

</pre>

<p>It is also possible to use pixels:</p>

<pre>

#example {
background : url(images/picture-one.jpg);
-moz-background-size : 75px;
background-size : 75px;
} 

</pre>

<p>The above changes the size of image to 75px square.</p>

<p>This property also allows the coder to change the proportions on its X and Y axis, so “background-size: 75px 100px” would create a rectangle shape.</p>

<p>An example of background-size in action is <a href="http://www.carpentry-one.suburban-glory.com/">this website here</a>.</p>

<p>If you look at the central wrapper area (in non-IE browsers) then that is actually a 12 pixel square cut from the image in the left hand corner. I gave it a slight opacity and then used the background-size cover value to stretch it across the entire div.</p>

<p>For further reading take a look at A List Apart's seminal article <a href="http://www.alistapart.com/articles/supersize-that-background-please/">Supersize that Background, Please!</a></p>

<p><strong>background-origin / background-clip</strong></p>

<p>I've grouped these two properties together as the same keyword values are used for them both.</p>

<p>To recap, we have learned how to add an image, position it, repeat it (or not) and even stretch it in various way. Background-origin / background-clip is concerned with how the background image relates to the padding and border of the container it is within.</p>

<p>As way of a visual representation I'm going to nick the diagram from <a href="http://www.css3.info/preview/background-origin-and-background-clip/">the CSS3.info page</a>:</p>

<p><img src="http://www.suburban-glory.com/images/background-origin-and-clip.gif" width="453" height="300" alt="background origin and clips" /></p>

<p>Compared to background-size, these are only capable of relatively minor design changes.</p>

<p>If you wish to check cross-browser issues with CSS backgrounds then take a look at the table on <a href="http://www.quirksmode.org/css/background.html">Quirksmode</a>.</p>]]></description>
 <pubDate>2011-01-26T07:27:11Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">132 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A Complete Guide to CSS Combinators]]></title>
<link>http://www.suburban-glory.com/blog?page=131</link>
<description><![CDATA[<p>Ever since the 1990s there has been a concerted attempt in web design to use CSS as a means to separate presentation from content.</p>

<p>Often it was the case that web designers were adding extra classes or ids to page elements just so that they could use CSS to alter their design; but with CSS 2, and especially in the ongoing version 3, the push has been towards minimising HTML markup.</p>

<p>CSS combinators assist in this quest but it isn't just about following <a href="http://en.wikipedia.org/wiki/Separation_of_presentation_and_content">theoretical aesthetics</a>, but also about making you a faster, more efficient web designer.</p>

<p>They may be slightly confusing at first, but practice makes perfect so try to incorporate them into your designs wherever possible.</p>

<p>Like much of the other CSS I have been highlighting in this series of guides, they aren't used as widely as they should be. As <a href="http://www.smashingmagazine.com/2010/06/10/50-new-useful-css-techniques-tools-and-tutorials/">Vitaly Friedman of Smashing Magazine wrote</a>:</p>

<blockquote><p>Combinators are an overlooked part of CSS development. Most juniors don’t even know they are making use of them, others are unaware of their full potential and let’s face it, even most professionals don’t really know about the ins and outs of css combinators.</p></blockquote>

<p>It's worth noting that there is total support for these CSS properties from Internet Explorer version 7 onwards and partial support in IE6.</p>

<h3>CSS 2.1 Combinators</h3>

<p><strong>E + F / Adjacent Sibling</strong></p>

<p>Before explaining the finer points of this CSS code lets present a problem first and then bring the adjacent sibling property in as the solution.</p>

<p>Example: You want to style the first paragraph under each heading and the first paragraph only. Lets say you want to change the first letter in the paragraph.</p>

<p>You could just add an extra class to this paragraph, but has been stated before the aim is to minimise HTML markup.</p>

<p>Here comes the adjacent sibling combinator to the rescue:</p>

<pre>

#content h1 + p:first-letter{
font-size : 2em;
color : red;
font-style : italic;
}

</pre>

<p>And this is how it would look:</p>

<p><img src="http://www.suburban-glory.com/images/css-combinators.jpg" width="540" height="298" alt="CSS cobminators" /></p>

<p>Without the + sign then no design changes would be made as p is not a straight descendent of h1.</p>

<p>More practical examples of uses for the adjacent sibling can be found here: <a href="http://css-tricks.com/fine-use-for-the-adjacent-sibling-selector/">Fine Use for the Adjacent Sibling (“+”) Selector</a>, <a href="http://meyerweb.com/eric/articles/webrev/200007a.html">The Adjacent-Sibling Selector</a> and <a href="http://acquia.com/blog/between-lines-adjacent-sibling-selector-technique">In Between the Lines: The adjacent sibling selector technique</a>.</p>

<p><strong>E &gt; F / Child</strong></p>

<p>The child selector is probably the most complicated of all four to understand. It involves having to climb up and down the DOM tree and probably even falling off now and again as you become lost!</p>

<p>Lets take a look at inheritance. Whenever you place HTML onto a page it is always the child of another page element.</p>

<p>Take a look at this simple makup.</p>

<pre>

&lt;body&gt;

&lt;div id=”wrapper”&gt;
&lt;/div&gt;

&lt;/body&gt;

</pre>

<p>The wrapper is a <em>child</em> of the body. The HTML order starts from the body (as on every HTML page) and in this example then moves on to the #wrapper.</p>

<p>With a line of text added:</p>


<pre>

&lt;body&gt;

&lt;div id=”wrapper”&gt;
&lt;p&gt;This is a line of text&lt;/p&gt;
&lt;/div&gt;

&lt;/body&gt;

</pre>

<p>The paragraph is a <em>child</em> of the wrapper while the wrapper is a <em>child</em> of the body but a <em>parent</em> to the paragraph. </p>

<p>Take note of the terminology <em>parent</em> and <em>child</em>. They are used a lot in JavaScript libraries like jQuery as well as in CSS.</p>

<p>However, the paragraph is not a child of the body, it is a <em>descendent</em>.</p>

<p>The daughter is the child of the mother, but if the daughter then has a baby of her own then that baby is a descendent or the original mother, not her child.</p>

<p>Here is an example of child selectors in action:</p>

<pre>

&lt;div id="example"&gt;
 &lt;ul&gt;
  &lt;li&gt;List item 1&lt;/li&gt;
 &lt;/ul&gt;
 &lt;div&gt;
  &lt;ul&gt;
   &lt;li&gt;List item nested
    &lt;ul&gt;
     &lt;li&gt;Nested list item&lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;

#example &gt; ul &gt; li {
font-weight : bold
}

</pre>

<p>The only way of changing “list item 1” without adding a class is to use the child selector.</p>

<p>Confused? Well I never promised it would be easy. It is logical but it's an issue that needs explaining from different angles. Read CSS don Eric Meyer's article from 2000, <a href="http://meyerweb.com/eric/articles/webrev/200006b.html">The Child Selector</a>, for a different guide.</p>

<p>To sum up: child selectors allow pin point precision of elements on a page while at the same time minimising markup, although if you have clean, semantic HTML you should only need to use child selectors infrequently.</p>

<p>Perhaps if you regularly use child selectors you may like to post up an example and an explanation of why you feel it is the best solution for that particular purpose.</p>

<p><strong>E F / Descendant</strong></p>

<p>From the hard to the easy. This is actually from CSS1 released in 1996.</p>

<p>Lets take a look at some code:</p>

<pre>

&lt;body&gt;

&lt;div id=”wrapper”&gt;

&lt;div id=”content”&gt;
&lt;p&gt;This is a line of text in the wrapper&lt;/p&gt;
&lt;/div&gt;

&lt;div id=”footer”&gt;
&lt;p&gt;This is a line of text in the wrapper&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;

</pre>

<p>In order to highlight the text content div then you would write:</p>

<pre>

#content p {
font-style: bold;
}

</pre>

<p>P is a descendent of #wrapper.</p>

<p>This would highlight the text in the content div too:</p>

<pre>

#wrapper p{
font-style : bold;
}

</pre>

<p>But also in the #footer as p is a descendent of #wrapper, #content and #footer.</p>

<p>As a rule, in webdesign you keep your list of descendent selectors as short as possible. It makes it easier to edit later on but it is also more efficient for browser speed; read the Mozilla article <a href="https://developer.mozilla.org/en/Writing_Efficient_CSS">Writing Efficient CSS for use in the Mozilla UI</a>. Also don't forget to separate the selectors with white space.</p>

<p>If you are having trouble understanding the concepts discussed here then read the Sitepoint articles called <a href="http://reference.sitepoint.com/css/inheritance">Inheritance</a> and <a href="http://reference.sitepoint.com/css/csslayout">CSS Layout and Formatting</a>.</p>

<h4>CSS3 Combinators</h4>

<p><strong>E ~ F / General Sibling</strong></p>

<p>If you understand adjacent siblings (E + F) then you'll have no problem comprehending this.</p>

<p>See the following code:</p>

<pre>

h2 ~ p {
color : #ffffff;
}

</pre>

<p>This changes the colour of <em>every</em> sibling paragraph under the h2 header.</p>

<p>Again, to understand this CSS correctly you need to have an appreciation of inheritance and the DOM tree which is why I have linked out several times in this post.</p>

<p>It's not just efficient CSS though that requires a working knowledge of these types of CSS properties but also JavaScript libraries such as Dojo and jQuery that use <a href="http://sizzlejs.com/">Sizzle</a>. Learning CSS combinators will also help you become a better equipped JavaScript user too – bonus!
</p>]]></description>
 <pubDate>2011-01-19T10:54:29Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">131 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A Complete Guide to CSS Functions - Part One]]></title>
<link>http://www.suburban-glory.com/blog?page=130</link>
<description><![CDATA[<p>Yes, you read that correctly – functions. Commonly associated with programming languages, they are also a feature of CSS. Apart from url(), they were rarely used in CSS2; but they are being widely deployed in CSS3.</p>

<p>CSS functions are values used in conjunction with certain types of properties, as will be explained.</p>

<h3>CSS 2.1 functions</h3>

<p><strong>url()</strong></p>

<p>The url() is used with either the background, list-style-image or border-image properties. They enable the CSS coder to bring an image into the page for either list or background purposes. You may well have been using this without referring to it as a function.</p>

<p>An example:</p>

<pre>
#wrapper {
background : url(images/photo-one.jpg);
}
</pre>

<p>The path in url() can be either absolute or relative and is case sensitive.</p>

<p><strong>Counter()</strong></p>

<p>As you are aware it is possible to have two different sort of HTML lists: ordered (ol) and unordered (ul).</p>

<p>For instance, the following CSS code will produce an ordered numbered list:</p>

<pre>
&lt;ol&gt;
    &lt;li&gt;List item one&lt;/li&gt;
    &lt;li&gt;List item two&lt;/li&gt;
    &lt;li&gt;List item three&lt;/li&gt;
&lt;/ol&gt;
</pre>

<p>However, it may be desirable to create a numbered list on block or inline level elements such as headers or paragraphs.</p>

<p>This has particular relevance to academically presented work which requires a very tight structure but one that is easy to navigate and read.</p>

<p>Of course, it is possible to just manually add numbers to the text in the HTML, but this method allows the web designer to add numbers dynamically.</p>

<p>In order to use the counter function you must use the following three properties: counter-reset, counter-increment and content.</p>

<p>Here is the code for number number every single paragraph on a page:</p>

<pre>
body {
	counter-reset: paras 0;
}
</pre>

<p></p>

<pre>
p:before {
	counter-increment: paras 1;
	content: "New Paragraph: " counter(paras, decimal) ": ";
}
</pre>

<p>To explain the above code, counter-reset always comes first. It is given a name, in this case paras with the subsequent number stipulating that the first occurrence is the number one.</p>

<p>Counter-increment calls the previously named counter-reset and again declares a starting number.</p>

<p>Lastly, in the content property is placed the counter() function. The first variable is the name of the counter-reset being called, the second is the numbering system and which corresponds exactly with the <a href="http://www.w3schools.com/css/pr_list-style-type.asp">options for list-style-type</a>.</p>

<p>Surely though there can't be an easier CSS syntax for an incremental increase? This feature is common in all programming and development languages with its use in PHP being merely the addition of two plus signs to a variable: $variable++</p>

<p>There are two detailed articles on the counter() function published on the web. Louis Lazaris has written a very comprehensive blog post, <a href="http://www.impressivewebs.com/css-counter-increment/">CSS Counters: counter-increment and Friends</a>, while David Storey at Opera has written <a href="http://dev.opera.com/articles/view/automatic-numbering-with-css-counters/">Automatic numbering with CSS Counters</a>.</p>

<p><strong>attr()</strong></p>

<p>There is a commonly used jQuery function called attr(), and, like its jQuery namesake, the CSS function refers to a HTML attribute.</p>

<p>Take a look at the code for this link:</p>

<pre>
&lt;a href="www.suburban-glory.com" title="This is the title attribute for this link"&gt; Nullam varius convallis accumsan&lt;/a&gt;. 
</pre>

<p>The above has two attributes, the href and the title.</p>

<p>If you are unsure what a HTML attribute is then read the W3Schools guide: <a href="http://www.w3schools.com/html/html_attributes.asp">http://www.w3schools.com/html/html_attributes.asp</a></p>

<p>Attr() in CSS is a means of content generation and can only be used with the content property in conjunction with the :before and :after pseudo-elements. (Functions,  pseudo-elements and the content property – ouch, who said CSS was easy?!)</p>

<p>As the fundamental idea of CSS was to separate presentation and content it may seem a little strange that there is some deliberate muddling between the two, but attr() does have a few useful purposes.</p>

<p>Used with the print media declaration, like below, it allows the full URL to be revealed when a page is printed.</p>

<pre>
@media print{
       a:after{content:" (" attr(href) ") "}
}
</pre>

<p>This would create the following:</p>

<p><img src="http://www.suburban-glory.com/images/functions-image-one.jpg" width="544" height="148" alt="example of using the att() function" /></p>

<p>As the above testifies this is useful CSS code as it allows your visitor to take note of full link details when they print off a page (rather than just “click here”).</p>

<p>In the same fashion, they can also be used with HTML accessibility aids such as abbr and  acronyms. W3C accessibility guidelines recommend the use of these HTML tags when using abbreviations or  acronyms in the text. As an example, UN is an abbreviation of United Nations while an acronym, although being similar, can also be used for informal purposes – ASAP is an acronym of as soon as possible.</p>

<p>Take a look at the following use of abbr:</p>

<pre>
 &lt;p&gt;The &lt;abbr title="World Health Organization"&gt;WHO&lt;/abbr&gt; was founded in 1948.&lt;/p&gt;
</pre>

<p>On the screen the title is not immediately visible – it is there as an aid for screen readers. </p>

<p>By using the print media query it is possible to print out the full title and not just the abbreviation:</p>

<pre>
@media print{
       abbr:after{
content:" (" attr(title) ") ";
}
</pre>

<p>Note the concatenation in the string to allow the addition of brackets.</p>

<p>One other possible use is by allowing the URL to be revealed when the hovering over the link.</p>

<pre>
a:hover:after{
content:" Page: (" attr(href) ") ";
}
</pre>

<p>Hover over any link in this blog post as a demonstration.</p>

<p>As with most advanced CSS, Internet Explorer support below version 9 is poor or non-existent so don't expect your adventures in attr() to shine in these legacy browsers.</p>

<p>It is planned that the use of the attr() function will be dramatically expanded in CSS3 by allowing it to be used with other properties other than content.</p>

<h4>CSS 3 functions</h4>

<p><strong>calc()</strong></p>

<p>Get ready to throw out your calculators because soon CSS will enable you to add maths sums to your stylesheets, but it's more than a simple 1+1 feature as will be explained.</p>

<p>The Webkit developers have been working on implementing calc() in their engine since 2007 but at the time of writing there are still no plans to incorporate it into a release. I have no knowledge of programming in C but I imagine it must be quite a nightmare to create due to its complexity.</p>

<p>calc() is present in IE9 beta but there isn't a full implementation as stipulated by the W3C.  Unfortunately they haven't added a browser-specific prefix that other browsers do as a matter of routine for experimental CSS. calc() on Firefox can be accessed with -moz-calc() from version 4 onwards. </p>

<p>calc() is particularly useful when it comes to fluid layouts and which are currently undergoing a revival due to design for mobile, and as Internet Explorer is an irrelevancy on the mobile platform designers will soon be free to use this CSS function without worrying about degradation for the legacy browsers.</p>

<p>Here is typical CSS code for a fixed width HTML form layout</p>

<pre>
form {
font-size : 1.4em;
border : 1px solid #000;
padding : 5px;
width : 465px;
}
legend {
display : block;
padding-bottom : 9px;
}
label {
width : 200px;
float : left;
display : block;
margin-bottom : 9px;
}
input {
width : 200px;
float : left;
display : block;
margin-bottom : 9px;
}
textarea {
margin-bottom : 9px;
width : 455px;
}
input[type="submit"] {
width : auto;
clear : both;
}
</pre>

<p>Using calc() as below is how a form could be coded for a fluid layout:</p>

<pre>
form {
font-size : 1.4em;
border : 1px solid #000;
padding : 5px;
margin : 0 10px;
width: -moz-calc(50% - 20px);
}
legend {
display : block;
padding-bottom : 9px;
}
label {
width : -moz-calc(50% - 10px);
margin-right : 10px;
float : left;
display : block;
margin-bottom : 9px;
}
input {
width : -moz-calc(50% - 10px);
float : left;
display : block;
margin-bottom : 9px;
}
textarea {
margin-bottom : 9px;
width : -moz-calc(100% - 10px);
}
input[type="submit"] {
width : auto;
clear : both;
}
</pre>

<p>Note the addition of the padding and margin measurements in the functions. Potentially, relative or absolute units such as centimeters, pixels or percentages will be able to used, while -moz-calc() allows for standard mathematical operators +, -, * and /.</p>

<p>Admittedly, the use of CSS3 box-sizing in the above example could also achieve the same results but it only uses calc() at its most basic level. </p>

<p>I can guarantee that you will see a multitude of articles written about this function in the coming years. It will be particularly useful when a number of new CSS3 units such as viewport height and width come into play, and when the use of the attr() function is expanded upon.</p>

<p><a href="http://lists.w3.org/Archives/Public/www-style/2010Sep/0356.html">François Remy on the W3C mailing list</a> gives some examples of the likely possible uses of calc() once CSS3 matures:</p>

<p>Calculating the width of a 'progress' element dynamically:</p>

<pre>
#example {
width: calc(100% * (attr(value) - attr(min)) / (attr(max) – attr(min))
}
</pre>

<p>Ensuring a fixed element will be visible:</p>

<pre>
#example {
position: fixed;
height: 25px; width: 300px;
top: calc(min(500px, 1vh-25px));
left: calc(min(30px, 1wh-300px));
}
</pre>

<p>The downside of calc() is that while making the job of the web designers easier it will also make the syntax more complicated. It will be an absolute necessity to create well-commented style sheets so as to make your co-workers life easier as the origins of measurements will not necessarily be obvious.</p>

<p>As long as Pesto (Opera) and Webkit (Chrome and Safari) quickly catch up with Gecko (Firefox) I can see the calc() function being widely used for mobile design by the end of 2011. It could be used for desktop design as well as it is easy to create a fallback for Internet Explorer without using conditional comments.</p>

<p>Keep an eye out on how quickly the main browsers are implementing CSS3 by regularly checking the <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29">Comparison of layout engines page</a> on Wikipedia.</p>

<p><strong>max() and min()</strong></p>

<p>Lastly, these functions are part of the CSS3 Values and Units module draft dated August 27, 2010 but it's not clear, at the time of writing, whether they will be incorporated into Firefox 4 or any other browser.</p>

<p><strong>Part Two</strong></p>

<p>Part two of this guide will cover the functions for 2-D and 3-D transforms.</p>

]]></description>
 <pubDate>2011-01-12T11:25:18Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">130 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Jquery plugin Little Colour Boxes is launched]]></title>
<link>http://www.suburban-glory.com/blog?page=129</link>
<description><![CDATA[<p>Suburban Glory Web Design is proud to announce the release of jQuery plugin Little Colour Boxes and our first contribution to one of the web's must dynamic and worthy Open Source projects.</p>

<p>The plugin creates a gentle but aesthetically sharp animation over an image of your choice (but not background image) that plays for a few seconds every time the page is loaded.</p>

<p>A download link is at the bottom of this article.</p>

<p>For an example of the animation see this page here: <a href="http://www.little-colour-boxes.suburban-glory.com/">http://www.little-colour-boxes.suburban-glory.com/</a></p>

<p>Another example is here: <a href="http://www.cleaner-one.suburban-glory.com/">http://www.cleaner-one.suburban-glory.com/</a></p>

<p>It is easy to set up.</p>

<p>Firstly link to the file in the header as you would any other script:</p>

<pre>
&lt;script src="pathhere/jquery-littlecolourboxes.js"&gt;&lt;/script&gt;
</pre>

<p>Then give the image you want to animate an ID of “image-boxes” like so:</p>

<pre>
&lt;img src="images/nice_pattern_islamic.gif" width="425" height="425" id="image-boxes"&gt;
</pre>

<p>And in the header call the function as you usually do with jQuery and add the colour of your choice:</p>

<pre>
&lt;script&gt;
$("image-boxes").colboxes("#fff");
&lt;/script&gt;
</pre>

<p>At the moment the script is divided into 7x7 boxes. The next release will allow control of the number of boxes via a function parameter.</p>

<p>The animation does not work in Internet Explorer 6.</p>

<p>It is released under the GNU General Public License (GPL) Version 2.</p>

<p>We'll set up jQuery page and a an appropriate control system in the next couple of days, but for now you can download it from <a href="http://www.suburban-glory.com/little-colour-boxes-jquery-plugin.rar">here</a>.</p>

]]></description>
 <pubDate>2010-11-28T19:40:34Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">129 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Best of the web round-up – Autumn 2010]]></title>
<link>http://www.suburban-glory.com/blog?page=128</link>
<description><![CDATA[<p>The 2000 mile per hour technology drop we all seem to be living in shows not sign of abating. As the European economies stagger from bad to worse we might all be going to hell on a handcart, but at least we'll be able to drown out the screams of our fellow human beings by listening to iTunes on our iPods.</p>

<p>And when it comes to technology the web is at the centre of much of the latest innovation with the mobile platform being the next great horizon closely followed by internet access via our TV's.</p>

<p>These are all items that have arrived in my Google Reader inbox (subscribed to 70 plus blogs and  counting) and which I have marked as worthy of referring to at some later unspecified date; either for personal reasons, or as something worth passing on to a client.</p>

<p>If your thing is CSS3, HTML5, JavaScript, PHP and internet marketing then there'll be something here for you.</p>

<p>This is my first post since July and I have, dear reader, decided to set aside one day per week to enable me to write some quality posts, in particular I want to finish my complete guides to CSS.</p>

<p>So, here we go...</p>

<p><a href="http://www.kaushik.net/avinash/2010/11/beginners-guide-web-data-analysis-ten-steps-tips-best-practices.html" class="hightlight">Beginner's Guide To Web Data Analysis: Ten Steps To Love &amp; Success</a></p>

<p>This is one for the statisticians amongst us but if you want to become serious about SEO then you'll need to be able to take apart the mountain of analytical data that even a modest website can accumulate. Avinash Kaushik gives us ten tips on how to do that in this lengthy article.</p>

<p><a href="http://blogs.sitepoint.com/2010/11/19/mysql-mistakes-php-developers/" class="highlight">Top 10 MySQL Mistakes Made By PHP Developers</a></p>

<p>
The title of this Sitepoint article is self-explanatory but it's a worthy read for all PHP munchers out there.</p>

<p>
<a href="http://www.phpclasses.org/blog/post/135-Accelerate-Web-Pages-Automatically-using-Google-ModPageSpeed-Unusual-Site-Speedup-Techniques-Part-4.html" class="highlight">Accelerate Web Pages Automatically using Google Mod_PageSpeed: Unusual Site Speedup Techniques Part 4 - PHP Classes blog</a></p>

<p>Google are on a Mission To Speed Up The World Wide Web and they have just released a module for Apache servers to assist us.</p>

<p>Manuel Lemos explains the features of mod_pagespeed stating “Mod_PageSpeed is definitely an awesome idea. I would say that it is kind of magic. It is like having an expert on Web page optimization working for you for free.”</p>

<p><a href="http://blumenthals.com/blog/2010/11/17/google-places-updates-quality-guidelines/" class="highlight">Google Places Updates Quality Guidelines</a></p>

<p>I saved this one so as to forward the link on to my clients. If you use Google Places for you business website than you MUST read this article as it provides valuable advice about to avoid being rejected or penalised.</p>

<p><a href="http://dailyseotip.com/all-you-need-to-know-about-link-building-in-60-seconds/1181/" class="highlight">All You Need To Know About Link Building (in 60 seconds)</a></p>

<p>This is another one I saved so as to use with clients: “There's this link building thing blah blah blah I tell you what read Zeke Camusio's article as that summarises the important points”.</p>

<p><a href="http://www.1stwebdesigner.com/inspiration/creative-single-page-websites/" class="highlight">50 Insanely Creative Examples of Single Page Websites</a></p>

<p>One-page websites look set to continue with their popularity and here 1stwebdesigner.com present a number of examples from this particular style stable.</p>

<p><a href="http://trevordavis.net/blog/jquery-one-page-navigation-plugin/" class="highlight">jQuery One Page Navigation Plugin</a>
</p>

<p>And here's a jQuery plugin to help you with your one-page thang.</p>

<p><a href="http://www.lullabot.com/articles/drupal-exposed" class="highlight">Drupal: Exposed: Peeking behind the curtain at what makes Drupal tick</a>/p&gt;

</p><p>One for all the Drupal coding kids from Lullabot's Angie Byron</p>

<p><a href="http://www.chapterthree.com/blog/nica_lorber/how_run_creative_design_process_big_project" class="highlight">How To Run A Creative Design Process For A Big Project</a></p>

<p>Nica Lorber gives a fantastically insightful run-down of the Three Chapters design and development methodology. Kudos goes to Nica for this and for giving document examples at the end.</p>

<p><a href="http://thinkvitamin.com/code/php-password-hashing/" class="highlight">PHP: Password Hashing [Video Tutorial]</a></p>

<p>A short, easy to follow vid on PHP password hashing from Think Vitamin</p>

<p><a href="http://techportal.ibuildings.com/2010/10/07/understanding-apc/" class="highlight">Understanding APC</a></p>

<p>I bookmarked this one as a greater understanding of server technology is on My Things To Do In 2011 list.</p>

<p><a href="http://blog.kissmetrics.com/color-psychology/" class="highlight">How do colors affect purchases?</a></p>

<p>I love this item – check out the diagram.</p>

<p><a href="http://davidwalsh.name/dojo-widget" class="highlight">Creating Dojo Widgets Programmatically or Declaratively</a></p>

<p>JavaScript extraordinaire David Walsh kindly gives to us another Dojo tutorial.</p>

<p><a href="http://blog.rebeccamurphey.com/scaffolding-a-buildable-dojo-application" class="highlight">Scaffolding a Buildable Dojo Application</a></p>

<p>Rebecca Murphy gives a detailed guide on how best to use the the Dojo framework without all the unnecessary code that comes with the CDN version. This is one for only the most serious Dojo heads.</p>

<p><a href="http://www.1stwebdesigner.com/resources/fonts-big-headlines/" class="highlight">40 Awesome Free Fonts for Big Headlines</a></p>

<p>Lots of font inspiration here</p>

<p><a href="http://www.1stwebdesigner.com/development/useful-css-snippets/" class="highlight">25 Incredibly Useful CSS Snippets for Developers</a></p>

<p>I bet even the most seasoned CSS coders will find a new snippet or two here.</p>

<p><a href="http://www.alistapart.com/articles/kick-ass-kickoff-meetings/" class="highlight">Kick Ass Kickoff Meetings</a></p>

<p>A List Apart does it again (and again and again and again). Kevin M. Hoffman details how to get the most out of those initial planning meetings with clients.</p>

<p><a href="http://blogs.sitepoint.com/2010/08/03/how-to-redirect-old-urls-php/" class="highlight">How to Avoid 404s and Redirect Old URLs in PHP</a></p>

<p>This Sitepoint article by Craig Buckler does what it says on the tin</p>

<p><a href="http://webaim.org/blog/javascript-as-an-accessibility-concern/" class="highlight">Javascript as an accessibility concern</a>
</p>

<p>Debunks the myth that graceful degradation is essential for accessibility.</p>

]]></description>
 <pubDate>2010-11-23T12:50:03Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">128 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A complete guide to CSS pseudo-elements]]></title>
<link>http://www.suburban-glory.com/blog?page=127</link>
<description><![CDATA[<p>Pseudo-elements are fantastically useful as they allow greater control of elements and selectors without extra HTML mark-up.</p>

<p>As with much advanced CSS, pseudo-element take up has been slow amongst web designers because of poor support in Internet Explorer.</p>

<p>However, as IE6 is rapidly becoming extinct that only leaves IE7 to consign to the dustbin of history.</p>

<h3>CSS 2.1 pseudo-elements</h3>

<p>There are only two pseudo-elements that are understood by all popular browsers including IE from version 5 upwards, and they are :first-letter and :first-line. </p>

<p>Their purpose should be quite obvious but below are two examples of how they work.</p>

<pre>
p:first-letter {
font-size : 150%;
}
</pre>

<pre>
p:first-line {
font-size : 150%;
}
</pre>

<p>The first code block increases the size of the first letter in the paragraph by 150% while the second increases the first line of the paragraph by 150%. It's definitely worth trying out :first-letter as that can add a nice typographic touch to your design.</p>

<p>The final two CSS 2.1 pseudo-elements are :after and :before.</p>

<p>A vital part of these two is also the :content declaration.</p>

<p>As an example:</p>

<pre>
p:before {
content : " Text added to the beginning of the paragraph";
}
</pre>

<pre>
p:after {
content : " Text added to the end of the paragraph";
}
</pre>

<p>This can actually add text to a document without using HTML! But you don't have to use it to add text, try adding images with a line such as content: url(“image.gif”).</p>

<p>As with any CSS it really is a good to roll your sleeves up and experiment with it. Use the code above and play around with images, margins and padding – why not add an image of quotation marks on either side of a blockquote?</p>

<p>You'll be surprised just how great it can look in action. They work in every browser apart from Internet Explorer 6 and 7.</p>

<h4>CSS 3.0 pseudo-elements</h4>

<p>It was decided by the W3C that as of 3.0 pseudo-elements should use the double colon instead of a single one. This is so they can be clearly distinguished from pseudo-classes. </p>

<p>So the difference is:</p>

<table border="1"><tr><th>CSS 2.1</th>
<th>CSS 3.0</th>
</tr><tr><td>:after</td>
<td>::after</td>
</tr><tr><td>:before</td>
<td>::before</td>
</tr><tr><td>:first-letter</td>
<td>::first-letter</td>
</tr><tr><td>:first-line</td>
<td>::first-line</td>
</tr></table><p> 
				
We all should be using the double colon declaration by now but the problem with this is – yes, you guessed it – Internet Explorer, where support for the double colon version is buggy. So stick with CSS 2.1.</p>

<p>However, CSS 3.0 has brought us five new pseudo-elements:</p>

<p><strong>
::selection
::value
::choices
::repeat-item
::repeat-index
</strong></p>

<p>Lets examine them all.</p>

<p><strong>
::selection
</strong></p>

<p>When you drag your cursor across the page in order to then right click and copy, the browser uses its inbuilt style sheet to change the background colour and the colour of the text. This is always a dark background and a light text colour. ::selection allows you to change this, as below:</p>

<pre>
::-moz-selection{
  background-color: red;
  color: yellow;
}
</pre>


<pre>
::selection {
 background-color: red;
  color: yellow;
}
</pre>

<p>If you use the CSS above then when the user drags their mouse over some text there will be a red background and yellow text in Opera, Safari, Chome and Firefox (but only with the moz prefix)</p>

<p>Is it also possible when using this pseudo-element to change the cursor and outline.</p>

<p><strong>::value / ::choices / ::repeat-item / ::repeat-index</strong></p>

<p>These four are all directly connected to XForms. What are they?! I hear you cry. Xforms are a never-ending W3C project that is supposed to be “an XML application that represents the next generation of forms for the Web”.</p>

<p>There was once going to be an XForms module for XHMTL 2.0 but that version of XTHML has now been retired. </p>

<p>Nevertheless, in October 2009 XForms 1.1 became an official W3C Recommendation so there's still some life in it. For further details read the <a href="http://en.wikipedia.org/wiki/XForms">XForms Wikipedia entry</a>.</p>]]></description>
 <pubDate>2010-07-19T16:49:17Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">127 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Best of the Web for May and June 2010]]></title>
<link>http://www.suburban-glory.com/blog?page=126</link>
<description><![CDATA[<p>Hay ho pop pickers this is the best web design and development blog posts from the last couple of months.</p>

<p>As usual, there is a mixture of CSS, HTML5, JavaScript, PHP and SEO. </p>

<p>I hope you find some inspiration here as there are some fantastic articles which any web creative can learn from.</p>

<p><a href="http://www.seomoz.org/blog/patience-is-an-seo-virtue">Patience is an SEO Virtue</a></p>

<p>This is one to show your client when their expectations are one of an immediate return.</p>

<p><a href="http://davidwalsh.name/dojo-connect">dojo.connect: A Powerful Object and Event Listener</a> &amp; <a href="http://davidwalsh.name/dojo-quotes">Better Pull Quotes with the Dojo Toolkit</a></p>

<p>David Walsh continues on his Dojo quest. I do mean to write a guide to using the Dojo JavaScript framework – perhaps in the Autumn.</p>

<p><a href="http://2bits.com/drupal-planet/reducing-server-resource-utilization-busy-sites-implementing-fast-404s-drupal.html">Reducing server resource utilization for busy sites by implementing fast 404s in Drupal</a></p>

<p>This is a useful tips for fine tuning a busy Drupal site</p>

<p><a href="http://www.impressivewebs.com/css-white-space/">The CSS white-space Property Explained</a></p>

<p>Louis Lazaris does a useful job at explaining this little used and little understood feature of CSS</p>

<p><a href="http://www.1stwebdesigner.com/resources/the-ultimate-roundup-of-indispensable-and-helpful-html5-tutorials/">The Ultimate Roundup of Indispensable and Helpful HTML5 </a></p>

<p>HTML5 – what all the cool kids are talking about</p>

<p><a href="http://www.smallbusinesssem.com/how-local-search-works-in-2010/3338/">How Local Search Works in 2010</a></p>

<p>There's valuable information here for all this interested in the subject of local SEO, but I really do wish they would provide it in a format which is easy to print off.</p>

<p><a href="http://daggle.com/mainstream-media-stole-news-story-credit-1906">How The Mainstream Media Stole Our News Story Without Credit</a></p>

<p>Written by Danny Sullivan, this is one of the most fascinating stories on the relationship between bloggers and the mainstream media that I've read in a long time.</p>

<p><a href="http://www.seomoz.org/blog/seo-site-audits-getting-started">SEO Site Audits: Getting Started</a></p>

<p>Lindsay at SEOmoz provides a guide to guerilla SEO.</p>

<p><a href="http://www.seomoz.org/blog/an-illustrated-guide-to-the-science-of-persuasion-influence">An Illustrated Guide to the Science of Influence &amp; Persuasion</a></p>

<p>Rand brings psychology into the SEO equation.</p>

<p><a href="http://html5watch.tumblr.com/">HTML5 Watch</a></p>

<p>A new websites that gives exposure to HTML5 related articles</p>

<p><a href="http://code.google.com/webfonts">Google Font Directory</a></p>

<p>It's early days yet for the Google Font Directory but I'll be watching to see how it matures.</p>

<p><a href="http://www.alistapart.com/articles/responsive-web-design/">Responsive Web Design</a></p>

<p>It's very rare that you an article that is genuinely ground-breaking but Ethan Marcotte achieves that with this item on A List Apart. In essence, he proposes a workable way of designing for smaller mobile resolutions.</p>

<p><a href="http://www.tuttoaster.com/getting-started-with-pdf-generation-in-php/">Getting started with pdf generation in PHP</a></p>

<p>Abhin Sharma explains an incredibly easy way of generating PDFs by using the FPDF PHP library.</p>

<p><a href="http://www.stevesouders.com/blog/2010/05/11/appendchild-vs-insertbefore/">appendChild vs insertBefore</a></p>

<p>Steve Souders looks at the most efficient way of including files using JavaScript.</p>

<p><a href="http://fourkitchens.com/blog/2010/05/09/drop-cron-use-hudson-instead">Drop that cron; use Hudson instead</a></p>

<p>I'm very much in to looking for alternatives to cron so I've bookmarked this one for future reference.
</p>]]></description>
 <pubDate>2010-07-03T04:38:04Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">126 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A complete guide to CSS pseudo-classes]]></title>
<link>http://www.suburban-glory.com/blog?page=125</link>
<description><![CDATA[<h3>CSS 2.1 pseudo-classes</h3>

<p><strong>
a:link {color:#3344dd}    <br />
a:visited {color:#804180}  <br />
a:hover {color:#b50010}  <br />
a:active {color:#b50010} <br /></strong></p>

<p>The above CSS pseudo-classes should already be familiar to you, but if they aren't here is a brief explanation.</p>

<p>:link is the declaration for the link before the user has clicked on it.
:visited is the state of the link after the user has visited the page it points to.
:hover is the declaration for a link when the cursor moves over it.
:active is the selected link</p>

<p>These are all used for styling links while :focus below is used for fields in forms. </p>

<p>This will give the field a yellow background when the cursor is clicked in the box:</p>

<pre>
input:focus{
background : #ffff00;
}
</pre>

<p>:focus is not support in IE6 and IE7 and :active is not supported in IE6 and only partially supported in IE7.</p>

<p>The five remaining CSS 2.1 pseudo-classes are below.</p>

<p><strong>:lang(C) </strong></p>

<p>Similar to the attribute selector, this pseudo-class will allow you to match your CSS in the language specified in the HTML document, like so:</p>

<pre>
:lang(en) p {
background : #ffffcc;
}
</pre>

<p>The above will give a yellow background behind all paragraphs that have either xml:lang="en" or lang="en" specified in the page.</p>

<p><strong>
:first-child
</strong></p>

<p>This is a useful CSS rule and it serves as an introduction to the myriad of CSS 3.0 pseudo-classes.</p>

<p>The only browser it doesn't work in is IE6. Here's how it looks in action and it does what you would expect:</p>

<pre>
p:first-child {
background : #ffffcc;
}
</pre>



<pre>
ul li:first-child {
background : #ffffcc;
}
</pre>

<p>The first block of code changes the background of the first paragraph while the latter does the same to first list item.</p>

<p><strong>
@page :first / @page :left / @page :right 
</strong></p>

<p>These three are part of a number of CSS rules intended to create beautifully printed pages. They are quite arcane though and little used. For further information read <a href="http://msdn.microsoft.com/en-us/library/dd433064%28VS.85%29.aspx">this article here</a>. They are only supported in a few browsers.</p>

<h4>CSS 3.0 pseudo-classes</h4>

<p>For me, this is where CSS becomes really very powerful and interesting. The key aspect of understanding this code is that it serves as a way of pinpointing certain elements on a page using only CSS and without adding any extra HTML.</p>

<p>I would suggest that this is about as complex as CSS gets at the moment so don't expect to pick it up immediately, let alone become fluent in its use after reading this article.</p>

<p>None of these work in any version of Internet Explorer but they all work in the latest versions of Opera, Chrome, Firefox and Safari. There is though a JavaScript solution to enable limited support in IE which is linked to at the bottom of this post.</p>

<p><strong>
:nth-child() 
</strong></p>

<p>To demonstrate this pseudo-class lets say you have a list with five items. You need to style the third item and the third item only. If this is the case then use :nth-child() as below.</p>

<pre>
ul li:nth-child(3) {
background : #ffffcc
}
</pre>

<p>But it's more powerful than just this simple use. </p>

<pre>
ul li:nth-child(even) {
background : #ffffcc
}
</pre>

<p></p>

<pre>
ul li:nth-child(odd) {
background : #ffffcc
}
</pre>

<p>The above will target all even numbered list items and odd numbered lists respectively. I'm using lists as an example but it could just as easily be paragraphs, table columns or a variety of different purposes.</p>

<p>There's even a more precise use for :nth-child():</p>

<pre>
ul li:nth-child(3n+2) {
color: yellow;
}
</pre>

<p>Note the addition of the letter n. This is a number expression an+b and this will target the second and fifth list item and so on in a pattern of 3.</p>

<pre>
ul li:nth-child(4n+3) {
color: yellow;
}
</pre>

<p>Above will target the fourth and seventh list item and upwards in a pattern of 4.</p>

<p>Confused? The best way of understanding this is by creating a simple HTML list and playing around with this CSS syntax yourself.</p>

<p><strong>
:nth-last-child()
</strong></p>

<p>This is exactly the same as :nth-child() but it reverses the order, for instance the code below would target the last list item on a page:</p>

<pre>
ul li:nth-last-child(1) {
background : #ffffcc;
}
</pre>

<p><strong>
:nth-of-type()
</strong></p>

<p>As with :nth-child() this can either be a number, odd or even and a number expression; however, this matches a child of a specific element type while :nth-child() matches any child.</p>

<p>Again, lets give an example:</p>

<pre>
p img:nth-of-type(1) {
border : 2px solid #ffff00;
}
</pre>

<p>This will target the first image in any paragraph which :nth-of-type() is particularly useful for.</p>

<pre>
p img:nth-of-type(1) {
float : right;
}
</pre>


<pre>
p img:nth-of-type(2) {
float : left;
}
</pre>

<p>Above will float the first image in the paragraph to the right and the second image to the left. </p>

<p>The use of nth-of-type() over nth-child() allows more precision in targeting elements which need sometimes demands.</p>

<p><strong>
nth-last-of-type()
</strong></p>

<p>The same as :nth-of-type expect it selects from the bottom up. Below will give a border to the last image in a paragraph:</p>

<pre>
p img:nth-of-type(1) {
border : 2px solid #ffff00;
}
</pre>

<p><strong>
:last-child
</strong></p>

<p>The reverse of :first-child. Below will highlight the last item in a list:</p>

<pre>
ul li:last-child {
background : #ffffcc
}
</pre>

<p><strong>
:first-of-type and :last-of-type
</strong></p>

<p>What :nth-of-type() is to :nth-child(), so :first-of-type and :last-of-type are to :first-child and :list-child respectively.</p>

<p><strong>
:only-child 
</strong></p>

<p>This targets a single child of its parents. Look at the following code:</p>

<pre>
#wrapper p:only-child {
background : #ffffcc
}
</pre>

<p>Above would give a background colour to the paragraph only if there was one paragraph in the wrapper div. It's a struggle to find an example where this would come handy. If you can think of one post it up below!</p>

<p><strong>
:only-of-type
</strong></p>

<p>Matches the only child element of its type. If you want to create a border around an image in a paragraph if there is only one image then use the following code:</p>

<pre>
p img:only-of-type {
border: 2px solid #ffffcc;
}
</pre>

<p><strong>
:empty
</strong></p>

<p>With this pseudo-class you can target an element with nothing in it. Maybe you are using a CMS and you want to hide a box until there is some user-generated content in which case you could use the code below. However, it's not particularly practical because even white space within the box would prevent it from working.</p>

<pre>
.box:empty {
display: none;
}
</pre>

<p><strong>
:target
</strong></p>

<p>This is a really useful little addition to the CSS library which allows styling when using fragment identifying in the URI. </p>

<p>Www.example.com#extra - #extra is the fragment identifier in this URI.</p>

<p>For a great tutorial on practical uses of :target read Craig Grannell's article <a href="http://www.netmag.co.uk/zine/develop-css/enhance-internal-page-links">Enhance Internal Page Links</a> which appeared in issue #180 of net magazine</p>

<p><strong>
:not()
</strong></p>

<p>Also known as the negation pseudo-class this targets everything except that declared in the brackets. As an example this CSS will give every paragraph a yellow background except that with a class of highlight:</p>

<pre>
p:not(.highlight) {
background : #ffffcc;
}
</pre>

<p><strong>
:root
</strong></p>

<p>In a HTML document the root is html. </p>

<p>-----------</p>

<p>Now I'm going to show you some advanced CSS for forms which are a key constituent of most web sites.</p>

<p>There are two attributes in HTML that help restrict the users ability to input data into a field. They are disabled and readonly. For instance you may want to add disabled=”disabled” to the submit button until the user fills in all the required details. They are mostly only used in conjunction with JavaScript and CSS 3.0 allows styling of one of these – disabled.</p>

<pre>
input:disabled {
background : #ffff00;
}
</pre>


<pre>
input:enabled {
background : #ffff00;
}
</pre>

<p>The first example above would allows styling of all fields using the disabled attribute while the latter would affect fields not using it.</p>

<p><strong>
:checked
</strong></p>

<p>This is a useful little bit of CSS to use. It allows the styling of a form checkbox when it is checked. Below enlarges the box upon user interaction:</p>

<pre>
input:checked {
width: 20px;
height: 20px;
}
</pre>

<p><strong>
:indeterminate
</strong></p>

<p>This matches checkbox elements whose indeterminate DOM attribute is set to true by JavaScript.</p>

<p><strong>
:default /  :valid / :invalid / :in-range / :out-of-range / :required / :optional / :read-only / :read-write 
</strong></p>

<p>These are all for use with XForms, details for which read the <a href="http://en.wikipedia.org/wiki/XForms" rel="nofollow">Wikipedia entry</a></p>

<p>------------</p>

<p>It depends how you use the above CSS but if used thoughtfully and sensibly then I see no reason why you can't use most of it without worrying about IE users. What it will give users of the more advanced browsers is some extra subtle and pleasing aesthetics that if IE users don't see won't harm their use of your site.</p>

<p>However, as of January 2010, CSS3 pseudo-class selector emulation JavaScript has been released which allows some support in IE versions 5-8. Developer <a href="http://www.keithclark.co.uk/labs/ie-css3/">Keith Clark</a> is responsible for this most welcome script and it works with all the main JavaScript libraries including jQuery, MooTools, DOMAssistant, Prototype, YUI and NWMatcher. I strongly recommend that you check out Keith's script.
</p>

<p>-----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-epping.html">Epping Web Design</a></p>]]></description>
 <pubDate>2010-06-11T10:14:25Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">125 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A complete guide to CSS attribute selectors]]></title>
<link>http://www.suburban-glory.com/blog?page=124</link>
<description><![CDATA[<p>Attribute selectors are a part of both CSS 2.1 and CSS 3.0 and this tutorial will show you how to use these powerful design aids.</p>

<p>If they are that helpful then why isn't their use more widespread, you may ask? Two words: Internet Explorer. Although they have almost 100% support in IE7 they have only patchy support in IE6. However, IE6 has one foot in the grave and anyway, depending on your reason for using them, it's easy enough to use conditional comments to find another solution for IE6 or use the JavaScript linked to at the end of this article.</p>

<p>Use the <a href="http://www.css3.info/preview/attribute-selectors/">free tool at css3.info</a> to check for browser support</p>

<h3>CSS 2.1 attribute selectors</h3>

<p>Firstly, in XHMTL and HTML an attribute is a class, id, style or title. So it would be possible, for instance, to give a paragraph a yellow background that had a class called highlight, with the following code:</p>

<pre>
p[class] {
background : #ffffcc;
}
</pre>



<pre>
p[class=highlight] {
background : #ffffcc;
}
</pre>

<p>The top code means that by matching the p selector to any class attribute then that paragraph background will be a light yellow, while the second example makes sure that only the class entitled highlight has a different background.</p>

<p>I think this is fairly simple to understand now lets try something a little more complex.</p>

<p>What happens if the title has two or more words and with white space between them such as “highlight this” ?</p>

<p>The previous code won't work so you'll need to use slightly different CSS. Notice the inclusion of the ~ character:</p>

<pre>
p[title~=highlight] {
background : #ffffcc;
}
</pre>

<p>Lets look at another example of how this could be used.</p>

<p>You have a link which uses the title attribute with text that reads “This link goes to an important page”. In order to give that link a different background you would use the following code:</p>

<pre>
a[title~=important] {
background : #ffffcc;
}
</pre>

<p>So every link in your page with the word important somewhere in the title would be affected.</p>

<p>As this article is a complete guide to attribute selectors I'll cover a little used case, that for targeting particular languages in the page.</p>

<pre>
p[lang|=en] { 
background : #ffffcc; 
}
</pre>

<p>This matches the language subcodes specified by the lang attribute which in XHTML is xml:en with the abbreviation changing depending on the language used. </p>

<p>It should be noted that multiple attribute selectors can be used on the same line if you need to pinpoint text.</p>

<pre>
p[class=highlight] a[title~=important] {
background : #ffffcc;
}
</pre>

<p>The above CSS would highlight the link with important in the title if it is in the paragraph with the class called highlight.</p>

<p>Okay, the above examples aren't exactly that radical as much of the above could be achieved by simple class selectors, but in CSS 3.0 matters get more interesting.</p>

<h4>CSS 3.0 attribute selectors</h4>

<p>So if  CSS 2.1 hasn't flipped your mind lets move on to the next, more intricate level.</p>

<p>Here's our first code example that gives a special background to all links in the document that point to a PDF:</p>

<pre>
a[href$='.pdf'] {
background : #ffffcc;
}
</pre>

<p>The syntax is almost identical to 2.1 but notice the inclusion of the dollar sign which needs to equal the suffix of the file name.</p>

<p>As you can appreciate, changing the pdf to doc or txt would mean that different types documents are affected:</p>

<pre>
a[href$='.doc] {
background : #00ffff;
}
a[href$='.txt'] {
background : #ff00ff;
}
</pre>

<p>Changing $ to ^ means changing the end to the beginning while * specifies that it contains the value.</p>

<p>Lets say you wanted to highlight a link in the page that went to a secure https connection then you would use the version below as that is for the beginning of the URL rather than the end.</p>

<pre>
a[href^='https'] {
background : #ffff00;
}
</pre>

<p>This would give a background colour to a link that had paypal somewhere in the URL:</p>

<pre>
a[href*='paypal'] {
background : #ffff00;
}
</pre>

<p>The methods above are ideal for placing different icons next to different file types.</p>

<p><a href="http://www.css3.info/preview/attribute-selectors/">Read this article on css3.info for further information</a>.</p>

<p>As I noted in the introduction support for this CSS is very poor in IE6 and not quite complete in IE7 (although very good). Some assistance comes from the <a href="http://github.com/chrispatterson/jquery-super-selectors">jQuery plugin SuperSelectors</a> which allows IE support for all CSS 2.1 selectors.</p>

<p>--------------</p>


<p><a href="http://www.suburban-glory.com/regions/web-design-colchester.html">Colchester web design</a></p>
]]></description>
 <pubDate>2010-06-02T11:07:47Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">124 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Old school acid house rarities mix]]></title>
<link>http://www.suburban-glory.com/blog?page=123</link>
<description><![CDATA[<p>ACCCCIIIDDDDDD!</p>

<p>Where you there?! Actually, I wasn't having been born in '75. Still, it's nice to hear some of this Mars music again - it still sounds like it's from another planet rather than this one.</p>

<p>This was always about taking drugs to make music to take drugs to.</p>

<p>Who would ever have thought it would be dad's music?! I bet today's dads don't cane it like they did over 20 years ago.</p>

<p>You can <a href="https://www.yousendit.com/transfer.php?action=download&amp;ufid=THE1TXRYcVhtMEx2Wmc9PQ">download Ben Sims mix here</a>.</p>

<p>Virgo - In A Vision/Vocal mix - Radical Records 1989
Shawn Shegog featuring Barbara Shegog - Love Traxs/Love dub - No Name Records 1988
Satoshi Tomie featuring Arnold Jarvis - And I loved You/Red Zone Dub - FFRR 1990
The Alliance - Thoughts Of You/Techamental Mix - Revenge Records 1989
China + L.I.A.M - Do You Love Me (Say Yes) - Missing records 1987
Steve 'Silk' Hurley - I Don't Know/Dubs From The Dungeon - Silk Trax 2000
Unknown Artist - Hiccup Track - Warehouse Box Tracks Records 2009
Disco D - High Noon - Alleviated Records 1986
Vincent Floyd - I'm So Deep - Dance Mania 1990
Rocky Jones - Choice Of A New Generation/Deep Underground - DJ International 1987
Jamie Principle- Waiting On My Angel/Bob Heckmann Remix - Instrumental Dub Mix - ZYX Records 1985
Phuture - Cocane (Alternative Version Of 'Your Only Friend') - Trax 1996
Unknown Artist - Your Love/Female Vocal Version - Warehouse Box Tracks 2009
Fred Brown - House Wop/Re-Mix - Rockin; House 1987
Ca Sa - 15 minutes - Bocca life 1988
Vienna - Tell Me/Innerspace Remix - Palmares 1991
G Strings presents The Motivation Songs - The Life Beyond This World - G Strings 1990
Robert Owens - Bring Down The Walls - Trax 1986
Joe R. Lewis - Separate Ways/Insane Mix - Target 1988
DJ Rush - Cruising - Dance Mania 1991
Lil Louis - How I Feel - Dance Mania 1987
William S - I'll Never Let You Go/Alternative Instrumental Mix - Trax 1987
William S - I'll Never Let You Go/Original Instrumental Mix - Trax 1987
Steve Poindexter presents Kareem Smith - N B Battle Track - Saber 1991
The Children - Work The Box/Original 4 Track Mix - Underground 1987
DZ's Pump Girls - Pump It Up - Dezzarotic 1986
E.S.P - Let's Move/Thums Up Mix - Underground 1987
House Family - No Control - Underground 1987
Raz - Amour Puetro Riqueno - Underground 1986
DJ Duke - Jefferson - Power Music 1996
Ben Mays - Rated X/Jungle Mix - Westbrook 1990
Mission Control - Outta Limits - Atlantic 1992
N-2-U - Touch It -House Jam 1991
Project 122 - Kiss Me Baby - House 1986
Liz Torres - Music - Jive 1990
Trybe - Psychedelic Shack - Wild Pitch 1988</p>

<p><img src="http://image.guardian.co.uk/sys-images/Arts/Arts_/Pictures/2007/07/10/smiley460.jpg" width="460" height="460" alt="Acid house symbol" /></p>

<p>----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-chelmsford.html">Chelmsford Web Design</a></p>

]]></description>
 <pubDate>2010-05-12T04:48:45Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">123 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Superb happy hardcore mix]]></title>
<link>http://www.suburban-glory.com/blog?page=121</link>
<description><![CDATA[<p>Do you wanna dance? Do you wanna dance right now to the bouncing bass of '94 hardcore? Well do you yer?! Of course you do.</p>

<p>I first heard a Chrissy Murderbot jungle mix a few years ago and it saw some serious action on my stereo, now somebody has pointed my towards his blog, <a href="http://yearofmixtapes.blogspot.com/">My Year of Mixtapes</a>, subtitled 'A Mixtape a Week, For One Year, So Help Me Gosh'. </p>

<p>Every week Chrissy throws out a mix from a particular dance genre whether that is techno, ragga, Eurodisco, synth pop or Chicago house.</p>

<p>He's now put up two original happy hardcore mixes from the golden mid-90s era.</p>

<p><a href="http://www.murderbot.com/mixtapeblog/murderbot-week22-happycore_94.mp3">Download the first mix from here</a>.</p>

<p>I can guarantee this mix will put a smile on your face :)</p>

<p>Tracklist:</p>

<p>   1. Sy Project; Emotions (Quosh Records)
   2. Vibes &amp; Wishdokta; Feel Good (Asylum Music )
   3. Higher Level; Visions of Light (Zodiac Records)
   4. Naughty Naughty vol. 9; Pride (white)
   5. Ravers Choice vol. 1; Feel Real Good (white)
   6. The Beatmen; Seventh Way (4 The Floor Recordings)
   7. Naughty Naughty vol. 10; Voodoo Ray (white)
   8. Spicelab; The Spirit of Fear (Harthouse)
   9. Higher Level; Feel The Sky (Zodiac Records)
  10. Slipmatt; Hear Me (Awesome Records)
  11. Naughty Naughty vol. 5; Stay Here (white)
  12. SMD Vol. 2; Side B (white)
  13. Higher Level; I Need You Now (Zodiac Records)
  14. 4 The Floor vol. 5; Side A (4 The Floor Recordings)
  15. DJ Seduction; My Own (Slipmatt Remix) (Impact Records)
  16. Naughty Naughty vol. 7; Where Love Lives (white)
  17. Bass Selective; Blow Out Jungle VIP (S.O.U.R.)
  18. VW001; Sweet Love (white)
  19. SMD vol. 3; Vol. 1 Remix (white)
  20. S&amp;A; Peaked Up (4 The Floor Recordings)
  21. Force &amp; Evoluion; Perfect Dreams (Vibes &amp; Wishdokta Remix) (Knite Force)
</p>
<p>---------------</p>
<p><a href="http://www.suburban-glory.com/regions/web-design-bishops-stortford.html">Bishops Stortford Web Design</a></p>]]></description>
 <pubDate>2010-05-06T07:44:51Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">121 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Interesting blog posts from April 2010]]></title>
<link>http://www.suburban-glory.com/blog?page=120</link>
<description><![CDATA[<p>Here's my brief run through blog posts that caught my attention in April (this entry also covers March as I didn't have time to write a round-up last month).</p>

<p>They cover the weird and wacky world of SEO and the latest news from the CSS3, PHP and JavaScript fronts.</p>

<p>I hope you enjoy these items and find them educational.</p>

<p><a href="http://www.seomoz.org/blog/30-seo-problems-the-tools-to-solve-them-part-2">30 SEO Problems &amp; the Tools to Solve Them</a></p>

<p>Rand Fishkin lists a couple of dozen valuable tools that he recommends. No doubt you'll already be using many of these but there's bound to be some new applications that you've never come across before.</p>

<p><a href="http://www.wordstream.com/blog/ws/2010/04/28/web-spam-guide">Web Spam: The Definitive Guide</a></p>

<p>SEO is very much about trial and error and along the way you'll bound to make mistakes. David Harry details some spam techniques that you may accidentally have used (and been penalised for!).</p>

<p><a href="http://samuli.hakoniemi.net/css3-transitions-are-we-there-yet/">CSS3 Transitions – Are We There Yet?</a></p>

<p>A thorough explanation of CSS transitions from Samuli Hakoniem, but as far as I'm concerned this is what JavaScript is there for!</p>

<p><a href="http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/">cssSandpaper – a CSS3 JavaScript Library</a></p>

<p>Zoltan “Du Lac” Hawryluk introduces his cssSandpaper project to the world. If you are interested in CSS transforms, opacity, box shadows and gradients but are worried about their lack of cross-browser support then try this script out.</p>

<p><a href="http://davidwalsh.name/mootools-jquery-dojo">Accomplishing Common Tasks Using MooTools, jQuery, and Dojo</a></p>

<p>A brief side-by-side examination of MooTools, jQuery and Dojo.</p>

<p><a href="http://www.reencoded.com/2010/04/15/15-time-saving-javascript-tools-to-speed-up-development/">15 Time-Saving JavaScript Tools to Speed Up Development</a></p>

<p>I bookmarked this post because it linked to a couple of resources such as GotAPI and Damnit that are new to me.</p>

<p><a href="http://css-tricks.com/child-and-sibling-selectors/">Child and Sibling Selectors</a></p>

<p>Chris Coyier gives a very thorough introduction to these useful CSS features.</p>

<p><a href="http://www.shayhowe.com/resource/web-design-community-news/">Where to Submit Your Web Design and Development News</a></p>

<p>A mega list of sites to submit your worthy web design related blog posts to.</p>

<p><a href="http://spyrestudios.com/website-accessibility-tools/">How Accessible is Your Website? 8 Tools to Analyze Your Website’s Level of Accessibility</a></p>

<p>You'll bound to find some useful applications here to assist your accessible discipline.</p>

<p><a href="http://www.colourlovers.com/web/blog/2010/03/11/calculating-color-contrast-for-legible-text">Calculating Color Contrast for Legible Text</a></p>

<p>[If you are looking for a web designer in east London then please visit <a href="http://www.suburban-glory.com/areas/hackney.html">web design Hackney </a>]</p>

<p>Colourlovers mixes PHP, CSS and the W3C</p>

<p><a href="http://www.sitepoint.com/blogs/2010/03/04/how-to-override-php-configuration-settings/">How to Override PHP Configuration Options</a></p>

<p>A useful article to bookmark if you need to configure your PHP installation on your server.</p>

<p>-----------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-dunmow.html">Dunmow web design</a></p>]]></description>
 <pubDate>2010-05-02T14:08:24Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">120 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[CSS3 pseudo-class selector emulation for IE and Dojo]]></title>
<link>http://www.suburban-glory.com/blog?page=118</link>
<description><![CDATA[<p>In January developer <a href="http://www.keithclark.co.uk/labs/ie-css3/">Keith Clark</a> released his script that allows gave cross-browser support to use 18 different types of CSS pseudo-classes that previously had limited or no support in Internet Explorer.</p>

<p>The script has full or partial support when used with the following JavaScript frameworks: jQuery, MooTools, DOMAssistant, Prototype, YUI and NWMatcher.</p>

<p>One important framework left out is Dojo and Keith is working to include this open source project in future releases of ie-css3.js.</p>

<p>As I've been playing around with <a href="http://www.dojotoolkit.org/">Dojo</a> for the past week I volunteered to thoroughly test out the lastest pre-release version of ie-css3.js with Dojo version 1.4.1. Below are the results. They are marked as either working, not working or working incorrectly.</p>

<table border="0"><tr><th>Pseudo-class</th>
<th>IE6</th>
<th>IE7</th>
<th>IE8</th>
</tr><tr><td>:nth-child</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:nth-last-child</td>
<td>incorrect</td>
<td>incorrect</td>
<td>incorrect</td>
</tr><tr><td>:nth-of-type</td>
<td>incorrect</td>
<td>incorrect</td>
<td>incorrect</td>
</tr><tr><td>:nth-last-of-type</td>
<td>incorrect</td>
<td>incorrect</td>
<td>incorrect</td>
</tr><tr><td>:first-child</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:last-child</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:only-child</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:first-of-type</td>
<td>incorrect</td>
<td>incorrect</td>
<td>incorrect</td>
</tr><tr><td>:last-of-type</td>
<td>incorrect</td>
<td>incorrect</td>
<td>incorrect</td>
</tr><tr><td>:only-of-type</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:empty</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:enabled</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:disabled</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:checked</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:hover</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>:focus</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>::first-line</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr><tr><td>::first-letter</td>
<td>correct</td>
<td>correct</td>
<td>correct</td>
</tr></table><p>Edit: As of April 14 this version of the script is now available for everybody: <a href="http://www.keithclark.co.uk/labs/ie-css3/">http://www.keithclark.co.uk/labs/ie-css3/</a></p>]]></description>
 <pubDate>2010-04-12T04:16:59Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">118 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Valuable blog posts from February 2010]]></title>
<link>http://www.suburban-glory.com/blog?page=117</link>
<description><![CDATA[<p>There's been some really interesting SEO and web design items that have caught my attention this month.</p>

<p>I usually have about 50 different posts per day sitting in my feed reader and I try to keep abreast of latest developments, which, in this field, really are changing all the time.  I brought myself a second-hand copy of the second edition of <em>Designing with Web Standards</em> by Jeffrey Zeldman (he of Happy Cog and A List Apart) the other week, and although it was only published in 2006  I couldn't believe how dated the information was.</p>

<p><a href="http://www.wired.com/magazine/2010/02/ff_google_algorithm/all/1">How Google’s Algorithm Rules the Web</a>  &gt; &gt;</p>

<p>This article from <em>Wired</em> magazine may not necessarily reveal anything new but it does encapsulate much of the sophisticated algorithms that make Google the leader of the search engine pack.</p>

<p><a href="http://www.vanseodesign.com/web-design/color-meaning/">How To Use Color To Enhance Your Designs</a> &gt; &gt;</p>

<p>I'm not sure if Steve Bradley at Vanseodesign has swallowed a book but he's getting all intellectual on our arses. This excellent article is from a series about colour theory.</p>

<p><a href="http://www.seomoz.org/blog/a-step-by-step-15-minute-seo-audit-a-sample-from-seo-secrets">A Step by Step 15 Minute SEO Audit (A Sample from SEO Secrets)</a> &gt; &gt;</p>

<p>Danny Dover reveals how to give a quick SEO audit on any site at SEOmoz.</p>

<p><a href="http://www.searchenginejournal.com/anatomy-of-a-hands-on-seo-site-audit-part-1/17199/">Anatomy of a Hands-on SEO Site Audit – Part 1</a> &gt; &gt;</p>

<p>Alan Bleiweiss' article on the Search Engine Journal should be read in tandem with Dover's item above.</p>

<p><a href="http://www.smashingmagazine.com/2010/02/09/applying-mathematics-to-web-design/">Applying Mathematics To Web Design</a> &gt; &gt;</p>

<p>I loved this in-depth article on Smashing Magazine. When I get a chance I'll play around with the free PSD templates given away for free.</p>

<p><a href="http://www.vcarrer.com/2010/02/golden-grid-psd-template.html">The Golden Grid PSD Template</a> &gt; &gt;</p>

<p>Vladimir Carrer finds a free PSD template on the Google code respositary.</p>

<p><a href="http://searchengineland.com/30-link-builders-discuss-backlink-analysis-for-campaign-design-part-1-35275">30 Link Builders Discuss Backlink Analysis For Campaign Design – Part 1</a> &gt; &gt;</p>

<p>Search Engine Land trumps again. There are lots of people who would pay to have the information given away for free in this article.</p>

<p>[If you are looking for a web designer in east London then please visit <a href="http://www.suburban-glory.com/areas/hackney.html">Hackney web design</a>]</p>

<p><a href="http://www.sitepoint.com/blogs/2010/02/09/debug-php-firebug-firephp/">Debug PHP with Firebug and FirePHP</a> &gt; &gt;</p>

<p>A Firefox addon to try out.</p>

<p><a href="http://www.wordtracker.com/academy/62-steps-to-the-definitive-link-building-campaign">62 steps to the definitive link building campaign</a> &gt; &gt;</p>

<p>Mark Nunney divulges more solid link building advice. </p>

<p>-------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-shenfield.html">Shenfield web design</a></p>]]></description>
 <pubDate>2010-02-25T02:09:52Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">117 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[How small businesses view their online strategy]]></title>
<link>http://www.suburban-glory.com/blog?page=116</link>
<description><![CDATA[<p>At the moment I'm putting together a new business plan and I needed some data regarding how the web has affected business strategies. As a member of <a href="http://www.ukbusinessforums.co.uk/forums/">UK Business Forums</a> I thought I'd ask fellow users to fill out a survey in order to gauge current attitudes to the web.</p>

<p>Around five or ten years ago businesses wanted to create a website simply because it was the done thing but now many realise that they need to effectively utilise this cyber-real estate. </p>

<p>As an example, just before Christmas I went to visit a prospective client. He was the boss of a company in the manual trades and wasn't computer literate at all. He didn't even have any PC's at work. Nevertheless, with next-to-no knowledge on the subject he knew that what was essential wasn't just to have a website but also to rank well for his industry and regional keywords (he didn't use the phrase keywords). </p>

<p>The outlook of some businesses though are still stuck in a different era.</p>

<p>A regular on Urban75 forums, weltweit, recently made a very <a href="http://www.urban75.net/vbulletin/showpost.php?p=10271725&amp;postcount=25">acute comment</a> on some attitudes:</p>

<blockquote><p>
“A lot of small businesses know a cousin or a mate who will knock up a site for them almost for free. It does not matter to them that it will actually achieve nothing, they just want to be able to say at the golf club that they have a website, they have hardly any idea what is possible with internet marketing.</p>

<p>“A proportion of people like that make good prospects a year or two down the line when the chairman's sons website has brought them absolutely no business, their site has had no visitors etc ... they divide into two groups, group 1 says the internet is crap, tried it and it did nothing, and group 2 who figure a little more deeply and realise that their existing site was simply pants.”
</p></blockquote>

<h3>A cross-section of small businesses</h3>

<p>17 individuals responded to the survey with the majority having a turnover of between £50k and £200k. One respondent declared a gross income of over 400k.</p>

<p>The industries were a broad cross-section including the manual trades of plumbing and gas central heating to clothing retail and gardening to computer spare parts and IT</p>

<p>A few were eCommerce cart owners.</p>

<h4>Web design expectations</h4>

<p>The first question was how they found the web designer who had created their site. Interestingly, over half said they made their site themselves while a smaller group went on recommendations. A couple stated Google or a sales call. </p>

<p>The next question was whether their site lived up to their expectations and then whether they felt their web presence is currently used to its full potential.</p>

<p>Nearly everybody said that they were happy with their initial creation but at the same time almost all respondents confessed that they had varying degrees of ground to gain on the web.</p>

<p>Some comments included:</p>

<blockquote><p>
“We need to invest in marketing, but are unsure how to get the best return on investment, and which marketing tactics work best. Previous attempts, including Adwords, have not proven to a good RO”
</p></blockquote>

<blockquote><p>
“Work is needed at the moment for keywords, adding photo album, adding content, links, also we need to integrate our blog to our site rather than hosted with Wordpress”
</p></blockquote>

<blockquote><p>
“I think it could be better if I had a fuller understanding of SEO, and utilised other marketing”
</p></blockquote>

<blockquote><p>
“Would like to be able to offer online order tracking, re-ordering, ect for my clients, but I don't have the skills to do this and cannot afford thousands for somebody else to do it.”
</p></blockquote>

<blockquote><p>
“The site isn't good enough, the SEO is not good enough and we have spent very little money on marketing it”</p>
</blockquote>

<h5>How much for web design?</h5>

<p>Essex-based web designer Sarah Parmenter has written about the gulf between customers expectations and the financial reality in <a href="http://www.sazzy.co.uk/2009/04/why-i-cant-build-a-website-for-500/">“Why I can't build a website for £500...”</a>, so to gauge this issue I asked two questions: What would you consider a fair price to have a website made and what would you consider a fair price to have an eCommerce cart made?</p>

<p>It's not possible to work out an average price quoted as they were often given conditionally (“£50 per page”) but responses varied, some quotes being:</p>

<blockquote><p>
“For my needs I wouldn't pay more than £500 but it would be have to be really good as I have made several websites using HTML and it's not really that hard. The only reason I would pay someone is if I just don't have the time or I wanted something really amazing. I would have very high expectations of a professional.”
</p></blockquote>

<blockquote><p>
“No set costs. It ranges for hosting only charges using WP to many thousands using a Flash based dynamically drive site which is cloaked for SEO purposes.”
</p></blockquote>

<blockquote><p>
“Depends on the site. £500 to £2000 – the £2000 would have to be the Rolls Royce of websites!”
</p></blockquote>

<blockquote><p>
“This I suppose would depend entirely on the site, but maybe £100 for the main page, £25-£50 thereafter?”
</p></blockquote>

<blockquote><p>
“For our needs probably around £600-700.”
</p></blockquote>

<p>Ranges for eCommerce carts, when given, were from £1k to £15k.</p>

<p>Asked whether in the coming years they regarded a strong web presence to be more important to their business, less important or about the same three quarters said more and the rest said about the same.</p>

<h6>Web terminology</h6>

<p>Finally, it's easy for those involved in the online creative industries to forget that what are common industry terms are not necessarily well known elsewhere. I presented a number of web technology terms and asked those filling out the survey whether they fully understood them. The phrases and the percentage of those stating they did are here:</p>

<table border="1" cellspacing="0" cellpadding="0"><tr><th>Title</th>
<th>Percentrage</th>
</tr><tr><td>Search Engine Optimisation</td>
<td>88%</td>
</tr><tr><td>Flash</td>
<td>88%</td>
</tr><tr><td>Firefox</td>
<td>88%</td>
</tr><tr><td>Content Management System</td>
<td>88%</td>
</tr><tr><td>SERPS</td>
<td>70%</td>
</tr><tr><td>Cache</td>
<td>70%</td>
</tr><tr><td>RSS</td>
<td>76%</td>
</tr><tr><td>CSS</td>
<td>59%</td>
</tr><tr><td>XHTML</td>
<td>59%</td>
</tr></table><p>
Without doubt, pound-for-pound when compared to other means of marketing and promotion, a web presence – if done correctly – is a good investment. These results testify that many small businesses recognise it's importance and are clearly attuned to much of what it entails. With the help of clear communication from the web designer any gaps in knowledge are not insurmountable. </p>

<p>-------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-brentwood.html">Brentwood web design</a></p>]]></description>
 <pubDate>2010-02-07T02:51:33Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">116 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Blog posts that caught my attention this month – January 2010.]]></title>
<link>http://www.suburban-glory.com/blog?page=115</link>
<description><![CDATA[<p>I find dozens of links to blog posts and articles sitting in my Google reader every day. I subscribe to 60 different feeds and I use this as a means of keeping track of latest trends in web design and SEO.</p>

<p>Every time I read an article and think “That'll come I handy in the future. I'll bookmark it,” I click on the little yellow star to put it to one side.</p>

<p>The list of articles I saved in January is an interesting and varied list and I present them to you below:</p>

<p> <a href="http://ar.to/2010/01/dissecting-the-unlicense">Dissecting the Unlicense: Software Freedom in Four Clauses and a Link</a> &gt; &gt;</p>

<p>A fascinating article from Arto Bendiken that promotes a new software license – the Unlicense. This allows code to be donated to the public domain but it has some great ethical clauses at the bottom:</p>

<blockquote><p>May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
</p></blockquote>

<p>Introducing morality into licensing seems like a good idea to me.</p>

<p> <a href="http://www.chapterthree.com/blog/farsheed_hamiditoosi/my_life_panels_vol_1">My Life with Panels, Vol. 1</a> &gt; &gt;</p>


<p>A Drupal Panels tutorial from Chapter Three's Farsheed Hamidi-Toosi</p>

<p> <a href="http://www.csskarma.com/blog/sliding-labels/">Form Design with Sliding Labels</a> &gt; &gt;</p>

<p>
This is a really impressive jQuery plugin for creating an attractive form effect. Definitely one to use on a forthcoming website. <a href="http://www.csskarma.com/lab/slidinglabels/">Check out the demo</a>.</p>

<p> <a href="http://www.dogstar.org/drupal/content/drupal-basics-insert-module">Drupal Basics: Insert Module</a> &gt; &gt;</p>

<p>Matthew over at Nonprofits and Web 2.0 introduced to me a Drupal module that I wasn't familiar with before and which allows non-technical users greater control when uploading and placing an image in a node. Very useful.</p>

<p> <a href="http://www.impressivewebs.com/stationary-logo-changes-page-scroll-css/">A Stationary Logo That Changes on Page Scroll with CSS</a> &gt; &gt;</p>

<p>Another CSS effect to use on a future clients' website. Really, really impressive. 
<a href="http://www.impressivewebs.com/demo-files/logo-scroll/logo-scroll-demo.html">For a demo see here</a>.

</p>

<p>[If you are looking for a web designer in east London then please visit <a href="http://www.suburban-glory.com/areas/hackney.html">Hackney web design</a>]</p>

<p> <a href="http://www.searchenginejournal.com/build-links-answers/16175/">Build Links with Better Answers</a> &gt; &gt;</p>

<p>It's very rare that you read an SEO article that provides new and practical link building strategy tips, but Jennifer Van Iderstyne on Search Engine Journal did just that in this item published on |January 12. It details how you can use Wordtracker to provide article ideas.</p>

<p> <a href="http://www.1stwebdesigner.com/development/promotional-websites-gain-traffic-quick-easy/">53 Promotional Websites To Gain Traffic Quick And Easy</a> &gt; &gt;</p>

<p>Dainis at 1st Web Designer does it again. If you are writing a web design blog then this list will provide you invaluable link building ideas. Check it out.</p>

<p> <a href="http://vandelaydesign.com/blog/design/resources-nature-inspired/">65 Resources for Nature-Inspired Design</a></p>

<p>This one does what it says on the tin. I've already created nature-based websites but this list is worth saving in case I need to find some green grass and blue sky inspiration in the future.</p>

<p> <a href="http://www.noupe.com/design/tips-for-coding-and-designing-usable-web-forms.html">Tips for Coding and Designing Usable Web Forms</a> &gt; &gt;</p>

<p>One from Noupe. More ideas on all-important form presentation.
</p>
]]></description>
 <pubDate>2010-01-30T02:29:15Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">115 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using CSS3 box-shadow to create a glow effect]]></title>
<link>http://www.suburban-glory.com/blog?page=114</link>
<description><![CDATA[<p>This is a technique I discovered by accident when creating the <a href="http://drupal.org/project/sunset">Drupal Sunset theme</a>.</p>

<p>The purpose of the box-shadow property is self-explanatory – it creates a shadow around an element.</p>

<p>I've used box-shadow quite a few times in the past and it is an impressive addition to the CSS stable. I've tried to find an alternative for IE - using either filters or JavaScript - but I haven't found one that works properly yet.</p>

<p>Here's an example of the code:</p>

<pre>
-webkit-box-shadow:5px 5px 5px #999999; 
-moz-box-shadow: 5px 5px 5px #999999; 
box-shadow:5px 5px 5px #999999; 
</pre>

<p>The three measurements in order are the horizontal offset, the vertical offset and the blur radius.</p>

<p>Here's how this would look in Firefox, Chrome or Safari – the only browsers to read this CSS3 feature so far:</p>

<p><img src="http://www.suburban-glory.com/images/new/box-shadow-one-small.jpg" alt="Box shadow number one" width="360" height="250" /></p>

<p>It produces an attractive grey border.</p>

<p>Lets change the code:</p>

<pre>
-webkit-box-shadow:0 0 15px #ffffff; 
-moz-box-shadow: 0 0 15px #ffffff; 
box-shadow:0 0 15px #ffffff; 
</pre>

<p>Reducing the horizontal and vertical offset to zero, increasing the blur radius and changing the shadow colour to white so that there is a more striking contrast between the foreground and background creates this:</p>

<p><img src="http://www.suburban-glory.com/images/new/box-shadow-two-small.jpg" alt="Box shadow number two" width="360" height="250" /></p>

<p>As you can see it creates quite a pleasant glow and it degrades gracefully as the browsers that don't recognise box-shadow merely see a border.
</p>]]></description>
 <pubDate>2010-01-29T03:13:18Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">114 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Review of Flash with Drupal by Travis Tidwell]]></title>
<link>http://www.suburban-glory.com/blog?page=113</link>
<description><![CDATA[<p><strong>A review of another addition to Packt Publications now quite extensive Drupal-related catalogue</strong></p>

<p>I first tried Flash when it was in its Macromedia Version 3 incarnation - it had so many bugs that it should have been the subject of a David Attenborough wildlife documentary. By version 4 though somebody had managed to master it as is evidenced by the website for <a href="http://www.primalscream.org/">Primal Scream's XTRMNTR album</a> in 2000. A colliding montage of sound and shapes, it was the first site that opened up the possibility to me of a multi-dimensional web without an unhealthy reliance on JavaScript, animated GIFs or Java Applets. 10 years on and the site still looks great.</p>

<p>Fast forward to 2010 and Adobe Flash has held on to its position as the primary animation web authoring tool but it remains a niche choice with many companies afraid to fully embrace a technology that isn't search engine friendly. However, it retains a loyal following in the creative industries and I would need more than two hands to count the number of exceptional Flash-based sites that land in my feed aggregator in-tray everyday from design showcase sites. </p>

<p><img src="http://www.suburban-glory.com/images/new/flash-icon-small.png" alt="Flash Logo" class="leftimage" width="250" height="250" /></p>

<p>Combining Flash with Drupal has obvious benefits. Flash can bring sophisticated, interactive animation to the table while Drupal is great for a modular backend structure.</p>

<p>If you don't have any experience in ActionScript, and if you plan to follow the exercises in <em><a href="http://www.packtpub.com/build-flash-applications-with-drupal-6/book?utm_source=suburban-glory.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_002296">Flash with Drupal</a></em> then intermediate knowledge of the language would be an advantage, failing that previous programming experience is essential.</p>

<p>Likewise, in itself, the book is not an introduction to Drupal. If you are a Flash developer who is interested in using Drupal than this book runs through a basic installation guide. However, you will still need to seek out other sources to fully understand Drupal administration and other aspects of the CMS.</p>

<p><em><a href="http://www.packtpub.com/build-flash-applications-with-drupal-6/book?utm_source=suburban-glory.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_002296">Flash with Drupal</a></em> is mainly concerned with Flash widgets, audio and video embedding and in particular using the power of JavaScript to connect widgets within a Drupal template rather than creating one massive, unwieldy Flash site. </p>

<p>The author himself is responsible for a number of Drupal / Flash integration modules <a href="http://drupal.org/project/dashplayer">Dash Media Player</a> and <a href="http://drupal.org/project/flashvideo">FlashVideo</a>. The book also covers the use of <a href="http://drupal.org/project/Services">Services</a>, <a href="http://drupal.org/project/views">Views</a>, <a href="http://drupal.org/project/cck">Content Contstruction Kit</a>, <a href="http://drupal.org/project/flashnode">Flash Node</a>, <a href="http://drupal.org/project/imagefield">ImageField</a>, <a href="http://drupal.org/project/audio">Audio</a> and number of other modules which provide valuable assistance in the web developers tasks.</p>

<p><img src="http://www.suburban-glory.com/images/drupal1.png" alt="Drupal Logo" class="leftimage" width="250" height="286" /></p>

<p>Of particular interest in this Packt Publications release is what Travis Tidwell calls a hybrid approach by binding the two technologies together with JavaScript, and his tutorial for creating a Flash user login box is one to bookmark for future reference.</p>

<p>Admittedly, HTML5 promises to encroach on the traditional Flash territory of embedded video and audio but we are some way from multi-browser HTML5 compatibility at the moment. Flash will remain the technology of choice for these purposes for the foreseeable future and those that wish to harness the power of Drupal with that of Adobe Flash can use this book as a source of ideas and a reference point.</p>

<p>It's not a book for novices but it's certainly a starting point for those seeking a different approach to Drupal and at 356 pages long it is clear that much thought and work has gone into its creation.</p>

<p>--------------------------</p>

<p><em><a href="http://www.packtpub.com/build-flash-applications-with-drupal-6/book?utm_source=suburban-glory.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_002296">Flash with Drupal</a></em> is released by Packt Publishing and at the time of writing retails at £23.79 on amazon.co.uk and $35.39 on amazon.com.</p>

<p>--------------------------</p>

<p>Note: Packt Publishing sent me a free book to review. There are no affiliate links in the article.</p>

<p>---------------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-chafford-one-hundred.html">Grays Web Design</a></p>]]></description>
 <pubDate>2010-01-28T01:44:39Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">113 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Probably the most uninviting hotel website in the world]]></title>
<link>http://www.suburban-glory.com/blog?page=112</link>
<description><![CDATA[<p>Not since the death of animated GIFs and Java applets have I had the misfortune to visit such an appalling hotel website. </p>

<p>No, not every hotel website has the high usability and design standards of Premier Inn.</p>

<p>Tucked away in the corner of German website munich-info.de you will find the page of accidentally kitschy <a href="http://www.munich-info.de/hotels/hotel-hubertus/bilder_en.html">Hotel Hubertus</a>.</p>

<p>Witness the completely out of focus and barely legible pictures, read the badly spelt information, wonder if the real hotel is as grotty as its online brochure.</p>

<p>Hotel Hubertus I salute you for being so completely useless that you've created something quite original.</p>

<p><img src="http://www.munich-info.de/hotels/hotel-hubertus/images/rezeption.jpg" width="291" height="159" alt="Welcome to Hotel Hubertus!" /></p>

<p>-----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-beckton.html">Shadwell web design</a></p>]]></description>
 <pubDate>2010-01-18T09:26:29Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">112 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Guide to using CSS3 border image]]></title>
<link>http://www.suburban-glory.com/blog?page=111</link>
<description><![CDATA[<p>The reason I am writing this guide is that I've read many of the current online tutorials and they are all quite confusing to those first approaching this CSS property. </p>

<p>It's clear as well border-image will be play an increasingly important part in web design as the CSS2.1 border style property is limited to only nine different values, namely; dotted, dashed, solid, double, groove, ridge, inset, outset and inherit. Border-image allows these options to expand indefinitely.</p>

<p>The border-image property was first introduced into the WebKit rendering engine as far back as 2005 and first appeared in Firefox through the nightly builds in the summer of 2008. Opera will be using border-image from version 10.5 onwards. No current version of Internet Explorer supports this code yet (see workaround at the bottom) but there are mumblings of CSS3 support for IE9 whenever that is released.</p>

<p>It can look quite a complex syntax at first and there are some important differences between border-image and all other CSS, as will be explained.</p>

<p>In this tutorial all examples of the property in action are images so that they can be viewed in any browser.</p>

<p>The important thing to remember with using images for a border is that it is not a case of just repeating the same small image but of slicing it into 9 different parts.</p>

<p>This may sound confusing so lets give you an example.</p>

<p>Here's the code for example one:</p>

<pre>

p {
border-image: url("images/border-example-image-fill.gif") 0% stretch;
-moz-border-image: url("images/border-example-image-fill.gif") 0% stretch;
-webkit-border-image: url("images/border-example-image.gif") 0% stretch;
}

</pre>

<p>Here's the image that we'll use for the border:</p>

<p><img src="http://www.suburban-glory.com/images/new/border-example-image-fill.gif" width="32" height="32" alt="First border image" /></p>

<p>And here's how the border will look when wrapped around a paragraph.</p>

<p><img src="http://www.suburban-glory.com/images/new/example-one.jpg" width="448" height="195" alt="First border-image example" /></p>

<p>It's pretty obvious what has happened here. The image has been stretched across the entire size of the element.</p>

<p>So it is possible to use border-image this way but what you really need to do – and something that other border-image tutorials elsewhere don't make clear – is <em>declare a border width</em>.</p>

<p>Lets give a second example of border-width and we'll use a different image this time.</p>

<p>Here's the code:</p>

<pre>

p {
width: 300px;
border-image: url('images/border-example-two-image.gif') 27 27 27 27 stretch stretch;
-moz-border-image: url('images/border-example-two-image.gif') 27 27 27 27stretch stretch;
-webkit-border-image: url('images/border-example-two-image.gif') 27 27 27 27 stretch stretch;
border: 10px solid black;
}

</pre>

<p>Notice in the code above I have now specified that the border will be 10px wide. I have also declared values to make sure that the border is solid and black. This is important as it means that IE will show the 10px solid black border, while the other browsers will show a 10px image border.</p>

<p>For the record note how I am using the webkit prefix for Chrome and Safari browsers and the moz prefix for Firefox. I have also used border-image straight as that is the correct CSS3 code and will be recognised by Opera 10.5 and upwards. </p>

<p>And here is the background image:</p>

<p><img src="http://www.suburban-glory.com/images/new/border-example-two-image.gif" width="64" height="64" alt="Second background image" /></p>

<p>The dimensions for this image are 64px square with nine circles 30px wide and a 1px gap around every circle. As I stated before, border-image slices the picture nine different ways.</p>

<p>And here is how the border-image looks:</p>

<p><img src="http://www.suburban-glory.com/images/new/example-two.jpg" width="380" height="263" alt="" /></p>

<p>Lets change the code a little:</p>

<pre>

p {
width: 300px;
border-image: url('images/border-example-two-image.gif') 23 23 23 23 round round;
-moz-border-image: url('images/border-example-two-image.gif') 23 23 23 23 round round;
-webkit-border-image: url('images/border-example-two-image.gif') 23 23 23 23 round round;
border: 10px solid black;
}

</pre>

<p>Notice how I now specify round instead of stretch. Look how this affects the border:</p>

<p><img src="http://www.suburban-glory.com/images/new/example-three.jpg" width="373" height="260" alt="Third border-image example" /></p>

<p>Lets take a detailed look at a line of code:</p>

<pre>

border-image: url('images/border-example-two-image.gif') 23 23 23 23 round round;

</pre>

<p>It should be stated this is the shorthand version. Look at the measurement 23 repeated four times. The is the same as the border shorthand property so each digit goes in clockwise fashion from top to right to bottom to left. So changing the third digit to 23 23 27 23 would change the bottom border only. The first instance of round dictates the style the top and bottom border and second changes the right and left border – so this a little different to other CSS.</p>

<p>The actual measurement is in pixels although you can use percentages. It's best to experiment with this as the effect of the measurement changes for different images.</p>

<p>Now I previously stated that you need to specify a border width in order for border-image to work as intended. However, not declaring a border width does produce some interesting design results.</p>

<p>Lets use the same background image as before but this time leave off a border width and change the measurements. </p>

<p>The code reads:</p>

<pre>

p {
width: 300px;
border-image: url('images/border-example-two-image.gif') 21 25 21 25 round stretch;
-moz-border-image: url('images/border-example-two-image.gif') 21 25 21 25 round stretch;
-webkit-border-image: url('images/border-example-two-image.gif') 21 25 21 25 round stretch;
}

</pre>

<p>And the border looks as so:</p>

<p><img src="http://www.suburban-glory.com/images/new/example-four.jpg" width="364" height="243" alt="Fourth border-image example" /></p>

<p>As you can see using the same image but changing the code slightly produces a radically different type of border.</p>

<p>Just recently while creating a Drupal theme I used this same technique. I used a small 4px, two colour, transparent image and here is how it looks:</p>

<p><img src="http://www.suburban-glory.com/images/new/example-five.jpg" width="487" height="378" alt="Fifth example of border-image" /></p>

<p>It created a very visually pleasing semi-transparent background style that has a lovely 3D twist in it.</p>

<p>So go armed, oh online creative, into design battle with border-image!</p>]]></description>
 <pubDate>2010-01-18T02:53:31Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">111 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[10 Chrome Extensions for Web Designers]]></title>
<link>http://www.suburban-glory.com/blog?page=110</link>
<description><![CDATA[<p>If you are using a PC for web design then it's likely that Firefox is your choice of browser while those using Mac's are more likely to use Safari. The new face in the class is Google Chrome.</p>

<p>Google already had a well-established relationship for the Mozilla Foundation so it was a complete surprise when they released their first version of Chrome for public use in 2008. It was talking point not just within the tech community but also within the mainstream media.</p>

<p>Jump through to 2010 and today Google are currently carrying out a high profile advertising campaign on billboards and in newspapers.</p>

<p>I presume that Chrome is an integral part of their forthcoming netbook OS and there can be little doubt that this is a stepping stone to releasing a Google PC OS in the future. If everyday web users like and use their browser then they are going to be more susceptible to switching to their OS when it comes onto the market.</p>

<p>Chrome is released under a BSD licence which means that the code can be incorporated not just into other Open Source projects but even into proprietary software. </p>

<p>I have though real concerns about how Google has used Open Source for this project as I'm not sure that they have done so out of principle or as a business decision. Yes, it's great that a large IT company releases their code for all to use but at the same time they are a corporation that makes billions of dollars profit every year – they have the means to pay those that contribute to their software projects an appropriate commercial rate.</p>

<p>In December 2009 Google announced that its extension repositary was now open to Beta users on the Windows platform. As of date there are 1,525 free extensions available for Chrome users to install and use.</p>

<p>For us Firefox users, the Firebug addon and the Web Developer toolbar are essential aids in our everyday design and development work. It would be impressive feat for Chrome to equal these comprehensive offerings let alone beat them.</p>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/fbmlldeibipeppiabbdjajcneipfbocm">Chrome Web Developer Tools</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/chrome-web-developer-tools.jpg" width="630" height="250" alt="Chrome Web Developer Tools Extension Screenshot" /></p>

<p>
If this third-party extension is supposed to be a Chrome version of the popular Firefox addon then it fails miserably. The UX is horrendous and barely readable. The functions it offers to web designers are limited but nevertheless bread and butter: validation, disabling CSS, hiding images, outline tables and showing images with an alt description. I count that Chrome Web Developer Tools offers over 40 different features.</p>

<p><span class="highlight">Score: 4 / 10. Poo pants. Avoid.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/dgmkbanfcdlllkbohlekikkgfbmkfolh">Web Developer Mini</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/web-developer-mini.jpg" width="630" height="250" alt="Web Developer Mini Chrome Extension Screenshot" /></p>

<p>
At least the interface to this extension is user-friendly. However, there are only four different functions: View source, validate HTML, validate CSS and a link to the pointless browsershots.org</p>

<p><span class="highlight">Score: 4 / 10. Solid but so basic as to be an unnecessary addition.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/bnbbfjbeaefgipfjpdabmpadaacmafkj">Firebug Lite</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/firebug-lite.jpg" width="630" height="250" alt="Firebug Lite Chrome Extension Screenshot" /></p>

<p>Firebug doesn't need much of an explanation and this is the portal of the project to Chrome. However, the inbuilt WebKit debugger is a really solid tool. Just right click on an element and then click on inspect element and you're see what I mean. I'm not aware of any Firebug Lite extensions yet.</p>

<p><span class="highlight">Score: 5/10. Firebug on Chrome has yet to find a reason to exist.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/gbkffbkamcejhkcaocmkdeiiccpmjfdi">Pendule</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/pendule.jpg" width="630" height="250" alt="Pendule Chrome Extension Screenshot" /></p>

<p>It's only on version 0.0.5, by Pendule is a solid little effort by developer christian.ubu. The UX is fantastic, and although the options are minimal compared to Firefox's Web Developer Toolbar, at least it shows promise</p>

<p><span class="highlight">Score: 6/10. It's not always necessarily about size but what you do with it.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/dapjbgnjinbpoindlpdmhochffioedbn">BuiltWith Technology Profiler</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/builtwith-technologry-profiler.jpg" width="630" height="250" alt="BuiltWith Technology Chrome Extension Screenshot" /></p>

<p>If you've looked at a webpage and wondered “How did they manage to do that?” then this extension is for you. It will tell you what analytical tracking system they use, their Javascript library, server information; P3P policy, if any; advertising system and document information including which version of HTML and meta text.</p>

<p><span class="highlight">Score: 8/10. Impressive.</span></p>

</div>


<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/hehijbfgiekmjfkfjpbkbammjbdenadd">IE Tab</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/ie-tab.jpg" width="630" height="250" alt="IE Tab Chrome Extension Screenshot" /></p>


<p>This allows users to switch from Chrome to Internet Explorer and back again without having to actually open the IE browser. It crashed when I tried it but it's okay apart from that one incident. It seems to render in IE version 7.</p>

<p><span class="highlight">Score: 7/10. A one trick pony but it does what it says on the label.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/hmdcmlfkchdmnmnmheododdhjedfccka">Eye Dropper</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/eye-dropper.jpg" width="630" height="250" alt="Eye Dropper Chrome Extension Screenshot" /></p>


<p>Every web designer needs some sort of colour finder tool. I use the standalone application Pixie but this will do the job just as well.</p>

<p><span class="highlight">Score: 7/10. Colour-tastic.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/kkelicaakdanhinjdeammmilcgefonfh">Window Resizer</a></strong></p>


<p><img src="http://www.suburban-glory.com/images/new/window-resizer.jpg" width="630" height="250" alt="Windows Resizer Chrome Extension Screenshot" /></p>


<p>This is an essential tool for checking your work on different sized monitors. </p>

<p><span class="highlight">Score: 7/10. Works fine.</span></p>

</div>

<div class="extension-unit">

<p><strong><a href="https://chrome.google.com/extensions/detail/aonjhmdcgbgikgjapjckfkefpphjpgma">MeasureIt!</a></strong></p>

<p><img src="http://www.suburban-glory.com/images/new/measureit.jpg" width="630" height="250" alt="Measureit! Chrome Extension Screenshot" /></p>


<p>Allows you to measure any item on the page. Could be useful although this type of function should be a part of a larger web designer tool rather than on its own.</p>

<p><span class="highlight">Score: 6/10. You could easily live without this.</span></p>

</div>

<div class="extension-unit">

<p><a href="https://chrome.google.com/extensions/detail/ognampngfcbddbfemdapefohjiobgbdl">Speed Tracer (by Google)</a></p>

<p><img src="http://www.suburban-glory.com/images/new/speed-tracer.jpg" width="630" height="250" alt="Speed Tracer Chrome Extension Screenshot" /></p>


<p>I presume this must have been a Google engineers' tool that they have opened up for public use. It took me a while to get it working and in the end I had to download and use the developer version of Chrome rather than the beta, however this will be of interest to the students of the burgeoning discipline of frontend engineering. Explaining the features of this extension would take an article in itself</p>

<p><span class="highlight">Score: 9/10. Mighty impressive.</span></p>


</div>


<p>As a signing off note though I would recommend, as I mentioned before, using the inbuilt Chrome inspector as it's very comprehensive and useful. That in itself is worth playing around with but whether it will make you ditch Safari or Firefox for Chrome is a different matter.</p>

<p>Have you found a Chrome extension that you would recommend to others? If so, fill in the comment form below.</p>

<p>-----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-chafford-one-hundred.html">Chafford One Hundred Web Design</a></p>]]></description>
 <pubDate>2010-01-15T02:51:45Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">110 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The internet 10 years ago this month – January 2000]]></title>
<link>http://www.suburban-glory.com/blog?page=109</link>
<description><![CDATA[<p>It's easy to forget how much the World Wide Web has progressed over the last decade and how seamlessly it has blended in with our everyday activities, but exactly 10 years ago – in the UK at least – all online activity was via dial-up metered access (per minute billing), the most cutting edge browser on the market was Internet Explorer 5 and the main operating system was Windows 98.</p>

<p>If any old folk ever attempt to lecture you on how fun and exciting the internet was in the 1990s then I give you permission to poke them in their eye with your iPhone. </p>

<p>It was so crap that <a href="http://www.youtube.com/watch?v=-9GoPU79GEQ&amp;feature=player_embedded">comedians Adam and Joe parodied the experience in this sketch to be found on YouTube</a></p>

<p>Fast forward to the present day and BT have recently announced that by 2012 over 30% of us Brits will have access to download speeds of over 40Mbps  – an increase of a factor of 731 on 2000s 56 kbit/s maximum speed.</p>

<p>With such a jump in data transfer speeds and a noticeable increase in software quality and hardware power, the web today is a far more attractive place to spend time on. At least your friends and family can call you when you are logged-on, with the old dial-up they would only hear an engaged tone if they called while you were surfing (ha! that's an old term) as one form of communication would cancel out the other by blocking the line.</p>

<h3>The Millennium Bug that didn't happen</h3>

<p>When we did eventually wake up on January 1, 2000 after celebrating like it was 1999 on the previous night, we found that our entire information technology infrastructure hadn't collapsed at the stroke of midnight as supposedly would happen after the Millennium Bug kicked in.</p>

<p>Unless you were blind, death and dumb you would not have escaped alarmist media conjecture throughout 1999 that the Millennium Bug – also known as Y2K – would send our electronic systems crashing due to a common software date bug. </p>

<p>In fact, other than Percy's Office Supplies PC on Nuneaton High Street crashing absolutely nothing happened. The strangest fall out from this was the complete lack of debate about the Y2K flop afterwards and nobody asked why millions of government pounds had been spent combating a non-threat.</p>

<h4>Dreamweaver 3 and ronsangels.com</h4>

<p>In design software terms, matters were quite limited.</p>

<p>It may be hard to believe but once upon a time web designers were eagerly awaiting for Dreamweaver 3 to be released. Reviewer Karl Hodge from <a href="http://www.netmag.co.uk/">Net magazine</a> wrote:</p>

<blockquote><p>
“From an early look at Dreamweaver 3, Macromedia seems set to blow away the competition once again with an application that builds Dreamweaver's famed ease of use, power and flexibility”.
</p></blockquote>

<p>Elsewhere what we now call link bait was then called a scam. <a href="http://www.ronsangels.com/index2.html">Ronsangels.com</a> announced that it was planning to start selling the ovum of choice from a selection of stunning models by auction. Starting at offers of $9,000, punters could bid on the egg of their choice. But ronsangels.com was only interested in signing up users to its porno service and no eggs were for sale. </p>

<p>Over 5,000 articles and 500 television stations worldwide were to feature Ron's Angels leading to sales of $39.2 million over the next five years.</p>

<p>[If you are looking for a web designer in east London then please visit <a href="http://www.suburban-glory.com/areas/stratford.html">Stratford web design</a>]</p>

<h5>The Dot Com bubble: boom and bust</h5>

<p>But the real big story of 2000 was the dot com bubble and implosion as new technology stirred the selfish money genes of both the venture capitalists and the old moneyed interests. </p>

<p>Here's how things looked at the beginning of the year, as the news reader says in her introduction: “The new economy – is it a boom without an end?”. Ha ha!</p>

<p><strong>YouTube: CNN Special Report on dot.com Bubble 1999</strong></p>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/bUwu5CiESbc"><param name="movie" value="http://www.youtube.com/v/bUwu5CiESbc"></param><!--[if IE]><embed src="http://www.youtube.com/v/bUwu5CiESbc"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<p>And here's how things looked after the boom:</p>

<p><strong>YouTube: Dot-Com Bust Lessons Learned from Silicon Valley</strong></p>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/_NTwB2uJho0"><param name="movie" value="http://www.youtube.com/v/_NTwB2uJho0"></param><!--[if IE]><embed src="http://www.youtube.com/v/_NTwB2uJho0"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<p>At the heart of the bubble was the disastrous $164 billion merger between Time Warner and AOL. It was supposed to be a corporate coming together that showed how the entertainment industry could straddle the old and new economies, and it appeared to make commercial sense as after all AOL had 27m subscribers in the US and had announced profits of $1.2bn in the previous year, while Time Warner had the second largest US cable system and owned the Warner Bros film studio amongst much else.</p>

<p>One of reasons for the merges flop was that AOL Time Warner were dependent on dial-up subscribers in a time when internet users would increasingly flock to broadband.</p>

<p><a href="http://marketplace.publicradio.org/display/web/2009/05/28/pm_time_warner/">Richard Morgan</a>, journalist on The Deal magazine, reflected 10 years later: </p>

<blockquote><p>
“Back then a lot of people were drinking the Kool-Aid about the "new economy." When they announced that they were going to create the deal of the century, they put the value at $166 billion. Today, the market cap of Time Warner, which contains AOL, is only $28 billion. So that's a loss that's greater than 80 percent.”
</p></blockquote>

<p>The then CEO of Time Warner, Jerry Levin, was to confess: </p>

<blockquote><p>
“I presided over the worst deal of the century. I guess it's time to say I'm really very sorry”.
</p></blockquote>

<p>The figures that litter the history of the dot com boom are eye watering. Freeserver was an arm of electrical goods retailer Dixons, and appeared to be a roaring success. Launched in 1999, by the summer of 2000 they had 2 million subscribers, dwarfing BT's mere 400,000. After being floated on the stock market they were valued at £9 billion, more than Dixons and even many British banks. But Freeserver never made any profits in 2000 and by the year's end their share price had fallen below the £1.50 issue price.</p>

<p>As the Freeserver story illustrates, it wasn't just Silicon Valley that went dot com crazy. In July 2000 UK company boo.com folded after spending £90 million in its first year. Boo.com was a fashion retailer and failed because according to net magazine:</p> 

<blockquote><p>“Web sites miss their predicated launch dates by a few days or weeks, but Boo launched six months after its initial blaze of media attention. When it arrived, the site was unworkable, with an over-ambitious design that strained users' attention.”</p></blockquote>

<p>Ray Taylor, MD of on-line media agency eyeeconomy was equally aghast: </p>

<blockquote><p>
“The major reason for the failure of [boo.com] is clearly, emphatically, and without doubt the lack of cost control. This seems to me obvious, given the rate at which is burnt it's investors' money”.</p></blockquote>

<p>Many technology-based share prices shot to the outer financial reaches and then nose dive down again: InfoSpace was $1,305 per share in March 2000, but only $22 a share one year later; eToys reached a high of $88 per share and then went bankrupt in February 2001; theGlobe.com shrank from $97 per share to less than 10 cents.</p>

<p>And during the dot com boom when anybody questioned the viability of the technology expansion responders muttered about a “new paradigm” that meant that profits were optional and no longer the bottom line, and when it was all over commentators and economists were queuing up to tell the world that they had personally prophesied its downfall despite their previous tacit or open approval.</p>

<p>Some companies from Web 1.0 survived - Amazon, eBay and Lastminute.com being a few notable exceptions; but most crashed and burned.</p>

<p>You ever want to watch a great documentary on the dot com fiasco then I recommend startup.com. Here's a trailer: </p>

<p><strong>YouTube: startup.com trailer</strong></p>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/eoecCTun1qI"><param name="movie" value="http://www.youtube.com/v/eoecCTun1qI"></param><!--[if IE]><embed src="http://www.youtube.com/v/eoecCTun1qI"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<p>------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-forest-gate.html">Forest Gate Web Design</a></p>]]></description>
 <pubDate>2010-01-12T10:00:08Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">109 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Absolutely terrible spelling on legal website]]></title>
<link>http://www.suburban-glory.com/blog?page=108</link>
<description><![CDATA[<p><a href="http://www.connellassociates.co.uk/">Connell Associates Solicitors</a> have been in existence for some years now I presume that they are not a Mickey Mouse outfit as they are members of the Law Society; however, their grasp of the English language on their homepage is so appalling that any prospective client looking at their website would run a mile from any service they offer. </p>

<p>I count 11 separate spelling mistakes in their introduction, apparently: “Through incsive action, experience and our proximity to the UK's fatest court we achieve this with speed and efficiency. ”</p>

<p>In fact the spelling is so bad that I wonder if it is some sort of screwed up link bait attempt!</p>

<p>If by the time you read this article they have bothered to spend five minutes proof reading their text then here is their offending attempt at communication for you all:</p>

<blockquote>
<p>
Connell Associates is a specialist commercial litgation pratce. Our objective is qute simply to deliver results. Through incsive action, experience and our proximity to the UK's fatest court we achieve this with speed and efficiency.</p>

<p>In commercal litgation cases the financial impact on a client’s business is our priority. Whether involved in a straghtforward debt recovery procedure or a lengthy contract dispute we understand that the results need to be cost effective.</p>

<p>All pees at Connell Associates are relative to the aim, earing any case from a minor to a six-figure dipute will remain worthwhile pursuing. Our regional position guarantees you highly competitive rates whilst maintaining the services you would expect from a top legal.</p>

<p>We operate assertively to ensure the best results are obtained for our client. Focusing on a particular area of litgation gives us a competitve edge.</p>

<p>We invite you to take and commercial astuteness within the commercial litgation sector.</p>
</blockquote>

<p>------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-beckton.html">Beckton web design</a></p>]]></description>
 <pubDate>2010-01-10T09:20:54Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">108 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Choosing the right web hosting provider for your business]]></title>
<link>http://www.suburban-glory.com/blog?page=106</link>
<description><![CDATA[<p>Choosing the right web hosting company is an important decision. Often, it also the most neglected aspect of the digital economy as companies and individuals are eager to publish their website but not so keen to read the small print of a hosting contract.</p>

<p>But it is an aspect that companies ignore at their peril as server problems lead directly to a loss of income.</p>

<p>Doug Kaye, one of the very few authoritative authors on this subject writes: </p>

<blockquote><p>"Unlike other decisions one has to make in the course of getting and keeping a business online, the selection of a hosting or management vendor is very high risk. In particular, the cost of making the wrong decision can be great. For many new-economy businesses, their web sites are their business. If the site is down, so are they”</p></blockquote>



<p>Kaye recommends the following means for accurately working out loses due to a server outrage. His formula reads: </p>

<p><em>Revenue loss = annual revenues x length of outrage (in hours) x 0.014  x multiplier.</em></p>

<p>The 0.014 is an hourly percentage of the total number of hours in the year, 8,769. The multiplier is a figure between 0.028% and 0.14% and is dependent on the level of loss of customer goodwill and cascading losses.</p>

<p>For instance, if a company with $1m annual revenues has a website downtime of 3 hours in the run up to Christmas, then the significant knock-on effects could cost them $2,940.</p>

<p>Every hosting company will give you an uptime figure, which is the business is called "The Nines" due to the calculation system.</p>

<p>A company may declare a 98% uptime but this means 3 hours and 22 minutes without a functioning website per week. The server needs to ideally have an uptime of 99.9% or more and this must be written as a guarantee in the contract. This will mean that the most the website is down in the course of a whole week is 10 minutes and 5 seconds.</p>

<p>For your information, "The Nines" and actual time figures are:</p>

<table border="1"><tr><th>Uptime % level</th>
<th>Downtime per year</th>
<th>Downtime per week</th>
</tr><tr><td>98.0000%</td>
<td>7.3 days</td>
<td>3h, 22m</td>
</tr><tr><td>99.0000%</td>
<td>3.65 days</td>
<td>1h, 41m</td>
</tr><tr><td>99.9000%</td>
<td>8h, 45m	</td>
<td>10m, 5s</td>
</tr><tr><td> 99.9900%</td>
<td>52.5m	</td>
<td>1m</td>
</tr><tr><td>99.9990%</td>
<td>5.25m	</td>
<td>6s</td>
</tr><tr><td>99.9999%</td>
<td>31.5s	</td>
<td>0.6s</td>
</tr></table><h3>Shared, virtual and dedicated hosting</h3>

<p>When it comes to the different categories of web hosting there are three types: shared, virtual and dedicated.</p>

<p>In order to highlight the benefits of any of these three services lets create a hypothetical company. </p>

<p>You are a relatively small business that has just relaunched its online ecommerce site. You have 3000 live registered customers and a further 3000 that are not registered. The site is visited 200 times per hour.</p>

<p>As you are spending money on a redesign you are also investing in site promotion and expect a steady increase in customers over the next couple of years.</p>

<p>There is the possibility that you can own your own hardware and have complete control over the hosting yourself, but the expertise needed for this endeavour means that the vast majority of online businesses are happy to go down the outsourcing route.</p>


<p><strong>Shared servers:</strong> This is how most of the worlds websites are hosted. They are cheap because dozens if not hundreds of websites share the same harddrive resources. They are best suited for small websites as they tend to only be able to offer limited resources such as disk space, bandwidth and memory. The advantages of a shared server is the cost, while the disadvantages are that you are competing with hundreds of other websites for limited resources. If you have a traffic spike it is likely that your website will grind to a halt.</p>

<p><strong>Virtual servers:</strong> Virtual server packages come from partitioned servers. Because they share the same hardware, maintenance costs can be distributed across a number of customers. Due to multiple clients running on a single server there are RAM and disk space limitations but they are typically far more generous then that found on a shared server. Because virtual servers have their own independent operating system this allows the user root access which is indispensable when it comes to fine tuning a website for speed and reliability.</p>

<p><strong>Dedicated servers:</strong> This allows you to rent a whole server and not be obliged to share it with anybody else. This is reflected in the cost of most commercial packages. Due to unshared resources this option is best for the large sites that have considerable numbers of visitors.</p>

<p><strong>Managed servers:</strong> Your website will be using technology that needs performance and security updates on a regular basis. Your can hire virtual and dedicated server space and take on the responsibility of this yourself but you will need to dedicate trained members of staff to undertake these technical responsibilities. The alternative is to pay for managed servers. </p>

<p>Leading hosting company <a href="http://www.modvps.com/fully-managed.php">modVPS</a> promises:</p>

<blockquote><p>"ModVPS will monitor your VPS around the clock 24 hours a day 365 days a year. If we find any service including http (Apache), mySQL, DNS, SMTP, IMAP, POP failed we'll login to your VPS and restart it as necessary and if required reboot your VPS to get it back up and running without you having to worry about your VPS being offline at 3am.”</p></blockquote>



<p>Can you provide staff that will keep look after the site 24 hours a day 365 days a year? If the answer is no then a managed server is your only option.</p>

<p>Another aspect of hosting is that it is probably best looking to rent server space in the dominion where your business is conducted. Author and frontend engineer Steve Souders states that large geographic distances between the server and the user could lead to a 20% difference in page load times, which is why the largest companies distribute their website using a Content Delivery Network.</p>


<p><a href="http://www.getelastic.com/every-second-counts-how-website-performance-impacts-shopper-behavior">Recent statistics</a> have revealed that 52% of online shoppers stated that quick page loading is important to their site loyalty and over half of all shoppers expecting a page load time of 2 seconds or less - a drop from 8 seconds in 1999.</p>

<p>Admittedly, server reliability is only one factor in page load times but it is still an aspect that needs attention.</p>

<p>Getting back to our ecommerce example. For this moderately sized online business, it would seem that the best option here is a managed virtual server. It gives the flexibility for growth and bandwidth spikes and is extremely cost effective. </p>

<p>When you sign up with a web hosting company they will present to you their Service Level Agreement (SLA). Read this thoroughly and ask the company questions about any or all of it.</p>

<p>It should be noted that when it comes to getting the most out of a SLA it may be worth using the services of one of the many internet law firms in existence. However, the following questions should help you in judging the worth of a web hosting package:</p>

<ul><li>
It should be clear on their website but make sure you clarify what their disk space, monthly transfer and guaranteed memory (RAM) is.
</li>
<li>
Do they have 24 hour, 7 days a week support?
  </li>
  <li>
How long will it take them to respond to technical support requests? A few minutes, ideal; a few hours, okay for shared but not for dedicated; a day or more, go elsewhere.
  </li>
  <li>
Is it easy to upgrade the RAM or harddrive size if the site outgrows its current virtual server?</li>
  <li>
What is the guaranteed uptime level of the server?
  </li>
</ul><p>-----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-manor-park.html">Manor Park Web Design</a></p>]]></description>
 <pubDate>2010-01-07T07:32:01Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">106 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[10 fantastic examples of Drupal used on major web sites]]></title>
<link>http://www.suburban-glory.com/blog?page=105</link>
<description><![CDATA[<div class="major-drupal-sites">
<p>In the autumn of 2009 the open source community was stunned when it was announced that the <a href="http://radar.oreilly.com/2009/10/whitehouse-switch-drupal-opensource.html">White House  was to relaunch on a Drupal platform</a>.</p>

<p>Clearly, it was a milestone not just for Drupal but for all those working on the countless open source projects. </p>

<p>But Drupal hasn't just conquered the internet real estate space of 1600 Pennsylvania Avenue, but also many major business and governmental hubs across the world. Below are just 10 of these.</p>

<p><strong><a href="http://www.queenrania.jo">Queen Rania of Jordon</a></strong></p>

<p>University-educated and former banker Queen Rania has taken an active interest in many philanthropic causes including inter-faith dialogue, UNICEF campaigns and environmentalism.</p>

<p>In a Middle Eastern society where women have traditionally played secondary roles to men, Queen Rania's articulate and out-spoken support for social and political causes remains an unusual example.</p>

<p>For some years the Queen of Jordan has recognised the importance of using the internet as a communication tool and has a lively presence on <a href="http://www.youtube.com/QueenRania">YouTube</a>, <a href="http://www.facebook.com/QueenRania">115,688 fans on Facebook</a> and <a href="http://twitter.com/QueenRania">1,169,359 Twitter followers</a>.</p>

<p>It seems only natural that somebody so concerned with cutting edge technology should chose Drupal. This website is a good example of integrating Flash with the CMS.</p>

<p><a href="http://www.queenrania.jo" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/queen-rania-small.jpg" width="500" height="268" alt="Website of Queen Rania of Jordon" /></a>  </p>


<p><strong><a href="http://www.grammy.com/">The Grammy Awards</a></strong></p>

<p>The Grammy's are America's main award music award programme that was started in 1958 by the National Academy of Recording Arts and Sciences.</p>

<p>Former winners from the last 50 years read as a Who's Who of post-war mainstream US chart success.</p>

<p>There can be little doubt, as the former lead singer of Tool once said that “the Grammys are nothing more than some gigantic promotional machine for the music industry... It's the music business celebrating itself. That's basically what it's all about.” But still, what they lack in street cred they make up in corporate big bucks.</p>

<p>Grammy.com was the work of leading commercial Drupal specialists <a href="http://www.lullabot.com/">Lullabot</a>.</p>

<p><a href="http://www.grammy.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/grammys-small.jpg" width="500" height="265" alt="Website of the Grammy Awards" /></a></p>

<p><strong><a href="http://www.monarchie.be/">Albert II, King of the Belgian</a></strong></p>

<p>The Belgium Royal Family is an oddity in Europe in that their reign only commenced relatively recently, in 1831 in fact. In the previous year the southern provinces had bloodily succeeded from the United Kingdom of the Netherlands, creating an independent Kingdom of Belgium. Deciding on a constitutional monarchical system of government the leaders of the new Belgium state asked the House of Saxe-Coburg and Gotha to rule.</p>

<p>This site is quite conservative in design but I guess this is a reflection of the subject matter.</p>

<p>There are rumours that the Belgium government are working on switching over all their sites to Drupal.</p>

<p>Enjoy the site but whatever you do don't mention the Congo! They're a little sensitive on that subject ;)</p>

<p><a href="http://www.monarchie.be/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/king-of-belguim-small.jpg" width="500" height="275" alt="Website of Albert II, King of Belgium" /></a></p>


<p><strong><a href="http://pythonline.com/">Monty Python</a></strong></p>

<p>Old comedians never die, they just fade away; and to prove that point here is the official Monty Python website waving the flag of surrealism 40 years after the series begun.</p> 

<p>If are looking for a CMS that allows full participation by registered members then without doubt Drupal is the software solution for you, as the tagline “community plumbing” suggests it really is the ideal CMS for a service with a large, active membership base. To see how this plays in action  have a flick through the Monty Python site.</p>

<p><a href="http://pythonline.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/monty-python-small.jpg" width="500" height="267" alt="Official website of Monty Python" /></a></p>

<p><strong>The BBC</strong></p>

<p>The British Broadcasting Corporation is arguably the biggest and most respected media outlet in the world, and they have used Drupal on a number of sites including their <a href="http://www.bbcmusicmagazine.com/">music magazine</a>, their <a href="http://www.bbchistorymagazine.com/">history magazine</a> and their <a href="http://www.bbcfocusmagazine.com/">science and technology site for Focus magazine</a>.</p>

<p>These provide good examples of how an online presence built on Drupal can blend seamlessly with the parent print version.</p>

<p><a href="http://www.bbcmusicmagazine.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/bbc-music-small.jpg" width="500" height="266" alt="Website of the BBC Music magazine" /></a></p>

<p><strong><a href="http://www.ericclapton.com/">Eric Clapton</a></strong></p>

<p>Back in the 60s Eric was the don of the guitar, only (a reluctant) second to Jimi Hendrix. Graffitti across London read: “Clapton is God”.</p>

<p>Starting in Sixties R'n'B bands The Yardbirds and John Mayall &amp; the Bluesbreakers, he peaked with the power trio Cream who achieved adulation and commercial success on both sides of the Atlantic. Even today, songs such a Badge and White Room have enough ferocity and velocity to kick most contemporary music into touch.</p>

<p>But even God needs a website and ericclapton.com offers both an historic run down of his long career as well as current tour dates for old slowhand.</p>

<p>
<a href="http://www.ericclapton.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/eric-clapton-small.jpg" width="500" height="269" alt="Website of Eric Clapton" /></a></p>


<p><strong><a href="http://www.direct.gov.uk/en/index.htm">British government</a></strong></p>

<p>This clean attractive design is built on a Drupal site. From here you should be able to find about further details on most sections of the British section including benefits, education, transport and pensions.</p>

<p>In keeping with a government site direct.gov.uk is focused on full accessibility for all.</p>

<p><a href="http://www.direct.gov.uk/en/index.htm" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/british-government-small.jpg" width="500" height="271" alt="Website of the British government" /></a></p>

<p><strong><a href="http://robbiewilliams.com/">Robbie Williams</a></strong></p>

<p>Admittedly, there's a lot, lot more in my life that takes a priority for me than listening to the cheeky chappie musical banter of Robbie Williams, ex member of leading 90s boy band Take That; but respect goes to the crooner for using Drupal. (Note to Robbie: hire yourself a new web designer).</p>

<p><a href="http://robbiewilliams.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/robbie-williams-small.jpg" width="500" height="267" alt="Website of Robbie Williams" /></a></p>

<p><strong>Stanford University</strong></p>

<p>Established in 1891 by United States Senator and former California governor Leland Stanford, this university is today one of the leading further education institutions in the world.</p>

<p>With an estimated endowment of over $12billion, it's hardly like they are short of a bob or two to pay for a proprietary CMS, but these boffins love Drupal. </p>

<p>They love it so much that they have used it for <a href="https://techcommons.stanford.edu/topics/drupal/sites-using-drupal-stanford">67 different sites and counting</a> including the <a href="http://shc.stanford.edu/">Stanford Humanities Centre</a>, <a href="https://humbio.stanford.edu/">The Program in Human Biology</a> and <a href="https://techcommons.stanford.edu/">Standford Tech Commons</a>. </p>

<p>Go boffin kids, go!</p>

<p>
<a href="http://shc.stanford.edu/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/stanford-small.jpg" width="500" height="270" alt="Webiste of Standford University" /></a>
</p>


<p><strong><a href="http://www.mattel.com/">Mattel</a></strong></p>

<p>If you have ever owned a Cabbage Patch Kid, a Barbie doll or a Matchbox car then you will be familiar with the multinational toy manufacturer Mattel.</p>

<p>In September 2009 they relaunched their online presence with the help of Drupal, and what an explosion of juvenile fun mattel.com is!</p>

<p><a href="http://www.mattel.com/" class="outgoing">
<img src="http://www.suburban-glory.com/images/new/mattel-small.jpg" width="500" height="270" alt="Website of Mattel" /></a></p>

</div>

<p>-------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-barking.html">Barking Web Design</a></p>]]></description>
 <pubDate>2009-12-30T13:39:27Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">105 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Tips to speed up your website performance]]></title>
<link>http://www.suburban-glory.com/blog?page=104</link>
<description><![CDATA[<p>Optimisation for quicker web page speed will be <span class="italic">the</span> talking point in the web design community in 2010. In November Google declared it a central issue for webmasters after spokesman Matt Cutts announced at an SEO conference that Google will change its algorithm in the near future:</p>

<blockquote><p>
"Historically, we haven't had to use it in our search rankings, but a lot of people within Google think that the web should be fast. It should be a good experience, and so it's sort of fair to say that if you're a fast site, maybe you should get a little bit of a bonus. If you really have an awfully slow site, then maybe users don't want that as much."<br />
(Source: <a href="http://www.webpronews.com/topnews/2009/11/13/google-page-speed-may-be-a-ranking-factor-in-2010">href="http://www.webpronews.com/topnews/2009/11/13/google-page-speed-may-be-a-ranking-factor-in-2010"
</a>)</p></blockquote>

<p>And to bring this point into focus for all webmasters <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=158541&amp;hl=en">a new feature called site performance</a> was launched as part of their Webmaster Tools section and which lists average download times for registered websites.</p>

<p>Not only is Google making this an issue that requires attention but usability data tells how response times expectations have increased over the years. According to <a href="http://www.getelastic.com/every-second-counts-how-website-performance-impacts-shopper-behavior/">a report by  Forrester Research</a> two seconds is now users' threshold page acceptable download level. Amazingly, even speed differences of 100 milliseconds can adversely affect user behaviour (Source: <a href="http://code.google.com/speed/files/delayexp.pdf">http://code.google.com/speed/files/delayexp.pdf</a>) </p>

<p>Leading frontend engineer Steve Souders states that at least 80% of page load times are down to non-HTML factors. As a case study, I decided to redesign a site I own – rss001.com – to bring a number of speed-enhancing factors into play. RSS 001 is a feed directory that I launched in the spring. As it is just about to reach 10,000 unique visitors per month and with the potential for traffic to dramatically increase in 2010, I thought it was a good site to optimise for speed.</p>

<p>Below are some points to take into consideration.</p>

<p><span class="bold">Keep your CSS basic and tight</span></p>

<p>I'm sure you are all writing good quality CSS code by which I mean that you are only using one id selector in the property list. You can use as many classes as you want in the property list but the less the better. Try to limit the number of descendent selectors.</p>

<p>The jury is out on how much of a difference shorthand properties make to load times but I always use them as a matter or routine anyway as they make for a more cleaner CSS code page. I use shorthand properties as I work and then go back and refector the code after I have finished the design.</p>

<p>Other CSS aspects to take note of:</p>

<ul><li>
If you are writing for speed it is best to avoid the use of the :hover pseudo-selector on non-anchor elements. This reputedly cases problems in IE 7 and 8 when a strict doctype is used.
</li>
<li>
Use CSS sprites as this will reduce the number of server requests. For further information read the guide at w3schools.com: <a href="http://www.w3schools.com/css/css_image_sprites.asp">http://www.w3schools.com/css/css_image_sprites.asp</a>
</li>
<li>
Avoid using the * selector to reset the stylesheet as this can add up to two seconds on the download time. (If this was Wikipedia I would provide you reference for that, but it's not, so I won't. There is an article out there somewhere that goes into detail on this subject – Google it).
</li>
<li>
It has been stated that using some advanced CSS selectors has an impact on performance. I'd like to see some hard facts backing this argument up but I avoided using attribute and child selectors as well as CSS 3 structural pseudo-classes when redesigning rss001.com.
</li>
</ul><p><span class="bold">Minify JavaScript and CSS</span></p>

<p>Removing unnecessary white space and comments creates a leaner CSS or JavaScript file. You can do this manually but it would be a very tedious and error-prone endeavour. If you are using a reputable CMS then the core files or a third-party module will give you the ability to do this automatically. If you are handcoding then take a look at the <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a> and the <a href="http://code.google.com/p/minify/">Minify PHP-based project</a> at Google code.</p>

<p><span class="bold">Keep CSS and JavaScript in one file</span></p>

<p>No, not in the same file – but one file each for CSS and JavaScript. This reduces the number of server requests down to a minimum.</p>

<p><span class="bold">Put JavaScript at the bottom</span></p>

<p>Placing JavaScript in the head will cause a page download delay in some browsers as all of the other content underneath has to wait until the JavaScript file has been fully downloaded. Placing the JavaScript at the bottom of the page prevents this from happening. This is fine as long as you are not using JavaScript to assist or create your page layout. (Note: DO NOT put CSS at the bottom. Keep that in your head)</p>

<p><span class="bold">Use Gzip compression</span></p>

<p>Using Gzip can dramatically shrink the size of a file by as much as two thirds. Apache uses mod_gzip and mod_deflate modules for versions 1.3 and 2.x respectively. Again, any decent CMS will give the administrator easy access to turning on Gzip, but if you are handcoding then read the Apache online documentation: <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html">http://httpd.apache.org/docs/2.0/mod/mod_deflate.html</a></p>

<p><span class="bold">Add an expires header</span></p>

<p>This tells the users' browser how long to keep images and files in the browser cache. Yahoo recommends to set this for a month. Explaining expires header is an article in itself so please read your CMS documentation or read the <a href="http://developer.yahoo.com/performance/rules.html#expires">Yahoo</a> or <a href="http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching">Google guide to browser caching</a>.</p>

<p><span class="bold">Ration your third-party modules</span></p>

<p>CMSs like Wordpress and Drupal have thousands of third-party modules listed. There is a temptation to act like a child given free run in a sweetshop and to download and use as many as possible. Look at all the modules you have installed and ask yourself the question, “Do I really need this? Does this provide something vital to either the user or the administrator experience?” I can can guarantee that you'll find at least one module where the answer will be no. Removing the module would not only remove unnecessary dynamic code that could include database calls, but may also remove unnecessary JavaScript or CSS that comes with the module.</p>

<p><span class="bold">Cut down the size of you images.</span></p>

<p>When it comes to saving images for the web when using Photoshop think carefully what purpose the image is going to serve on the website. Few images require the close attention of users and are only there for decoration; if this is the case then keep the quality of the file down to a minimum.</p>

<p>Try to stick to 8 bit PNGs as 24 and 32 bit PNGs can really be quite hefty in size. If you do use 32 big PNGs for its alpha transparency then you'll run into the usual IE6 problems. Avoid using the AlphaImageLoader filter to fix the problem as it will really cause the download to lag in IE6. As an alternative take a look at the <a href="http://plugins.jquery.com/project/pngFix">jQuery PNG Fix</a>.</p>

<p>Once you have you finished images then run them through Yahoo's free service, <a href="http://developer.yahoo.com/yslow/smushit/index.html">Smush It</a>. This Yahoo application is wonderful. It utilises a number of command line tools such as Pngcrush and Gifsiclef and allows the user to shrink images without loss of quality. Smush It is now integrated with the <a href="http://developer.yahoo.com/yslow/">YSlow Firebug plugin</a>.</p>

<p>So after its redesign and optimisation how does RSS 001 perform? Using the <a href="http://www.websiteoptimization.com/services/analyze/">Web Page Analyzer</a> it is possible to quantify the page  download time as 20.41 seconds on a 56K connection. Okay, so the vast majority of internet users in the Western world use broadband but it is a useful comparison metric. RSS 001 is positioned third in the following speed league: </p>

<p>Craiglist: 4.77 seconds;<br />
Google: 4.82 seconds;<br />
RSS 001 : 20.41 seconds;<br />
24 ways: 39.35 seconds;<br />
Net magazine: 60.49 seconds;<br />
Smashing Magazine: 107.67 seconds<br />
The Guardian: 146.25 seconds;<br />
SEOmoz: 156.76 seconds;<br />
BBC News: 164.15 seconds;<br /></p>

<p>-------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-newham.html">Dagenham Web Design</a></p>]]></description>
 <pubDate>2009-12-21T08:05:00Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">104 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Phantom Menace film review on YouTube]]></title>
<link>http://www.suburban-glory.com/blog?page=103</link>
<description><![CDATA[<p>I never ever thought I'd write this but I recommend you watch a 70 minute review of the Phantom Menace on YouTube. Yes, 70 minutes! Yes, the Phantom Menace!</p>

<p>The Phantom Menace was the Star Wars story brought back to life by George Lucas in 1999.</p>

<p>It had a lukewarm reception by the critics who no doubt held out hope for a return to form with any subsequent film episodes. </p>

<p>If the like the aggressive review style of Charlie Brooker, then you'll like this. </p>

<p>Below is the first part of seven:</p>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/FxKtZmQgxrI"><param name="movie" value="http://www.youtube.com/v/FxKtZmQgxrI"></param><!--[if IE]><embed src="http://www.youtube.com/v/FxKtZmQgxrI"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object> </p>]]></description>
 <pubDate>2009-12-19T11:33:27Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">103 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Protecting your customers' privacy]]></title>
<link>http://www.suburban-glory.com/blog?page=102</link>
<description><![CDATA[<p>Protecting users' details is a hot legal issue across Europe. As of November 2009 the European Union opened the way for the ePrivacy Directive to come into force (Source: 
<a href="http://www.computerweekly.com/Articles/2009/11/11/238579/ec-gets-tough-on-spammers-data-breachers-and-snoopers.htm">http://www.computerweekly.com/</a>)</p>

<p>The ePrivacy Directive will lead to legal clarification and restraints on the use of cookies and compulsory disclosure of privacy breaches.</p>

<p>Currently in Britain the 1998 Data Protection Act is enforced by the Information Commissioner's Office which keeps a central list of organisations and companies. From the ICO website: “The Data Protection Act 1998 (DPA) requires every data controller who is processing personal information” except:</p>

<blockquote><p>
“organisations that process personal data only for: - staff administration (including payroll); - advertising, marketing and public relations (in connection with their own business activity); and - accounts and records;” (source: <a href="http://www.ico.gov.uk/upload/documents/library/data_protection/detailed_specialist_guides/notification_handbook_final.pdf">http://www.ico.gov.uk/upload/documents/library/data_protection/detailed_specialist_guides/notification_handbook_final.pdf</a>).</p></blockquote>

<p>However, even if you not on the Information Commissioner's register you still have to respect the law, which according to their guide means you must:</p>

<ul><li>
Have legitimate reasons for collecting and using the personal data
</li>
<li>
Not use data in ways that have unjustified adverse effects on the individuals concerned
</li>
<li>
Be open and honest about how you intend to use the data, and give individuals appropriate privacy notices when collecting their personal data
</li>
<li>
Handle people's personal data only in ways they would reasonably expect
</li>
<li>
Make sure you do not do anything unlawful with the data
</li>
</ul><p>(Source: <a href="http://www.ico.gov.uk/upload/documents/library/data_protection/practical_application/the_guide_to_data_protection.pdf">http://www.ico.gov.uk/upload/documents/library/data_protection/practical_application/the_guide_to_data_protection.pdf</a>).</p>

<p>It is recommended that the exact wording of a privacy policy is created by a professional legal body so as it complies with current legislation. </p>

<p>Other than EU and UK legislation, there is also the privacy initiative called the Platform for Privacy Preferences (P3P) Project which was created by the World Wide Web Consortium (W3C), the web governing body.</p>

<p>For a privacy policy to satisfy P3P requirements the following points need to be addressed:</p>

<ul><li>
Who is collecting data?
</li>
<li>
What data is collected?
</li>
<li>
For what purposes will data be used?
</li>
<li>
Is there an ability to opt-in or opt-out of some data uses?
</li>
<li>
Who are the data recipients (anyone beyond the data collector)?
</li>
<li>
To what information does the data collector provide access?
</li>
<li>
What is the data retention policy?
</li>
<li>
How will disputes about the policy be resolved?
</li>
<li>
Where is the human readable privacy policy?
</li>
</ul><p>(Source: <a href="http://www.p3ptoolbox.org/guide/section2.shtml">http://www.p3ptoolbox.org/guide/section2.shtml</a>)</p>

<p>The idea behind P3P is that two different versions of the privacy policy are published – one for users to read and the other machine-readable. Software such as browsers can then read the policy and inform the user if a website doesn't have a suitable policy in place.</p>

<p>Although created in 2002, P3P failed to be as widely adopted as hoped for by the W3C although it is used by large multinational companies such as IBM and Adobe.</p>

<p>It is certain now that P3P will be surpassed by new privacy protection innovation, with the European Union funded Prime Life Project being a forerunner (Source: <a href="http://www.out-law.com/page-10435">http://www.out-law.com/page-10435</a>); but being associated with P3P does give extra assurance to your customers that you take such matters seriously.</p>

<p>It is important that any privacy policy is clearly linked to and not obscured from the users' attention.</p>

<ul><li>
Make sure that your privacy policy is easy to find and read and it placed on a HTML page.
</li>
<li>
Use the  <a href="http://www.alphaworks.ibm.com/tech/p3peditor">P3P Policy Editor</a> to create a machine-readable XML version in compliance with the P3P initiative.
</li></ul><p>--------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-homerton.html">Homerton web design</a></p>]]></description>
 <pubDate>2009-12-19T00:29:37Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">102 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Classic 90s garage mix]]></title>
<link>http://www.suburban-glory.com/blog?page=99</link>
<description><![CDATA[<p>I was always a drum'n'bass rather than garage man but there were some classic tracks from the 90s garage period.</p>

<p>I found the mix linked to below on a Russian site. It's worth a download and listen.</p>

<blockquote><p>
1. Dj Luck &amp; Mc Neat – A Little Bit Of Luck (Red Rose) 
2. Blazin’ Squad – Standard Flow (Dnd Remix Ft. Elephant Man) (Weighty Plates Vol.3) 
3. Zed Bias – Neighbourhood (Zed Bias Y2k Vocal Mix) (Locked On) 
4. Roots Manuva – Dreamy Days (Mj Cole Vocal Mix) (Big Dada) 
5. Sticky Feat. Tubby T – Ganjaman (Social Circles) 
6. M Dubs Ft. Lady Saw – Bump N Grind (Twice As Nice Lp) 
7. Suburban Lick – Here Comes A Lick (Locked On) 
8. Ms Dynamite Vs Jahiem – Just In Boo! (Urban Gorilla) 
9. Artful Dodger Ft. Richie Dan &amp; Sevi G – Ruff Neck Sound (London Republic) 
10 Genius Cru – Boom Selection (Incentive) 
11. Maxwell D – Serious (4 Liberty) 
12. The Surgery (Sticky) – More Weed (Social Circles) 
13. Blowfelt Feat. Slarta John – Back Up, Back Up (Wordplay) 
14. Ms Dynamite + Menta – Ramp (Bigger Beats) 
15. Zed Bias Ft. Juiceman &amp; Simba – Jigga Up (Ring The Alarm) 
16. Freestylers – Ruffneck (Trick Or Treat Mix) (Freskanova) 
17. Basement Jaxx Ft. Slarta John – Jump N Shout (Stanton Warriors Mix) (XL) 
18. Freestylers – Get Down Massive (Trick Or Treat Mix) (Freskanova) 
19. Outkast Vs Jucxi – Ms Jackson (White) 
20. Pd Syndicate (Mj Cole, Rodney P, Courtney Melody) – Ruff Like Me (Artful Dodger Mix) (London Republic) 
21. Emma Bunton Vs K-Warren – What I Am (Ft. Richie Dan) (White) 
</p></blockquote>

<p><a href="http://www.2step.ru/mix/DJ_Reenat_Veep_-_Ragga_Garage.mp3">You can download load the mix here</a></p>

<p>------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-dalston-kingsland.html">Dalston Kingsland web design</a></p>]]></description>
 <pubDate>2009-12-09T13:34:33Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">99 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[How to temporarily redirect your entire website]]></title>
<link>http://www.suburban-glory.com/blog?page=98</link>
<description><![CDATA[<p>I needed to temporarily redirect a number of websites to a holding page informing visitors that maintenance work was under way. It took me a little while to work out the right code to put in the .htaccess file. I was writing code that was redirecting a page at a time but I couldn't work out how to redirect all pages on the domain.</p>

<p>For those that don't know, 302 is the HTTP status code for a temporary redirect and 301 is a permanent redirect. It's not a good idea to confuse the two as you'll be sending the wrong message to the search engines.</p>

<p>Anyway, eventually I found the only way of doing this was using the RedirectMatch directive.  Just cut and paste the two lines and place it in you .htaccess file. Change the example.com domain name to anything you want.</p>

<p>    RewriteEngine on <br />
  
        RedirectMatch 302 / http://www.example.com/downtime.html</p>]]></description>
 <pubDate>2009-12-07T07:11:20Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">98 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Have you seen the elePHPants?]]></title>
<link>http://www.suburban-glory.com/blog?page=91</link>
<description><![CDATA[<p>Lets loose from the Code Zoo elePHPants have been spotted all over world, roaming and looking for an Apache pasture to graze on.</p>

<p>They were seen in November in Munich, Barcelona in October, in Rio de Janeiro in July and is supposedly due to be seen at the Business Design Centre in London on Friday 26th February 2010.</p>

<p>If you spot an elePHPant near you then take a snap and post up on the net at the <a href="http://www.flickr.com/groups/elephpants/">elePHPant Flickr group</a>.</p>

<p class="bold">Brazil:</p>

<p><img src="images/new/elephant-brasil.jpg" width="630" height="473" alt="elePHPant Brazil" /></p>

<p class="bold">Belgium:</p>

<p><img src="images/new/elephant-belguim.jpg" width="630" height="418" alt="elePHPant Belgium" /></p>

<p class="bold">Germany:</p>

<p><img src="images/new/elephant-germany.jpg" width="630" height="420" alt="elePHPant Germany" /></p>

<p class="bold">USA:</p>

<p><img src="images/new/elephant-usa.jpg" width="630" height="473" alt="elePHPant USA" /></p>

<p class="bold">Psychedelic elePHPant:</p>

<p><img src="images/new/elephant-pyschedelic.jpg" width="630" height="473" alt="Psychedelic elePHPant" /></p>

<p class="bold">They're breeding!</p>

<p><img src="images/new/elephants-breeding.jpg" width="630" height="473" alt="elePHPant's breeding" /></p>

<p class="bold">Now they are marching!</p>

<p><img src="images/new/elephants-marching.jpg" width="630" height="473" alt="elePHPant's marching" /></p>

<p>-------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-newham.html">Newham Web Design</a></p>]]></description>
 <pubDate>2009-12-04T16:53:23Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">91 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Creating a Drupal theme for the drupal.org repository]]></title>
<link>http://www.suburban-glory.com/blog?page=90</link>
<description><![CDATA[<p>It has been stated by some that creating good generic Drupal themes for download at the dot org site is impossible because an accomplished theme is dependent on the use of modules. I disagree. It is possible to create a visually pleasing theme that has a eclectic user base without worrying about the need to reach into the add-on depositary.</p>

<p>I've created five Drupal themes now that have been uploaded and distributed under a GPL license at drupal.org but before my first creation I looked at the most popular Wordpress templates to see if I could gather any ideas about the reasons for their popularity. It soon became clear that those that were using these Wordpress themes were doing so with little or no changes to their original layout and design. </p>

<p>A Drupal theme that was going to have a wide a potential user base as possible was going to need to style all aspects of the core installation. This meant space for all three types of navigation menu, the different search boxes and the slogan, the mission and breadcrumbs amongst much else. It also meant styling for all the core modules: polls, contact form, forum, user profiles and search. </p>

<p><img src="http://www.suburban-glory.com/images/drupal1.png" alt="Drupal Logo" class="leftimage" height="286" width="250" /></p>

<p>It's quite a challenge as Drupal is far more versatile than the Wordpress blogging platform.</p>

<p>Not only was styling all the Drupal core important but I needed to include the possibility of most types of HTML elements been used including, but not limited to all six headers, ordered and unordered lists, blockquotes and quotes. </p>

<p>I don't necessarily consider advanced theming a necessity when creating a quality Drupal theme. There are thousands of third party modules catering for all aspects of Drupal functionality and these are easy to plug in and go. For instance, the standard date and time format is quite ugly. It's a fairy easy process of using PHP to change this in the template.php file. But what exactly is the best format is a subjective opinion and the <a href="http://drupal.org/project/submitted_by">Submitted By module</a> can change this node information easily enough. </p>

<p>One aspect though of advanced theming that is essential in any build is the use of the body classes. This allows the designer to create a layout that doesn't look stupid or falls apart if only some of the available module regions are used. For further information on this read Dana Pellerin's article <a href="http://danapellerin.com/2009/08/27/drupal-theming-regions-and-body_classes/">Drupal Theming: Regions and $Body_Classes</a>.</p>

<p>I chose as well to keep a $left region in every theme. The standard Drupal install starts with three modules in the left region and in no other. I wanted to make the theme much as plug-in-and-go as possible.</p>

<p>Having a $left region in every theme does cramp the designers room to manoeuvre somewhat and using these guidelines will not create radically different layouts. It is the same with Wordpress templates. There's no doubt that their feel is often very alike and as Drupal is similarly module-based it will be the same here too.</p>

<p>Finding images to use in a Drupal theme is quite easy as they can be found at <a href="http://www.sxc.hu/">Stock.XCHNG</a> or <a href="http://www.multimedia-stock.com/">Multimedia-stock</a>.</p>

<p>In the case of Stock.XCHNG it states in <a href="http://www.sxc.hu/help/7_2">their license agreement</a> that if you intent to use a featured picture in a template then you need to contact the photographer for permission, but once I've explained that it will be used on a free Drupal theme and distributed under a GPL license they have always been more than happy to say yes.</p>

<p>Other common aspects of a Drupal theme fit in with general usability rules: the search box above the fold, the breadcrumbs at the top of the page and a logo or header that links back to the home page.</p>

<p>On every theme too I have made sure that the headings are semantically ordered and do not repeat more than once on any one page.</p>

<p>For fonts I kept to the much trusted and loved Helvetica for headlines and Verdana for the main body of text. I not really a great fan of using @font-face although it does increasingly seeming to be coming into fashion and although I use image replacement techniques for headlines and menus all the time (see above as an example) it is not possible to do so for a theme.</p>

<p>It's worth keeping the main column at least 468px wide as that leaves the user room to place a banner advert if they so do desire.</p>

<p>You may not be enthusiastic about creating a theme for Drupal.org but if you are professional web designer then there is no better way of familiarising yourself with the Drupal code and its idiosyncrasies (hello compose tips!). Although I stated that advanced theming with heavy PHP is not necessary, if you do want to become more familiar with Drupal as a framework than just a CMS, then creating a free theme provides a practical means of learning the backend code.</p>

<p>Of the Drupal themes that I've created I've particularly focused on playing around with the advanced CSS that I wouldn't ordinarily have used on a clients site, and I've also gradually increased my knowledge of the scripting code, creating new PHP theming chunks as I've gone on.</p>

<p>To finish off I'll state that the most important reason to create a theme for drupal.org is because Drupal is an open source project and relies on everybody providing their time for free, and this includes designers as much as developers.</p>

<p>-----------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-stratford.html">Stratford Web Design</a></p>]]></description>
 <pubDate>2009-12-04T07:27:32Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">90 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Dealing with a useless web hosting company]]></title>
<link>http://www.suburban-glory.com/blog?page=88</link>
<description><![CDATA[<p>Generally speaking when it comes to web hosting you get what you pay for. If you pay a small annual fee for a shared hosting account then don't expect lightning quick responses when you lodge a query or complaint. For instance, despite what a shared hosting company might claim on their website, don't expect a response out of office hours. If you send them an email on Saturday, you may not be acknowledged until Monday morning.</p>

<p>If you chose a virtual or dedicated host then a quicker response would be expected. You are not just paying for the use of more advanced hardware, but also the support that comes with this extra financial levy; particularly if you are paying for a managed environment.</p>

<p>Reading the online reviews of many shared hosting companies it is clear that many of the negative comments come from a misunderstanding of what a shared hosting company will offer.</p>

<p>Likewise, no matter what hosting package you go for don't expect the company to sort out your web design and development mistakes. They are not there to either advise or take action on the configuration of your script or site.</p>

<p>However, I do demand a certain level of customer care. </p>

<p>Just recently a client emailed to me details of a hosting package. It was this company that had sold him the  domain and he wanted to know whether their list of specifications would be suitable for his needs.</p>

<p>As it was only a small four page PHP-based site (with out a database) their deal looked fine.</p>

<p>I uploaded the clients finished site via FTP on a Sunday and straight away I noticed that the mod_rewrite rules in the .httaccess file were not working. I spend about two hours playing with the code before I decided that the problem lay with the host. </p>

<p>So I asked the client to email them and ask them to turn mod_rewrite on. They emailed back stating that it was on and working.</p>

<p>I then took over and emailed them on his behalf:</p>

<blockquote><p>
I'm having trouble with mod_rewrite and I can't pinpoint why. Has it anything to do with the way the server is configured? </p>

<p>As you can see, it works perfectly here: http://www.cartrader.suburban-glory.com/ but not here: http://www.cartradermail.com/ </p>

<p>The code is a regular syntax in the .htaccess file, ie </p>

<p>RewriteEngine On</p>

<p>RewriteRule ^style.css$ style.php [NC,L] <br />
RewriteRule ^index.html$ index.php [NC,L] </p>

</blockquote>

<p>They replied a day later (note a trend here):</p>

<blockquote><p>I can advise that it is not configured in any different manner so there is no reason the site should appear differently to the one that does work for you.</p></blockquote>

<p>I then emailed and asked them whether I had placed the files in the right folder. The next day they responded that I had.</p>

<p>Still stumped as to what problem was I asked them how I could manually change the file permissions as there was no control panel and I couldn't do this via my FTP client.</p>

<p>Eventually they responded that it was not possible to change the file permissions (!) but having to wait a day for a response is ridiculous and by now I was really getting fed up with this slow customer care. It was clear that an email conversation that should have taken just a couple of hours was going to take all week.</p>

<p>I snapped and send them a directly worded email informing them that as the client had paid for a managed server then they need to fulfil their duties and get this sorted.</p>

<p>After 48 hours and they still had not responded I emailed the client and recommended that he claim a refund and look elsewhere.</p>

<p>The website was up and running as soon as my time allowed and <a href="http://www.cartradermail.com/">can be seen here</a>.</p>

<p>What are the lessons that we can learn from this?</p>

<ol><li>
Don't recommend to a client a hosting package that doesn't come with a control panel or even, as I was to find out, the most rudimentary provisions such as the ability to change file permissions.
</li>
<li>
Hosting companies: Don't have a policy of only responded to emails once a day. This is the 21st century. With that kind of customer care policy I may as well write a letter to you and put it in the post.
</li>
<li>
Don't use <a href="http://easily.co.uk/" rel="nofollow">Easily (easily.co.uk) web hosting company</a>. They are frigging useless.
</li>
</ol><p>--------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-limehouse.html">Limehouse web design</a></p>]]></description>
 <pubDate>2009-12-01T10:27:47Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">88 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The Muppets Arrive on YouTube]]></title>
<link>http://www.suburban-glory.com/blog?page=87</link>
<description><![CDATA[<p>For many of us the Muppets were an essential part of our childhood. Amazingly sharp script writing gave it a position amongst children and adults that the Simpsons occupies today.</p>

<p>A new set of shorts videos from the Muppet creators has been launched on our favourite streaming site, You Tube.</p>

<p>Below are a selection of these vids. Will this lead to a new generation being converted? Lets hope so.</p>

<h3>The Muppets: Bohemian Rhapsody</h3>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/tgbNymZ7vqY"><param name="movie" value="http://www.youtube.com/v/tgbNymZ7vqY"></param><!--[if IE]><embed src="http://www.youtube.com/v/tgbNymZ7vqY"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<h4>The Muppets: Meh</h4>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/zSDj7bjAv2s"><param name="movie" value="http://www.youtube.com/v/zSDj7bjAv2s"></param><!--[if IE]><embed src="http://www.youtube.com/v/zSDj7bjAv2s"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<h5>The Muppets: Skateboarding Dog Gets Served!</h5>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/AEkVFo-sNZc"><param name="movie" value="http://www.youtube.com/v/AEkVFo-sNZc"></param><!--[if IE]><embed src="http://www.youtube.com/v/AEkVFo-sNZc"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object></p>

<h6>Muppet Labs Experiment 2Q975: Carve-O-Matic </h6>

<p><object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/oc1iIRKZE9w"><param name="movie" value="http://www.youtube.com/v/oc1iIRKZE9w"></param><!--[if IE]><embed src="http://www.youtube.com/v/oc1iIRKZE9w"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object> </p>]]></description>
 <pubDate>2009-11-26T09:51:44Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">87 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The White House choses Drupal]]></title>
<link>http://www.suburban-glory.com/blog?page=84</link>
<description><![CDATA[<p>News just surfacing this morning is that <a href="http://www.whitehouse.gov/">the White House</a> (Yeah that Obama dude in Washington DC) has relaunched their website but this time on Drupal.</p>

<p>Over the past year a number of large corporations have switched over to Drupal but this surely trumps any other announcement. Joomla, suck on this! </p>

<p>The <a href="http://www.washingtonpost.com/wp-dyn/content/article/2009/10/24/AR2009102401266.html">Washington Post</a> broke the news stating:</p>

<blockquote><p>
A programming overhaul of the White House's Web site has set the tech world abuzz. For low-techies, it's a snooze - you won't notice a thing...</p>

<p>"We want to improve the tools used by thousands of people who come to WhiteHouse.gov to engage with White House officials, and each other, in meaningful ways," Phillips said. </p>

<p>It's also a nod to Obama's pledge to make government more open and transparent. Aides joked that it doesn't get more transparent than showing the world a code that their Web site is based on.</p></blockquote>

<p>So if the security of Drupal is okay for the US government you can bet your bottom dollar it will be for your site too.
What a great selling point to my clients: “I'm going to build your website using Drupal CMS. It is the same Content Management System as used for the website of the White House in the United States”.</p>

<p><img src="images/whitehouse-screenshot-small.jpg" alt="The White House uses Drupal" height="253" width="500" /></p>

<p>-----------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-upminster.html">Upminster web design</a></p>]]></description>
 <pubDate>2009-10-25T07:16:50Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">84 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A guide to uploading your Drupal theme using the CVS]]></title>
<link>http://www.suburban-glory.com/blog?page=83</link>
<description><![CDATA[<div class="cvs-upload">

<p>A constant moan in the Drupal community is the apparent lack of quality themes for users to download from drupal.org; especially in comparison to Wordpress or Joomla. One explanation for this is that the complexity of the CVS system discourages designers from contributing work to the central Drupal pool. </p><p>
</p>

<p>Here mortendk lets rip in his article <a href="http://morten.dk/blog/cvs-haiku">CVS Haiku</a>:</p>

<blockquote><p>If we think that Drupal should look as diverse and fantastic as it is on the inside then we need to do something else that we are doing today. It should be clear to everyone that were not getting asskicking wonderful designed themes into the Drupal repository as long as the designer/themer/frontender have to get an developer involved to hold his hand to get him safely over the road - so big bad cvs dont hurt him.</p></blockquote><p>
</p>

<p>In a similar vein, the following comments were added to <a href="http://www.disambiguity.com/designing-for-the-wrong-target-audience/">Designing for the wrong target audience</a> and <a href="http://fourkitchens.com/blog/2009/09/30/why-drupalorg-lacks-good-themes">Why Drupal.org lacks good themes</a>:</p>

<blockquote><p>If you’re new to version control, chances are nobody is going to recommend you learn CVS for your first project. Instead, they’re going to recommend an open source VCS that most companies, organizations, and projects use today…SVN and if SVN doesn’t suit your needs…Bazaar or Git. When my workplace began looking at VCS there was not one person, group, or consultant, or contractor that recommended VCS to us.</p></blockquote>

<blockquote><p>As for theming, I think the biggest obstacles right now are the Great Wall of CVS and the Issue Queue. Drupal’s contribution methods include many technologies that are utterly foreign to the design community.</p></blockquote>

<p>I've uploaded three different themes now and it originally took about a day to satisfactorily learn how to use the CVS system in order to do this. Frustrating sure, but far from impossible. </p>

<p>I was mainly dependent on the guide called <a href="http://drupal.org/node/112902">Using Windows to contribute themes to CVS</a> which itself was taken from <a href="http://themebot.com/">Themebot</a>. </p>&lt;

<p>Although the article was crucial in helping me upload a Drupal theme I felt that there were a couple of points that needed clarifying and would have made the process simpler.</p>

<p>So below is a (slight) rewrite of the above item  with added screenshots. These are instructions for version 6 but for version 5 or 7 all you need to do is change the appropriate digit up one or down one.</p>

<p>Firstly, what you need to do is <a href="http://drupal.org/node/59">apply for CVS with Drupal.org</a> and then <a href="http://www.tortoisecvs.org/download.shtml">download and install TortoiseCVS here</a>. </p>

<p>Presuming that you have successfully done both of these then closely follow the guide below. The screenshots are from a Drupal theme called <a href="http://drupal.org/project/winter_wonderland">Winter Wonderland</a> which I recently uploaded.</p>

<p>In preparation for adding your code to CVS, you should also add a CVS $Id$ tag to all of the files in your project. The Id tag should be at or near the top of each file, and for PHP, CSS, JS, and .info files, it needs to be embedded in a comment. When you check the file into CVS, the CVS system will expand the tag to add information about the check-in and version. Here are the lines to add:</p>


<ul><li>
    // $Id$ <br />
    inside the &lt;?php ?&gt; in a PHP file, or in a JavaScript file
</li>
<li>
    /* $Id$ */ <br />
    in a CSS file
</li>
<li>
    ; $Id$ <br />
    in a .info file
</li>
<li>
    $Id <br />
      in a plain text file
</li>
</ul><p>The first step is to right click on the theme folder and then click on the TortoiseCVS option Make New Module.</p>

<p><img src="images/part-one.jpg" alt="Screenshot One" width="630" height="424" /></p>

<p>From here the following interface will spring up: </p>

<p><img src="images/part-two.jpg" alt="Screenshot Two" width="588" height="591" /></p>

<p>In the CVSROOT you need to add the following line of code:  :pserver:username@cvs.drupal.org:/cvs/drupal-contrib </p>



<p>As you can see from the screenshot I've added my username in the appropriate space.</p>



<p>Make sure the server and the repository folder are the same as in the image above and then add the path to your theme, which will be contributions/themes/your-theme</p>



<p>After you have clicked okay you should see the following message informing you that your actions have been successful</p>

<p><img src="images/part-three.jpg" alt="Screenshot Three" width="598" height="486" /></p>

<p>Now you need to check that a folder has been created in the Drupal CVS depositary by going to here: <a href="http://cvs.drupal.org/viewvc.py/drupal/contributions/themes/">http://cvs.drupal.org/viewvc.py/drupal/contributions/themes/</a></p>



<p>As you can see below my folder for Winter Wonderland has been created.</p>



<p>If you can't see your folder then you have done something wrong. You either need to retrace your steps and start the process again or seek help (see the bottom of this article for places your can go for help).</p>

<p><img src="images/part-four.jpg" alt="Screenshot Four" width="434" height="538" /></p>

<p>Now go back to  your theme folder on your harddrive and right click again. This time click on the TortoiseCVS option Branch. When the box opens input DRUPAL-6--1 and then click okay.</p>

<p><img src="images/part-five.jpg" alt="Screenshot Five" width="630" height="534" /></p>

<p>You should get the following confirmation of your successful action:</p>

<p><img src="images/part-six.jpg" alt="Screenshot Six" width="598" height="512" /></p>

<p>Now right click on your theme folder again and this time click on the tag option. Type in DRUPAL-6--1-0 and then click okay.</p>

<p><img src="images/part-seven.jpg" alt="Screenshot Seven" width="630" height="486" /></p>

<p>Again, the message "Success, CVS operation completed" should appear:</p>

<p><img src="images/part-eight.jpg" alt="Screenshot Eight" width="520" height="506" /></p>

<p>Now right click on the theme folder and add the contents</p>

<p><img src="images/part-nine.jpg" alt="Screenshot Nine" width="579" height="521" /></p>

<p>You'll see a list of checkboxes like below which list the entire contents of your theme. Click okay.</p>

<p><img src="images/part-ten.jpg" alt="Screenshot Ten" width="630" height="539" /></p>

<p>This is the point where all your individual files are uploaded. However, it is unlikely that they would have all have been  transferred so look in the folder and  check. If there is a white tick on an orange background then they would have been successfully uploaded to drupal.org but - as below - if there is a white cross on a orange background further action is required. Right click and then click again on CVS Update. </p>

<p><img src="images/part-11.jpg" alt="Screenshot 11" width="630" height="300" /></p>

<p>To check that everything is okay go to the drupal theme depository. My Winter Wonderland files look as so:</p>

<p><img src="images/part-12.jpg" alt="Screenshot 12" width="630" height="520" /></p>

<p>Now you have your entire theme successfully uploaded to the Drupal.org theme section you now need to make the public page.</p>



<p>The screenshots for this stage were too big to be displayed here but what you need to do is the following</p>



<ol><li><a href="http://drupal.org/node/add/project-project/">In your Drupal account go to create content -&gt; create project</a></li>
<li>For project type click on the theme checkbox.</li>
<li>
For full project name write whatever it is called but for short project name write the name of the uploaded theme folder which in my case was winter_wonderland with an underscore. It is essential that this is exactly the same.</li>
<li>In the full description give users as much detail as possible about your theme. <a href="http://drupal.org/node/188986">Please read Best Practices at drupal.org before you do so</a></li>
<li>In project resources -&gt; CVS tree put the URL of your upload theme which for Winter Wonderland is http://cvs.drupal.org/viewvc.py/drupal/contributions/themes/winter_wonderland/</li>
<li>In CVS integration -&gt; CVS directory put the path of the theme directory which in this case is /themes/winter_wonderland/</li>
<li>It's also well worth uploading a screenshot for interested users to look at.</li>
</ol><p>Now you have your published page and an uploaded theme you need to create your first release</p>



<p>Click on add release at the bottom of the published theme page</p>



<p>You'll come to the following interface. Enter the information as below:</p>

<p><img src="images/part-16.jpg" alt="Screenshot 16" width="578" height="396" /></p>

<p>It may take up to 12 hours for the nightly build to happen but then you'll have your first dev release!</p>



<p>To finish off, we'll look at how to upload new or altered files and then subsequently create a new release afterwards.</p>



<p>Lets say you've added some CSS to your main style file. Right click on the CSS file on your harddrive and then click on CVS update.</p>


<p>Now right click on your main theme folder  and then click on tag. Lets say that you want this release to be called beta 1 so in the  box you type DRUPAL-6--1-0-BETA1 and click okay. </p>



<p>Now go to the public theme page and underneath click on add new release. You should be presented with only one option. Click okay and the beta 1 release will be available for public download in around five minutes.</p>



<p>If you are having problems with this process where can you find help?</p>

<p>The place where you are most likely to get the quickest and most helpful response isn't the Drupal forums but the IRC channel at #drupal-themes.</p>

<p>Over at Four Kitchens, Todd Ross Nienkerk has kindly put himself forward to personally help themers who are having CVS trouble. <a href="http://fourkitchens.com/blog/2009/09/30/why-drupalorg-lacks-good-themes">His email and other contact details can be found at the bottom of this article</a></p>

<p>I don't claim to be an expert on CVS but if you have any questions then I will do anything I can to help you out.</p>

<p>---------------</p>

<p>This guide is released under the <a href="http://www.gnu.org/licenses/fdl-1.3-standalone.html">GNU Free Documentation License</a></p>

</div>

<p>---------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-hornchurch.html">Hornchurch Web Design</a></p>

<p>---------------</p>]]></description>
 <pubDate>2009-10-24T12:05:13Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">83 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Goodbye PageRank... hello mozRank]]></title>
<link>http://www.suburban-glory.com/blog?page=82</link>
<description><![CDATA[<p>Google's toolbar PageRank has not been updated for nearly six months now. This in itself is not unique and we know that this year is to see significant changes to Google search (Caffeine update) which gives an explanation to the delay. However, there are now quotes circulating from Google employees stating that the public PageRank metric is dead. </p>

<p>Susan Moskwa on Google’s webmaster forums said:</p>

<blockquote><p>
We’ve been telling people for a long time that they shouldn’t focus on Pagerank so much; many site owners seem to think it’s the most important metric for them to track, which is simply not true. We removed it because we felt it was silly to tell people not to think about it, but then to show them the data, implying that they should look at it.
</p></blockquote>

<p>I have opinionated on discussion forums in the past that Google would never close down their PageRank to webmasters and the SEO community as all that would happen is that another company would create their own metric system to replace it with. Well if they have shut it down then that company is <a href="http://www.seomoz.org/">SEOmoz</a> and their metric system is mozRank.</p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/seomoz-new-logo2.gif" alt="SEOMOZ" class="leftimage" height="86" width="350" /></p>

<p>Introduced in 2008, mozRank is based upon their now quite significant accumulation of <a href="http://www.seomoz.org/linkscape">Linkscape</a> data. Like PageRank, mozRank is based on a score out of ten (although the latter goes to decimal places). Page mozRank is primarily based upon the number of incoming links, while domain mozRank also factors in domain diversity.</p>

<p>Admittedly, PageRank has become less and less important to SEO over the last five years but it does provide some crude measurements to the worth of a site / page. As an example, I run a feed aggregation site and I stipulate in the submission rules that sites with a homepage of less than a PageRank of 2 will not be included in the index. This is to insure that only sites that have been around for six months or more are accepted. I have found that crappy Made for Adsense websites are normally less than a PageRank of 2. </p>

<p>In the coming months it looks like I'll be switching over from PageRank to mozRank for my site.
</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-essex.html">Essex Web Design</a></p>]]></description>
 <pubDate>2009-10-24T11:00:51Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">82 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[A YouTube LOL: The graphic designer talks to his client]]></title>
<link>http://www.suburban-glory.com/blog?page=80</link>
<description><![CDATA[<p>That great font of eternal distraction, YouTube, has thrown up another tickler and this one sees a computerised graphic designer trying to reason with a client who demands everything for £3.50 and for it to be delivered in 17 minutes. Tee hee...</p>

<p>This rings true for all freelancers out there...</p>

<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/VfprIxNfCjk"><param name="movie" value="http://www.youtube.com/v/VfprIxNfCjk"></param><!--[if IE]><embed src="http://www.youtube.com/v/VfprIxNfCjk"type="application/x-shockwave-flash"wmode="transparent" width="425" height="350" /><![endif]--></object>]]></description>
 <pubDate>2009-09-30T14:05:10Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">80 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Styling Drupal file attachments with only CSS]]></title>
<link>http://www.suburban-glory.com/blog?page=78</link>
<description><![CDATA[<p>I've been using <a href="http://www.island94.org/2008/08/drupal-theme-override-for-upload-modules-attachments-list/">Ben Sheldon's “shiny upload” code</a> on a relatively busy Drupal site for a while, the idea behind which is to transform the particularly ugly node attachments box on the standard Drupal installation into something more attractive.</p>

<p>I've used the code for over a year now without any problems although some people reported bugs which lead to <a href="http://krimson.be/en/shiny-upload-almost-converted-a-module">Roel at Krimson</a> to produce his own version.</p>

<p>There is also now the <a href="http://drupal.org/project/itweak_upload">iTweak Upload module</a> created by <a href="http://drupal.org/user/87708">Ilya Ivanchenko</a> which is a more advanced take on the above.</p>

<p>One of the accusations laid against Drupal is that in order to get the most out of the CMS then an advanced knowledge of PHP is necessary. This charge though could be laid at a whole number of CMS' in existence not just Drupal.</p>

<p>However, all the solutions above are for a design and presentation problem and I so I tried to find a CSS answer.</p>

<p>Firstly, this is how the block of code looked on a theme I was working on before I styled it:</p>

<p><img src="http://www.suburban-glory.com/images/attachments-screenshot-one.jpg" alt="Attachments Screenshot One" width="429" height="198" /></p>

<p>As you can see it's very, very dull.</p>

<p>The first thing I did was add some CSS to lay it out better.</p>

<pre>

#attachments {
font-size : 1.2em;
}
#attachments th {
font : 1.2em Helvetica, Helvetica Neue, Arial, sans-serif;
}
#attachments tbody {
border : 5px groove #00E8AE;
background : #00E8AE;
}
#attachments td {
padding: 5px 2px 5px 2px;
}
#attachments .odd {
border-bottom : 1px solid black;
background : white;
padding-bottom : 5px;
}
#attachments .even {
border-bottom : 1px solid black;
}

</pre>

<p>So now it looks like this:</p>

<p><img src="http://www.suburban-glory.com/images/attachments-screenshot-two.jpg" alt="Attachments Screenshot Two" width="429" height="246" /></p>

<p>That's much better as I'm sure you'll agree. </p>

<p>The PHP solutions added special little icons for the different attachments. This is a commonly used technique across the net but designers mostly use JavaScript. As I like to avoid that spawn of the devil where ever possible I picked CSS attribute selectors instead.</p>

<p>As an example, the following code will add a PDF icon to the end of a URL if that link points to a PDF document:</p>

<pre>

#attachments a[href$='.pdf''] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/application-pdf.png") no-repeat right;
}

</pre>

<p>The $= specifies that we want to match links whose hrefs end with ".pdf".</p>

<p>The second stage was to get a pen and a piece of paper and list all the major file extensions. It would be silly to list all of them as there are hundreds, if not thousands of these types of suffixes but below are the major ones that came to mind:</p>

<p>PDF:</p>

<p>pdf</p>

<p>HTML:</p>

<p>.html, .htm</p>

<p>Audio:</p>

<p>.aac, .cda, .fla, .flac, .m3u, .mp4, .m4a, .m4p, .mp3, .ogg, .wma, .wmv</p>

<p>Text:</p>

<p>.text, .txt, .info</p>

<p>Video:</p>

<p>.avi, .m4v, .mov, .mp4, .mpg, </p>

<p>Document:</p>

<p>.doc, .dotm, .dotx, .sxw</p>

<p>Presentation:</p>

<p>.potx, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx</p>

<p>Spreadsheet:</p>

<p>.ods, .scx, .xls, xlsm, xlsx</p>

<p>Script:</p>

<p>.asp, .aspx, .css, .inc, .ini, .js, .json, .lib, .php, .php3, .rc, </p>

<p>Compressed:</p>

<p>.7z, .7zip, .ace, .arj, .gz, .rar, .zix</p>

<p>Graphics:</p>

<p>.bmp, .eps, .gif, .ico, .iff, .png, .jpeg, .jpg, .svg, </p>

<p>Now it was a question of putting it all together to create a CSS block for the attachments div:</p>

<pre>

/* PDF file extension 

.pdf

*/

#attachments a[href$='.pdf''] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/application-pdf.png") no-repeat right;
}

/* Audio file extensions 

.aac, .cda, .fla, .flac, .m3u, .mp4, .m4a, .m4p, .mp3, .ogg, .wma, .wmv

*/

#attachments a[href$='.aac'], #attachments a[href$='.cda'], #attachments a[href$='.fla'], #attachments a[href$='.flac'], #attachments a[href$='.m3u'], #attachments a[href$='.mp4'], #attachments a[href$='.m4a'], #attachments a[href$='.m4p'], #attachments a[href$='.mp3'], #attachments a[href$='.ogg'], #attachments a[href$='.wma'], #attachments a[href$='.wmv']{
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/audio-x.png") no-repeat right;
}

/* HTML file extensions 

.htm, .html

*/

#attachments a[href$='.html'], #attachments a[href$='.htm'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/text-html.png") no-repeat right;
}

/* Text file extensions 

.text, .txt, .info

*/

#attachments a[href$='.txt'], #attachments a[href$='.text'], #attachments a[href$='.info'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/text-plain.png") no-repeat right;
}

/* Video file extensions 

.avi, .m4v, .mov, .mp4, .mpg, 

*/

#attachments a[href$='.avi'], #attachments a[href$='.m4v'], #attachments a[href$='.mov'], #attachments a[href$='.mp4'], #attachments a[href$='.mpg'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/video-x-generic.png") no-repeat right;
}

/* Document file extensions

.doc, .dotm, .dotx, .sxw

*/

#attachments a[href$='.doc'], #attachments a[href$='.dotm'], #attachments a[href$='.dotx'], #attachments a[href$='.sxw'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/x-office-document.png") no-repeat right;
}

/* Presentation file extensions

.potx, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx

*/

#attachments a[href$='.potx'], #attachments a[href$='.pps'], #attachments a[href$='.ppsx'], #attachments a[href$='.ppt'], #attachments a[href$='.pptm'], #attachments a[href$='.pptx'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/x-office-presentation.png") no-repeat right;
}


/* Spreadsheet file extensions

.ods, .scx, .xls, .xlsm, .xlsx

*/

#attachments a[href$='.ods'], #attachments a[href$='.scx'], #attachments a[href$='.xls'], #attachments a[href$='.xlsm'], #attachments a[href$='.xlsx'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/text-x-script.png") no-repeat right;
}

/* Script file extensions

.asp, .aspx, .css, .inc, .ini, .js, .json, .lib, .php, .php3, .rc, 

*/

#attachments a[href$='.asp'], #attachments a[href$='.aspx'], #attachments a[href$='.css'], #attachments a[href$='.ini'], #attachments a[href$='.inc'],
#attachments a[href$='.js'], #attachments a[href$='.json'], #attachments a[href$='.lib'], #attachments a[href$='.php'], #attachments a[href$='.php3'] , #attachments a[href$='.rc']{
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/x-office-spreadsheet.png") no-repeat right;
}

/* Compressed file extensions

.7z, .7zip, .ace, .arj, .gz, .rar, .zix, .zip

*/

#attachments a[href$='.7z'], #attachments a[href$='.7zip'], #attachments a[href$='.ace'], #attachments a[href$='.arj'], #attachments a[href$='.gz'], #attachments a[href$='.zix'], #attachments a[href$='.zip'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/text-x-generic.png") no-repeat right;
}

/* Graphics file extensions

.bmp, .eps, .gif, .ico, .iff, .png, .jpeg, .jpg, .svg, 

*/

#attachments a[href$='.bmp'], #attachments a[href$='.esp'], #attachments a[href$='.gif'], #attachments a[href$='.iff'], #attachments a[href$='.png'], #attachments a[href$='.jpeg'], #attachments a[href$='.jpg'], #attachments a[href$='.svg'] {
  padding-right: 25px;
  background: url("/sites/all/themes/sports/icon-images/image-x-generic.png") no-repeat right;
}

</pre>

<p>So it now looks like this:</p>

<p><img src="http://www.suburban-glory.com/images/attachments-screenshot-three.jpg" alt="Attachments Screenshot Two" width="432" height="256" /></p>

<p>The only downside to this CSS is that it doesn't work in Internet Explorer 6, however it does look neat and tidy:</p>

<p><img src="http://www.suburban-glory.com/images/attachments-screenshot-four.jpg" alt="Attachments Screenshot Four" width="429" height="229" /></p>

<p>The above CSS code will work in all installations of Drupal.
</p>

<p>You can download the 16 x 16 icons used in this tutorial from <a href="http://www.suburban-glory.com/attachment-icons.zip">here</a></p>]]></description>
 <pubDate>2009-09-27T18:31:56Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">78 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[How to style a HTML form with CSS and NO extra markup]]></title>
<link>http://www.suburban-glory.com/blog?page=76</link>
<description><![CDATA[<p>If you haven't read it yet then I strongly recommend that you take a look at Cameron Adams article <a href="http://www.sitepoint.com/article/fancy-form-design-css/">Fancy Form Design Using CSS</a> if you are really serious about tackling this aspect of web design.</p>

<p>It's an extremely well-informed piece that offers a myriad of tips including cross-browser compatibility details and usability and accessible markup advice.</p>

<p>However, one aspect of Cameron's article that I didn't like was the use of an ordered list. I really hate to add extra code unless it is absolutely necessary and, lets face it, styling a form by using a list is just a hack.</p>

<p>How to style a HTML form with CSS and no extra markup is amazingly simple really. This is what the code looks like:</p>

<pre>
input,
select{
display : block;
}
label {
float : left;
width : 200px;
}
</pre>

<p>And that's it. It produces a form like in the image below with no extra HTML coding such as an ordered lists or line breaks. It works across all browsers including Internet Explorer.</p>

<p><img src="http://www.suburban-glory.com/images/article-form.jpg" alt="Dreamweaver Icon" height="361" width="520" /></p>

<p>The above code is just the foundation for form design and reading Cameron Adams article will give you lots more ideas about how to get it right.</p>]]></description>
 <pubDate>2009-09-04T00:54:37Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">76 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The Long Hard Road to a Successful Blogging Career]]></title>
<link>http://www.suburban-glory.com/blog?page=75</link>
<description><![CDATA[<p>Let us use a typical real life example as an analogy for creating a successful blog.</p>

<p>You move into a new flat in a different city. You spend a great deal of time picking the right flat to move into. After all, you don't want to move into a bad neighbourhood. The outside of the flat is pretty and attractive, while you spend a great deal of time both finding and arranging the furniture to your taste.</p>

<p>So the big day comes and your new flat is ready. You sit back and admire your new home. Then you realise that as you've moved to a new city you haven't got any friends nearby. So you sit in and wait for new friends to knock on the door. Nobody comes. You sit in night after night waiting for new friends to come and knock on the door. But nobody comes.</p>

<p>Starting a blog is like this. No matter how long you take on picking the right niche, working on the design and writing the articles, just launching it and expecting web users to come won't work. Even established and internationally known digital companies such as Google and Facebook can't just launch a product or service and expect an audience to find it, keep coming back and refer it to their friends.</p>

<p>But yet, this "build it and they will come" attitude is prevalent and is often the downfall of many new bloggers, applications and campaign microsites. There's much work involved in promoting a blog or other type of website in finding the right target audience, making sure it meets their needs and having them return.</p>

<p>It me be the case that you are already a celebrity in your own right and so your name is already a brand, but unfortunately for the rest of us there are no shortcuts and the work takes countless hours of often repetitious, dull tasks.</p>

<p>Going back to the analogy of moving into a new flat in a new city, I would say that it takes a good three years to build up a new network of friends. The same too with building a blog as it takes a good three years to go from nowhere to creating a wide ranging network of visitors and fellow bloggers.</p>

<p>And as for making money, forget it. You may end up being one of the 0.001% of bloggers who can actually earn a living out of their writing, but otherwise don't expect an equal return for all the hours that you are going to put into making it a success.</p>

<p>Unfortunately, there seems to be prevailing attitude amongst many new bloggers that in this "gold rush" all it takes is to pick up the gold nuggets that are scattered around. Most of these bloggers with this attitude give up disillusioned. Blog for fun first, but that doesn't mean that you shouldn't go about your business with determination and a sense of purpose.</p>

<p>The most vital part of aiming to be a successful blogger is reading others experience, and not just before you start but continuously throughout your blogging time. Make sure you find other blogs, forums and social networking sites and subscribe to their RSS feed.</p>

<p>Learn from those that are already successful at it.</p>

<p>--------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-grange-hill.html">Grange Hill web design</a></p>]]></description>
 <pubDate>2009-09-03T08:28:38Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">75 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[How to dramatically compress your CSS and Javascript files by using PHP]]></title>
<link>http://www.suburban-glory.com/blog?page=74</link>
<description><![CDATA[<p>This is a method that I use to shrink Javascript or CSS files using PHP. You don't need any knowledge of PHP to try this out as you can just cut'n'paste the required code.</p>

<p>I've used it quite a few times now and it will compress your file by around 50%. Which, if your CSS file is over 1,000 lines or you are using a Javascript framework like Prototype, will decrease the download time.</p>

<p>The files should be read fine by every browser.</p> 

<p>So here is what you do.</p>

<p>Take the contents of the CSS file and place it in PHP file with a .php extension. Put the following line of code at the top of the document:</p>

<pre>
&lt;?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/css"); ?&gt;
</pre>

<p>Then at the very bottom place this line of code:</p>

<pre>
&lt;?php if(extension_loaded('zlib')){ob_end_flush();}?&gt;
</pre>

<p>And that's it. Now link from your HTML head to this PHP file rather than the CSS file.</p>

<p>For Javascript it is a case of doing the same but change the content type like so:</p>

<pre>
&lt;?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header('Content-Type: text/javascript'); ?&gt;
</pre>

<p>I don't use this for HTML but I do place the following in my .htaccess file:</p>

<pre>
# BEGIN GZIP
&lt;ifmodule mod_deflate.c&gt;
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
&lt;/ifmodule&gt;
# END GZIP
</pre>

<p>As a warning, use this method only if you are hand coding and not if your are using a CMS or blogging platform. You'll find that a CMS will have this written into their core code or you'll be able to use a third-party add-on to achieve the same results.</p>]]></description>
 <pubDate>2009-08-21T08:29:37Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">74 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Do web designers need to use Dreamweaver?]]></title>
<link>http://www.suburban-glory.com/blog?page=73</link>
<description><![CDATA[<p>Adobe's Dreamweaver has been in commercial use for over ten years now and while other's have come and gone Dreamweaver's development and popularity has continued.</p>

<p>As a piece of software it is widely used in professional web design circles, but nevertheless many designers openly discourage its use when writing in forums and blogs.</p>

<p>This is because of its WYSIWYG features. WYSIWYG is an acronym for What You See Is What You Get. This means that the software writes the actual code for you as you write the text or import pictures.</p>

<p><img src="http://www.suburban-glory.com/images/dreamweaver-icon.png" alt="Dreamweaver Icon" class="leftimage" width="256" height="256" /></p>

<p>Professional web designers get aggravated about its use not because they feel that it's "cheating", but because the correct way of learning the trade is to look under the bonnet of the website and understand the engine, the code.</p>

<p>However, many people are attracted to the creative possibilities of web design by first using the WYSIWYG features of Dreamweaver. It allows the user to more quickly create something visually tangible rather than just lines of code.</p>

<p>My first website was created using FrontPage, which was part of the Microsoft Office Suite from 1997 to 2003. It is now defunct and has been replaced by Expression Web, but as it came bundled with Word and Excel there is no doubt that many of today's web designers got their first taste of site creation through that piece of software.</p>

<p>FrontPage was, to say the least, rather basic, but it served as an entry point to the profession.</p>

<p><img src="http://www.suburban-glory.com/images/dreamweaver-icon-two.png" alt="Second Dreamweaver Icon" class="leftimage" width="256" height="256" /></p>

<p>I use an old version of Dreamweaver, version 8, on an almost daily basis. As a web designer there are many aspects of the software that really appeal to me, although I've never seen the benefit of upgrading to more recent versions.</p>

<p>I've long stopped using it as a WYSIWYG editor as I now hand code, but I really like the layout. It's very easy to flip between the code and preview views, or a split combination of the two, and all the files for the project site neatly stacked meaning quick and easy access when needed.</p>

<p>I particularly like how easy it is to preview the page in the browser of your choice and the code validation function.</p>

<p>Of real benefit to quick web design is its template system. Say, for instance, that you need to create 30 near-identity pages then it is easier to create one master template page and base all subsequent pages on that. Changing the template page then automatically alters all the 30 individual child pages.</p>

<p>It is rather useless for PHP coding and I use a separate PHP IDE for that. Subsequent versions of Dreamweaver also have extra features for ease of incorporating AJAX, Adobe AIR and XML.</p>

<p>There are other basic WYSIWYG editors out there such as KompoZer and Mozilla's SeaMonkey, but none come close to the Dreamweaver experience.</p>

<p>Popular software coding packages are Notepad 2 and Notepad++, both of which are widely recommended, but again, their interface is still not as intuitive to feel your way around as that of Dreamweaver.</p>

<p>So do you need Dreamweaver in order to learn web design? It's not essential, but it will certainly be a key aid in you quest if you are just starting out.</p>

<p>--------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-havering.html">East London Web Design</a></p>]]></description>
 <pubDate>2009-08-20T07:04:04Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">73 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Which Content Management System (CMS) is the best?]]></title>
<link>http://www.suburban-glory.com/blog?page=72</link>
<description><![CDATA[<p>There are dozens if not hundreds of different Content Management Systems (CMS) in existence. Many of these are free to use and are built using Open Source principles; that is, many different developers contributor their time and expertise to the particular project for free and the code is there for all to use. </p>

<p>All these CMSs are created using dynamic server-side development languages, with PHP being the most common followed by ASP.NET, Python and Ruby.</p>

<p>But don't worry, you don't need to have any working knowledge of these languages in order to use them, although a knowledge of HTML and CSS is very useful if you really want to get to grips with designing and developing your own site that is built with a Content Management System. </p>

<p><img src="http://www.suburban-glory.com/images/Joomla.png" alt="Joomla Logo" class="leftimage" width="300" height="190" /></p>

<p>I create websites for people all the time with different CMSs and I often build them so that the user doesn't need any knowledge of web design at all in order to update it. </p>

<p>Perhaps first it may be worth noting what Content Management Systems you should avoid. PHP-Nuke and many of its forks such as Postnuke were once the most popular CMSs, but today few serious users would go near them as they have lagged behind new innovation for years.</p>

<p>[If you need a web designer in east London then please visit <a href="http://www.suburban-glory.com/areas/stratford.html">Stratford web design and development</a>]</p>

<p>Dragonfly CMS though, one fork from PHP-Nuke, has a band of loyal, dedicated followers - and the same goes for XOOPS. </p>

<p>The two most popular CMSs in existence are Drupal and Joomla. It's hard to know how many websites are built with either Drupal or Joomla, but many hundreds of thousands would be a fair estimate. Both are quite easy to download and install, and if you rent server space that has Fantastico as a feature in the control panel it's as easy as clicking a few buttons in order to have a full working website up and running. Joomla tends to attract the less experienced website creator as the administrator interface is more user-friendly and there are thousands of free and paid template themes.</p>

<p><img src="http://www.suburban-glory.com/images/php-nuke.jpg" alt="Nuke-PHP Logo" class="leftimage" width="300" height="58" /></p>

<p>In contrast, there are a great deal less ready-built themes for Drupal. The documentation for Joomla is more thorough than the equivalent guides for Drupal, but both have extremely large online communities where you can seek advice. Drupal forums have over 500,000 members, while Joomla has over 250,000 - it's always best to use the search function first to see if your query has been asked before as 90% of the time you'll find that it has. </p>

<p>The biggest problem for the novice Drupal user is getting to grips with the administration back-end section. This can be very confusing for those new to Drupal, however this situation should improve by the time Drupal version 7 is released as they are spending a great deal of time and money in fixing the poor usability aspects of the CMS. </p>

<p>A recommended book to help you understand Drupal better is Building Powerful and Robust Websites with Drupal 6 by David Mercer (Packt Publishing). This starts at the basics and is easy to for anybody to read and follow. </p>

<p>Drupal and Joomla are fine for most small to mid-sized concerns, however for large, popular sites that will see a lot of traffic it may be worth looking at eZ Publish or ExpressionEngine.</p>

<p><img src="http://www.suburban-glory.com/images/EZ-Logo.png" alt="EZ Logo" class="leftimage" width="300" height="115" /></p>

<p>Don't let the name fool you - eZ Publish, from the Norwegian company eZ Systems, is far from easy to learn! The robust CMS, ExpressionEngine, created by EllisLab, has won over a lot of professional web designers in recent years. ExpressionEngine offer a free limited core, with a full paid version if you intend to use it for commercial reasons. eZ publish is free and released under the GPL licence but there is a paid supported version called Publish Premium.</p>

<p>So here are some ideas for picking the right Content Management Systems. Often, website creators find their own personal preference after using a number of different CMSs - it's good to try out as many as you can to see if they fit your needs and requirements.</p>

<p>---------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-fairlop.html">Fairlop web design</a></p>]]></description>
 <pubDate>2009-08-19T07:22:09Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">72 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using PHP to validate an RSS feed URL.]]></title>
<link>http://www.suburban-glory.com/blog?page=71</link>
<description><![CDATA[<p>I'm just working on a script at the moment that allows users to submit a blog URL and the blog RSS feed.</p>

<p>To check whether the submitted URL is a properly formatted address I use FILTER_VALIDATE_URL but there is no such filter function for RSS feeds.</p>

<p>So after putting on my thinking hat I came across the following way of checking whether a URL is an RSS feed.</p>

<p>Firstly, I used cURL to take the entire contents of the page and save it in a txt file:</p>

<pre>
$ch = curl_init(trim($_POST['blog-rss']));
$fp = fopen(LIB  . DS ."textfile.txt", "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp); 
</pre>

<p>Then I took the contents of the text file and put it into a string:</p>

<pre>
$filename = LIB  . DS ."textfile.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
</pre>

<p>From there I used the stristr() function.</p>

<pre>
if (stristr($contents, "version="1.0"")) {
	null;
} else {
	$error[] = "There appears to be a problem with the submitted RSS field";
}
</pre>

<img src="http://www.suburban-glory.com/images/RSS.png" alt="RSS Logo" class="leftimage" width="200" height="200" /><p>But this is where the problem lies. There are several different feed formats and the only constant I could find between them was the opening XML declaration: “version=1.0”.</p>

<p>So the URL is passed as okay if “version=1.0” is found within the contents of the file. However, this is also in a XML sitemap so while it passes RSS and Atom feeds, it will also accept other different types of files.</p>

<p>Do you have a better solution for this?</p>]]></description>
 <pubDate>2009-08-18T06:22:24Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">71 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[An Introduction to Search Engine Optimization (SEO)]]></title>
<link>http://www.suburban-glory.com/blog?page=70</link>
<description><![CDATA[<p>This guide is not written for an experienced webmaster, but is instead aimed at a layman. Rather than getting bogged down in the intricacies of writing code to positively influence search engines, this article will take a step back from that and concentrate on the history of this discipline as well as some theory.</p>

<p>To start off with I will state why Search Engine Optimization (SEO) should matter to you. Lets say you are a small business that is selling shoes. You invest a couple of thousand pounds in a competently designed website. Your website is published but you receive no visitors and visitors equal money because they will hopefully be buying your shoes.</p>

<p><img src="http://www.suburban-glory.com/images/bing.png" alt="Bing Logo" class="leftimage" width="273" height="108" /></p>

<p>So in order to get visitors to your website you write a list about how you will publicise it.</p>

<p>At number one on the list is paying for advertising space in the print media, whether national or local publications, or niche magazines. This has been done for centuries and clearly does work judging by the billions of pounds spent on advertising every year.</p>

<p>At number two on your list is Pay Per Click (PPC) advertising which on the World Wide Web is mainly run by Google AdWords, Yahoo! Search Marketing, and Microsoft adCenter.</p>

<p>You've all seen these types of adverts in Google search results: they always in the right hand column. It works as a bidding system. You pay, say, £1 to Google every time somebody clicks on your advert and visits your site. If you pay more than £1 then your advert will appear higher in the list and so consequently you will receive more visitors. The amount that you pay for an advert depends on how competitive your niche and keywords are. For instance, you will pay more to advertise with a keyword like “home insurance” (extremely competitive) than you would “Gardening Services in Bolton” (not very competitive).</p>

<p>Done correctly PPP advertising will yield a financial return. This industry is called Paid Search Advertising and although related to Search Engine Optimization, is a separate sphere in its own right.</p>

<p>Getting back to your list.</p>

<p>At number three is SEO. At the most basic level of explanation this means getting to the number one spot in the search engine results for your niche or keywords. Going back to the previous example then this means that if somebody types “Gardening Services in Bolton” then your Bolton-based gardening site is the first result in the list. </p>

<p><img src="http://www.suburban-glory.com/images/google-logo.png" alt="Google Logo" class="leftimage" width="300" height="120" /></p>

<p>Why is being first so important? Won't being number two or three or even number 27 on the third page do?</p>

<p>Time and time again investigations into people's user habits revel that users are more likely to click on a result if it is on the number one sport. They are then more likely to click on the number two result than the number three result, but less likely to click on the number two result than the number one result. Simplified, the higher on the list you are the more visitors your will receive.</p>

<p>So how do you get to number one? And now here is the rub – the only people who can truly answer that question are the search engines themselves. They keep their formulas – like the Coca-Cola and KFC recipes – a secret. </p>

<p>This is because if they were completely open with their formula – technically called algorithms – then every two-bit spammer in existence would take advantage of this in order to get their viagra or porn site to dominate the search engine results. Google would crumble into uselessness over night.</p>

<p>What they do is give us some information. Enough so that we can safely calculate that if we do X and Y then our website will eventually succeed in receiving a more prominent profile in the search engine results.</p>

<p>Lets examine this very page for these absolute SEO certainties. </p>

<p>Look at the top left hand corner and you will see “An Introduction to Search Engine Optimization (SEO) – Suburban Glory”. This is the title. You can't see it from here but if you examined the code you will see this text inbetween the HTML title tags - </p>

<pre></pre><p>. We know that this is the most important part of a page to place keywords. Getting back to our Bolton-based gardening site, this is where you would ideally put “Gardening Services in Bolton”.</p>

<p>Another example, look at the top of this article and you'll see “A Blog in Suburban Glory” and the name of this item again “An Introduction to Search Engine Optimization (SEO)”. You can't see it unless you examine the code but both of these lines of text are placed between headers called </p>

<pre></pre><h1></h1><p> and </p>

<pre></pre><h2></h2><p> respectively. We know that these are fairly important (albeit less so) places to put keywords. </p>

<p><img src="http://www.suburban-glory.com/images/yahoo1.png" alt="Yahoo Logo" class="leftimage" width="200" height="50" /></p>

<p>The search engines bots look at these prime spots on a webpage and consider them indicative about what the subject matter of the entire page is about.</p>

<p>So these are just a couple examples of what we objectively know about SEO.</p>

<p>The trouble comes in that which we don't know, or at least that which we are unsure about.</p>

<p>Many of those involved in SEO often guess about the unknown factors, sometimes they make educated guesses, other times the herd mentality prevails.</p>

<p>Consequently, because of the vast grey areas SEO has a bad reputation amongst many people.</p>

<p>As SEO professional <a>Laura Callow</a> wrote recently:</p>

<blockquote><p>
Personally, I’m really, really tired of the uninformed or the simply ignorantly arrogant stating with utter conviction that SEO is a ‘waste of time’ and that it is conducted only by ‘snake-oil salesmen’.</p>

<p>Actually, effective SEO is pretty hard work, it’s not that easy, and it is a big deal. In my books, SEO remains misunderstood by the masses and I’m fast turning into Ms. Cranky-Pants when it comes to answering these detractors.</p></blockquote>

<p>Laura is right – there is much to learn from SEO.</p>

<p>So as stated above the layout and code of a website (called on-page optimisation in the SEO industry) can be changed and that will make the website more attractive to search engines. </p>

<p>I would state this is only maybe a 25-30% slice of the complete SEO pie. The rest is down to incoming links: links that point towards a website. </p>

<p>Let me introduce to you academic Albert-László Barabási. In the 1990s he carried out a famous study into how the World Wide Web has evolved organically and he found that despite no one person or body organising the expansion of the WWW, a very definite structure had taken shape rather than just chaos.</p>

<p>At its centre were a few hub websites and around them were the many node websites. The hub websites were the most important as they had a vast number of incoming links pointing at them. To give an example, BBC.co.uk is a hub website as there are tons of links going towards it from every conceivable direction, while a node website is this site, suburban-glory.com. I would like to think that it will one day be a hub, but at the moment it is a node and a drop in the internet ocean.</p>

<p>His formula for this reads:</p>

<p>D(k) = Z(k) -<sup>A</sup></p>

<p>This is probably one of the most important mathematical equations from modern times. It underpins the growing discipline of network science as well as the the main search engine algorithms. You've heard of the thesis about six degrees of separation? And that we are connected to anybody else on the planet by no more than six places? Well that originates in the work of Barabási.</p>

<p>The central part of the search engine formula is based on the importance of being linked to from these web hubs.</p>

<p>An incoming link from the BBC or the Times newspaper if far, far more important than a incoming link from Old Miss Tibbles Northampton Cat Lovers site. In the search engines eyes this really is a BIG thumbs up to your site. If these hubs are linking to your site then its value goes up in the eyes of the search engines and they deem it suitable for greater exposure in the rankings.</p>

<p>Google doesn't employ people to manually review every single site. It is reliant on automatically interpreting the quality and number of incoming links so to judge the worth of a site.</p>

<p>So if incoming links in SEO are extremely important and how do you get quality incoming links? That's another tutorial for another time. The point of this article is merely to emphasis the importance of SEO and its potential effect on the fortunes of any one website if understood and implemented correctly.
</p>

<p>---------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-havering.html">Havering Web Design</a></p>]]></description>
 <pubDate>2009-08-16T07:37:33Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">70 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[99% of Free Directories Are Not Worth Submitting To]]></title>
<link>http://www.suburban-glory.com/blog?page=69</link>
<description><![CDATA[<p>There are in the region of 100 or 200 new free directories posted up every month in the Solicitations &amp; Announcements forum at Digital Point. Of those roughly only about a dozen are worth submitting to.</p>

<p>Lets examine what makes a good directory and what makes a bad one.</p>

<p>The first rule of linking out is don't link to a bad neighbourhood. Traditionally, this means a malware site and you'll know when you link to one of those as Google informs you that this is the case in their Webmaster Tools section.</p>

<p>But other than sites that have been hacked and have viruses waiting to pounce on unsuspecting users, are there any other types of sites that you should not link to?</p>

<p>As a rule it is best to avoid gambling, porn and pharmacy sites. This isn't for any puritanical religious reasons, but simply the fact that most of the sites in these niches engage in blackhat tactics.</p>

<p>There are two reasons why they do so. Firstly, most webmasters refuse to link out to these types of sites. Google Adsense rules state that although they don't prohibit links to these niches, they certainly prohibit content. And the Google search engine bot won't particularly like indexing a page with sexually explicitly content on it. Consequently, owners of these types of sites carry out blackhat SEO techniques if they want to be successful.</p>

<p>Blackhat, for those that don't know, is to use tactics that violate Google rules in order to achieve good rankings.</p>

<p>That's not to say that there aren't reputable gambling, adult or pharmacy websites, there just aren't many of them; and with the money that can be made in these niches lots of webmasters would do anything in order to be successful.</p>

<p>So if you wouldn't link out to these types of websites would you submit your site to a directory that does?</p>

<p>The vast majority of the free directories that are listed on a site such as Digital Point freely link out to all these types of niches and demonstrate no editorial policy at all.</p>

<p>Some people even use semi-automatic directory submission software like DigiXmas and submit their site to hundreds, if not thousands of these spam-infested sites.</p>

<p>Having the bulk of your incoming links coming from these rubbish directories will not do your SEO campaign any good in the long-run. Google examines the quality of sites in any link pattern and it knows that spam loves spam; which means, spam sites are more likely to link to other spam sites.</p>

<p>A lot of SEO is about risk aversion - why take unnecessary risks in grey areas? Always check a directories index for dirty links before you submit to it by running through some keywords such as "viagra", "sex", "poker" and "gambling" in their search facility.</p>

<p>-----------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-barkingside.html">Barkingside Web Design</a></p>]]></description>
 <pubDate>2009-08-14T11:43:17Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">69 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Tweet: #welovethenhs]]></title>
<link>http://www.suburban-glory.com/blog?page=68</link>
<description><![CDATA[<p>I think that a lot of us Brits have been quite shocked and offended by the lies and slander that has been directed towards our National Health Service from certain minority groups in the United States</p>

<p>The Democrats with Obama at their head are trying to push forward the health care reforms that they failed to do in the 90s, and in the fierce debate organised opponents of the changes are telling complete lies about the British NHS.</p>

<p>To give an example US newspaper, the Investor's Business Daily, wrote:</p>

<blockquote><p>
"The controlling of medical costs in countries such as Britain through rationing, and the health consequences thereof, are legendary. The stories of people dying on a waiting list or being denied altogether read like a horror script.</p>

<p>"People such as scientist Stephen Hawking wouldn't have a chance in the UK, where the National Health Service would say the life of this brilliant man, because of his physical handicaps, is essentially worthless."
</p></blockquote>

<p>To which Professor Stephen Hawkings himself - currently in the US receiving the presidential medal of freedom - said: "I wouldn't be here today without the NHS".</p>

<p>Millions of Brits that have been deeply offended by these outlandish attacks are now hitting the Twittersphere with #welovethenhs.</p>

<p>---------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-redbridge.html">Redbridge Web Design</a></p>]]></description>
 <pubDate>2009-08-13T22:33:48Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">68 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using Drupal's Panels 3 Module]]></title>
<link>http://www.suburban-glory.com/blog?page=66</link>
<description><![CDATA[<p>I first used Panels 2 about a year ago for dofollow001.com. Panels allows the Drupal webmaster to add different sections and alter the layout without the need to tamper directory with the theme code.</p>

<p>It is a very powerful module and for those serious about Drupal web design it is inevitable that sooner or later you will end up using it.</p>

<p>There were some <a href="http://www.lullabot.com/drupal-voices/drupal-voices-29-earl-miles-panels-3-future-views">fundamental code problems with Panels 2</a> that could only can be resolved by tearing it up from the roots and starting again. Hence the recent release of Panels 3, albeit as a release candidate.</p>

<p><img src="http://www.suburban-glory.com/images/drupal1.png" alt="Drupal Logo" class="leftimage" width="250" height="286" /></p>

<p>The main coder for this project is <a href="http://www.angrydonuts.com/">Earl Miles</a> and the funding for much of the work has come from Sony due to the necessity of this module on their own Drupal site.</p>

<p>Panels like Views, CCK and Contemplate are essential addons for most Drupal installations as they allow the webmaster to create fundamental changes in layout and structure with little or no knowledge of PHP.</p>

<p>I took a deep breath before upgrading from Panels 2 to 3 as I wasn't sure what sort of learning curve to expect. The first thing I did was completely remove version 2; including deleting the MySQL tables. It was clear that such a version jump would need a clean slate.</p>

<p>Then I read the “Read Me” text file which said:</p>

<blockquote><p>
A little documentation should go here, but Panels 2 is a beast - you're best off checking the online handbook on Drupal.org, or the developer/API docs, which are available at http://doxy.samboyer.org/panels2/ 
</p></blockquote>

<p>Well that wasn't helpful and <a href="http://doxy.samboyer.org/panels2/">the file it pointed to</a> looked seriously complicated.</p>

<p>Looking for help elsewhere I found some tutorials but they were from the beginning of year when Panels 3 was in a more primitive state.</p>

<p>Okay then, I thought, lets make some coffee and get prepared for a long day.</p>

<p>As it happens it only took a couple of hours to get the layout I wanted (see dofollow001.com). The interface of Panels 3 is extremely intuitive as it allows a step-by-step progression from the first parts of creating a layout to the last. In this regard it is certainly a far superior beast than Panels 2 ever was.</p>

<p>Admittedly, I have used both Views and Panels before so I'm not sure how a complete novice to this side of Drupal would find it, but I reckon it wouldn't be too complicated for somebody who is a bit green.</p>

<p>I think what I'll do is create a guide to the basics of using this module with screenshots.
</p>

<p>--------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-seven-kings.html">Seven Kings Web Design</a></p>]]></description>
 <pubDate>2009-08-12T09:58:45Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">66 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Using the Right Drupal Modules to Stop Troublesome Users and Spam]]></title>
<link>http://www.suburban-glory.com/blog?page=65</link>
<description><![CDATA[<p>I run a free press release distribution site called PressRelease001.com and for some time I've had a problem with a number of registered members who sign up under different user names and submit poor quality and unwanted items.</p>

<p>These users are particularly keen on submitting items that are based around pay day loans. I use the <a href="http://drupal.org/project/modr8">Modr8</a> module that reinstates useful functionality that was removed from the core of version 5 onwards and which allows the webmaster to hold back submissions in a moderation queue and then send a refusal or acceptance email after they have been denied or approved.</p>

<p><img src="http://www.suburban-glory.com/images/drupal1.png" alt="Drupal Logo" class="leftimage" width="250" height="286" /></p>

<p>Now one would think that repeatedly receiving rejection emails would put off these individuals from submitting anything further to PressRelease001, but it isn't the case.</p>

<p>This service is free for everybody and at the moment I'm hardly making any money from Adsense. A couple of weeks ago I snapped while looking at yet another moderation list of “info-spam”.</p>

<p>I've had <a href="http://drupal.org/project/false_account">False Account Detector</a> installed and active for some months so I knew that the problem  users didn't number in their hundreds but were actually four or five individuals who were creating multiple accounts. There is a supposed block facility with False Account Detector but it doesn't seem to be working.</p>

<p>So in stepped <a href="http://drupal.org/project/troll">Troll</a> and <a href="http://drupal.org/project/misery">Misery</a>. The particular benefit of Troll is it allows the webmaster to easily ban a user by IP address; while Misery allows a user to be inflicted with random 403 or 404 pages, forcing them away from the site without actually banning them outright.</p>

<p>And to war I went. It took a couple of weeks but eventually I managed to stop most of these idiots – inflicting “misery” on them was particularly satisfying.</p>

<p>If you are dealing with user-generated content on a Drupal site then it is impossible to stop spam outright, but you can contain the problem and stop it from getting out of control.
</p>

<p>------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-hackney.html">Hackney Web Design</a></p>]]></description>
 <pubDate>2009-08-11T08:22:29Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">65 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Creating a multi-column layout with PHP and tables or CSS.]]></title>
<link>http://www.suburban-glory.com/blog?page=64</link>
<description><![CDATA[<p>There are many reasons why data from a database needs to be presented in an attractive multi-column layout. It may be that you have a list of user names or site editors and contributors to display, or a list of categories for visitors to browse.</p>

<p>It is for the latter case that I needed both two and three column layouts for a directory script I was writing for my own personal site.</p>

<p>If you have a grasp of PHP and CSS it is actually a fairly straight forward task and below are two ways of achieving this with tables or CSS for styling.</p>

<p>Firstly, lets take a look at the code for creating a table layout:</p>

<pre>

$find_data = mysql_query("SELECT * from category");

while ($result = mysql_fetch_array($find_data)) {
	
$data[] = $result;

}

$data = array_chunk($data, 2);

echo '&lt;table id="data-output" border="1"&gt;';
foreach ($data as $row) {
	
    echo'&lt;tr&gt;';

    foreach ($row as $column) {
        print '&lt;td&gt;' . $column['name'] . '&lt;/td&gt;';
    }

    echo '&lt;/tr&gt;';
}

echo '&lt;/table&gt;'; 

</pre>

<p>PHP coders will be familiar with the first part of this block of code. It is simply taking all data from the table called category and leaving it in an array called $data.</p>

<p>From here it is a case of putting it through the array_chunk() function and cutting it down into equal sized amounts, which above is 50/50.</p>

<p>This is then passed through two foreach loops to achieve a tables-based layout.</p>

<p>Change the number of columns by changing the number in the array_chunk function; 3 for three columns, 4 for four columns and so on.</p>

<p>And that's it. </p>

<p>But what about a non-table output?</p>

<p>Lets make some simple changes to the code and add a little CSS.</p>

<p>So we're call the data from the table as before and we'll still pass it through the array_chunk() function, but instead of tables we're now make sure the code outputs as an unordered list:</p>

<pre>

foreach ($data as $row) {
	
    echo'&lt;ul class="row"&gt;';

    foreach ($row as $column) {
        print '&lt;li class="column"&gt;' . $column['name'] . '&lt;/li&gt;';
    }

    echo '&lt;/ul&gt;';
}

</pre>

<p>And add a bit of styling to the row class:</p>

<pre>

.row {
list-style-type: none;
float:left;
width: 150px;
margin-right : 15px;
}

</pre>

<p>The margin-right declaration will create guttering inbetween the columns.</p>

<p>You need to play around with the CSS and the number in array_chunk() to achieve the right number of columns for your needs.</p>

<p>What I also do is add an incremental number to the PHP like so:</p>

<pre>

$i = 1;

foreach ($data as $row) {
	
    echo'&lt;ul class="row"&gt;';

    foreach ($row as $column) {
        print '&lt;li class="column' . $i++  .' "&gt;' . $column['name'] . '&lt;/li&gt;';
    }

    echo '&lt;/ul&gt;';
}

</pre>

<p>This allows the styling of each column though it does create a lot more CSS code.</p>

<p>So here are two different ways to present data in a multicolumn format using PHP and tables or CSS.</p>

<p>To see an example of this in action then take a look at my directory here: <a href="http://www.suburban-glory.com/directory.html">http://www.suburban-glory.com/directory.html</a></p>]]></description>
 <pubDate>2009-08-08T06:18:57Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">64 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Hack to turn off collapsible / collapsed fieldsets in Drupal forms]]></title>
<link>http://www.suburban-glory.com/blog?page=63</link>
<description><![CDATA[<p>The more complex a form in Drupal the more likely it will use Javascript to collapse certain sections.</p>

<p>In many ways it's a good thing for usability as the submit and preview buttons are at the bottom of a form and the less scrolling down to reach these the better.</p>

<p>However, the other day on one of my sites I was using a prototype.js JavaScript framework and I noticed it was clashing with the collapse.js file and causing the collapsible sections to be unavailable.</p>

<p>I wanted keep this extra Javascript on the site as it was there for a useful purpose (I'll be revealing all soon!) but not being that proficient with this client-side language I needed a way of dealing with the bug without tampering with Javascript.</p>

<p>The hack was actually pretty simple. I merely changed a name of HTML class in the core files so that it read “no” (I could have written anything) rather than “collapsed”:</p>

<pre>
function phptemplate_fieldset($element) {
  if (!empty($element['#collapsible'])) {
    drupal_add_js('misc/collapse.js');


    if (!isset($element['#attributes']['class'])) {
      $element['#attributes']['class'] = '';
    }

    $element['#attributes']['class'] .= ' collapsible';
    
    if (!empty($element['#collapsed'])) {
      $element['#attributes']['class'] .= ' no';
    }
  }

  return '&lt;fieldset'. drupal_attributes($element['#attributes']) .'&gt;'. ($element['#title'] ? '&lt;legend&gt;'. $element['#title'] .'&lt;/legend&gt;' : '') . (isset($element['#description']) &amp;&amp; $element['#description'] ? '&lt;div class="description"&gt;'. $element['#description'] .'&lt;/div&gt;' : '') . (!empty($element['#children']) ? $element['#children'] : '') . (isset($element['#value']) ? $element['#value'] : '') ."&lt;/fieldset&gt;n";
}
</pre>

<p>The actual function is called theme_fieldset() and it can be found in form.inc. I renamed the function phptemplate_fieldset() to override it and placed it in the template.php file.</p>

<p>Now no Javascript collapsible boxes are enacted on any form in Drupal.</p>]]></description>
 <pubDate>2009-08-07T06:47:43Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">63 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Carefully choosing web safe fonts for web design]]></title>
<link>http://www.suburban-glory.com/blog?page=62</link>
<description><![CDATA[<p>Not always, but most of the time I stick to Helvetica for titles and Verdana in CSS files. The vast majority of web designers have a very few number of fonts that they prefer. It's not that there isn't the choice of fonts available, it's because of poor support across the various operating system.</p>

<p><a href="http://media.24ways.org/2007/17/fontmatrix.html">This guide</a> reveals that the fonts available across both Windows and Macs are Arial, Arial Black, Comic Sans MS, Courier New, Georgia, Impact, Times New Roman, Trebuchet MS and Verdana.</p>

<p>And that's it! Even my precious Helvetica is not available across the board as it does not come shipped with Windows.</p>

<p>Obviously specifying a font that isn't available will lead to all sorts of trouble so web designers counter this by creating a fall back list. The pre-configured Dreamweaver choices are:</p>

<ul><li>
Arial, Helvetica, sans-serif
</li>
<li>
"Times New Roman", Times, serif
</li>
<li>
"Courier New", Courier, monospace
</li>
<li>
Georgia, "Times New Roman", Times, serif
</li>
<li>
Verdana, Arial, Helvetica, sans-serif
</li>
<li>
Geneva, Arial, Helvetica, sans-serif
</li>
</ul><p>So taking the first line as an example, the first choice is Arial but if that is not available on the operating system then it falls back to Helvetica, and if that is not available it requests the machines sans-serif as a last resort. In CSS these are called font stacks.</p>

<p>Much of what web designers use as their choice of font comes through experience.</p>

<p>For instance, a much under discussed problem is that of cheap (standard?) LCD screens that bleach out colour and make the smoothest of font curves resemble a jagged cliff edge, and I've found that as long as they are less than 20px then Helvetica and Verdana are best able to deal with the large variety of screens on the market. </p>

<p>When it comes to font stacks <a href="http://unitinteractive.com/blog/2008/06/26/better-css-font-stacks/">Nathan Cord at Unit Interactive</a> has graciously bestowed his font stack wisdom to us.</p>

<p>The font stacks below are based on grouping fonts together from the same type classification or the same type designer.</p>

<p>p - balanced for paragraphs or body copy</p>

<p>t - balanced for headlines or titles</p>

<ul><li>
Arial, Helvetica Neue, Helvetica, sans-serif - p, t
</li>
<li>
Baskerville, Times New Roman, Times, serif - p
</li>
<li>
Baskerville, Times, Times New Roman, serif - t
</li>
<li>
Cambria, Georgia, Times, Times New Roman, serif - p, t
</li>
<li>
Century Gothic, Apple Gothic, sans-serif - p, t
</li>
<li>
Consolas, Lucida Console, Monaco, monospace - p, t
</li>
<li>
Copperplate Light, Copperplate Gothic Light, serif - p, t
</li>
<li>
Courier New, Courier, monospace - p, t
</li>
<li>
Franklin Gothic Medium, Arial Narrow Bold, Arial, sans-serif - p, t
</li>
<li>
Futura, Century Gothic, AppleGothic, sans-serif - p, t
</li>
<li>
Garamond, Hoefler Text, Times New Roman, Times, serif - p
</li>
<li>
Garamond, Hoefler Text, Palatino, Palatino Linotype, serif - t
</li>
<li>
Geneva, Lucida Sans, Lucida Grande, Lucida Sans Unicode, Verdana, sans-serif - p
</li>
<li>
Geneva, Verdana, Lucida Sans, Lucida Grande, Lucida Sans Unicode, sans-serif - t
</li>
<li>
Georgia, Palatino, Palatino Linotype, Times, Times New Roman, serif - p
</li>
<li>
Georgia, Times, Times New Roman, serif - t
</li>
<li>
GillSans, Calibri, Trebuchet, sans-serif - p
</li>
<li>
GillSans, Trebuchet, Calibri, sans-serif - t
</li>
<li>
Helvetica Neue, Arial, Helvetica, sans-serif - p
</li>
<li>
Helvetica, Helvetica Neue, Arial, sans-serif - t
</li>
<li>
Impact, Haettenschweiler, Arial Narrow Bold, sans-serif - p, t
</li>
<li>
Lucida Sans, Lucida Grande, Lucida Sans Unicode, sans-serif - p, t
</li>
<li>
Palatino, Palatino Linotype, Georgia, Times, Times New Roman, serif - p
</li>
<li>
Palatino, Palatino Linotype, Hoefler Text, Times, Times New Roman, serif - t
</li>
<li>
Tahoma, Geneva, Verdana - p
</li>
<li>
Tahoma, Verdana, Geneva - t
</li>
<li>
Times, Times New Roman, Georgia, serif - p, t
</li>
<li>
Trebuchet, Lucida Sans Unicode, Lucida Grande, Lucida Sans, Arial, sans-serif - p
</li>
<li>
Trebuchet, Tahoma, Arial, sans-serif - t
</li>
<li>
Verdana, Geneva, Tahoma, sans-serif - p
</li>
<li>
Verdana, Tahoma, Geneva, sans-serif - t
</li>
</ul><p>I would wager that a finer list of appropriate font stacks can't be found anywhere else on the web.</p>

<p>----------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-hackney.html">Hackney Web Design</a></p>]]></description>
 <pubDate>2009-08-06T01:18:36Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">62 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Are web design companies going bust left, right and centre or is the Yahoo directory shit?]]></title>
<link>http://www.suburban-glory.com/blog?page=61</link>
<description><![CDATA[<p>The other day I was looking at <a href="http://uk.dir.yahoo.com/Regional/Countries/United_Kingdom/England/Counties_and_Regions/Essex/Business_and_Shopping/Business_to_Business/Communications_and_Networking/Internet_and_World_Wide_Web/Web_Site_Designers/">web design companies listed in the Yahoo directory in my county of England, Essex</a>. On the list itself at least half the links were going to dead sites.</p>

<p>My initial reaction was surprise that so many companies were like the Monty Python Parrot and had ceased to exist.</p>

<p>Has the creative industries during the last 12 months of economic recession taken such a pounding? Or have these sites died off over a number of years and Yahoo is rubbish at clearing out dead links from its directory?</p>

<p><img src="http://www.suburban-glory.com/images/yahoo1.png" alt="Yahoo Logo" class="leftimage" width="200" height="50" /></p>

<p>I tried to carry out some research by checking the domain names on the <a href="http://www.archive.org/">Internet Archive</a> to see the last time their were active, but in recent years they have seemed far less likely to index a site and so TheWayBackMachine drew a blank.</p>

<p>Other than this place I'm not sure how to check the last time a website was active. </p>

<p>So as of yet the opening question - Are web design companies going bust left, right and centre or is the Yahoo directory shit? - is yet to be answered.</p>

<p>--------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-ilford.html">Ilford Web Design</a></p>]]></description>
 <pubDate>2009-08-05T11:47:17Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">61 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Checking your backlinks with Majestic SEO]]></title>
<link>http://www.suburban-glory.com/blog?page=60</link>
<description><![CDATA[<p>Widely used and known about in professional SEO circles, <a href="http://www.majesticseo.com/">Majestic SEO</a> is perhaps not such a familiar tool amongst happy SEO amateurs. </p>

<p>But if you really want to get under the bonnet of your own backlinks then Majestic is the service you should sign up for.</p>

<p>Other free methods of analysing backlinks are through Google's Webmaster Tools console, which is as good as useless due to only selective links being shown; while Yahoo offers a more complete listing but only 1,000 links are viewable or available to download as CSV file.</p>

<p><img src="http://www.majesticseo.com/images/misc/majestic-seo-logo-small.png" width="225" alt="Majestic SEO" class="leftimage" /></p>

<p>Majestic-SEO claims to be the biggest backlinks and anchor text database in the world, with over 77 billion webpages and 539 billion individual links analysed, although SEOmoz claims 38 billion URLs across 240 million domains. </p>

<p>Majestic-SEO is owned by Majestic-12 Ltd and the data they hold is for their own search engine <a href="http://www.majestic12.co.uk/">here</a>.</p>

<p>From their "about us" page:</p>

<blockquote><p>
Anchor Index is a system designed for research of relevancy algorithms that are heavily based on backlinks and anchor text. This index is currently under heavy development, so consider this interface being a beta version that can change or go down at any time. 
</p></blockquote>

<p>Information on websites you own is free to access. Majestic-12 Ltd make their money by charging for reports on competitors.</p>

<p>They aim to one day hopefully launch a search engine 'to mount an attack on the leading search engines in terms of quality and quantity of the index'. Although having used their search engine I would state that they have some way to go yet.</p>

<p>However, the data available to webmasters and SEO practitioners is fantastic.</p>

<p>Backlinks can be organised via the following ways: anchor text, countries, TLDS, IPs, Class C Sub Nets and referring domains.</p>

<p>It can even go as far as breaking down newly found links on a daily basis. That's not to say that a link created one day will be visible in their data the next as it depends on when that link is found by their crawler.</p>

<p>They also mark links that have the nofollow microformat and list whether the link is an image or uses alternative text in the image.</p>

<p>Links are measured with their own graded numbers system which they call <a href="https://www.majesticseo.com/glossary.php#ACRank">ACRank</a>. This is similar in intention to MozRank or PageRank in that it provides a quick measure of the worth of a page, although it is based on a more primitive calculation than either of those two with only the total number of incoming links involved in the calculations.</p>

<p>And, what's more, it is possible to download the details about your entire number of backlinks as an Excel-readable file.</p>

<p>The free service offered by Majestic-SEO is, er, rather majestic!</p>

<p>------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-buckhurst-hill.html">Buckhurst Hill web design</a></p>]]></description>
 <pubDate>2009-08-01T08:09:40Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">60 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[Firefox achieves 1 billions downloads]]></title>
<link>http://www.suburban-glory.com/blog?page=59</link>
<description><![CDATA[<p>Firefox the browser is almost becoming a cult amongst ever increasing sections of internet users and as a brand it is as trusted as Google.</p>

<p>There can be no doubt that the business model of the Mozilla Foundation has dramatically altered the software creation world with the proprietary model now seen as slow and cumbersome and the open source alternative having the necessary fluidity.</p>

<p>Let us remind ourselves of Bill Gates infamous <a href="http://www.blinkenlights.com/classiccmp/gateswhine.html">“Open Letter to Hobbyists”</a> from 1976:</p>

<blockquote><p>
The feedback we have gotten from the hundreds of people who say they are using BASIC has all been positive. Two surprising things are apparent, however, 1) Most of these "users" never bought BASIC (less than 10% of all Altair owners have bought BASIC), and 2) The amount of royalties we have received from sales to hobbyists makes the time spent on Altair BASIC worth less than $2 an hour.</p>

<p>Why is this? As the majority of hobbyists must be aware, most of you steal your software. Hardware must be paid for, but software is something to share. Who cares if the people who worked on it get paid?</p></blockquote>

<p>Previously all software code was open and available for everybody to use; Gates' declaration put barriers around it and locked it down to the company that produced it.</p>

<p>The open source methodology has now superseded Gates' proprietary software, and by and large we have Firefox to thank for that.</p>

<p><img src="http://www.suburban-glory.com/images/firefox-logo.png" alt="Firefox Logo" class="leftimage" width="244" height="241" /></p>

<p>The collective of coders who contribute their time for free have created something far more cutting edge and progressive than Microsoft's Internet Explorer. This, in turn, has been emulated by Google and Yahoo who have entered the open source spirit with gusto. Even Twitter, while not embracing open source, have opened up their database for developers to create their own applications.</p>

<p>The success of Firefox has been borne out in the statistics, with IE once commanding over 95% of the browser market and now Firefox commands 22.51% of the recorded usage share of web browsers and increasing on a month-by-month basis.</p>

<p>It has now reached a staggering <a href="http://onebillionplusyou.com/">one billion downloads</a>.</p>

<p>Congratulations to all the Mozilla team.</p>

<p>--------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-woodford.html">Woodford web design</a></p>]]></description>
 <pubDate>2009-07-31T12:46:01Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">59 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The Crazy World of Online Web Design and SEO Forums]]></title>
<link>http://www.suburban-glory.com/blog?page=58</link>
<description><![CDATA[<p>If you have any interest in either webdesign, programming or internet marketing then you would have definitely joined one, some or all of the following forums: <a href="http://forums.digitalpoint.com/">Digital Point</a>, <a href="http://www.sitepoint.com/forums/">Sitepoint</a>, <a href="http://www.warriorforum.com/">Warrior</a> and <a href="http://sphinn.com/">Sphinn</a>.</p>

<p>They are all lively, popular hubs of discussion, with Digital Point having over 260,000 members and Warrior Forums being filled with nearly 450,000 posts in its second incarnation.</p>

<p>Under various names I have been a regular reader and contributor on all four of these websites. I've enjoyed some more than others and here is my review of them all.</p>

<h3>Warrior Forums</h3>

<p>Warriors is more focused on affliate marketing than the other three, and is the only one of the four to have a paid section.</p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/warrior.gif" alt="Warrior Forums" class="leftimage" width="231" height="65" /></p>

<p>Sub-forums include The Copywriting Forum, Ad Networks and Programming Talk.</p>

<p>What makes me most laugh about Warrior (other than the name!) is the sub-forum entitled  "Mind Warriors - Success, Power, Self-Improvement". <span class="italic">Think your way to success</span>... that'll work! It's like a throwback to Samuel Smiles and Eighties self-help VHS tapes.</p>

<p>A typical thread reading:</p>

<blockquote><p>
I am writing this message to all the rookies like me! Well, now that I think about it, you are probably not like me. I am a 57-year-old grandmother who lives on a tiny farm in the middle of a cow field in Central Washington.</p>

<p>Anyway, last December I was financially desperate. I won't tell you my whole sob story, but the bottom line is that I was out of money and still had $1000s of bills to pay each month!</p>

<p>So I had to reinvent myself. I had been in real estate investing and when the bottom dropped out of the market, it took all my financial resources with it.</p>

<p>I started reading Your Portable Empire by Pat O'Bryan and that's when I decided to try Internet Marketing.</p>

<p>So I bought a couple eBooks that taught me what to do . . . and I started. I followed the writers' advice to the letter. One of the eBooks was about writing eBooks and the other was about getting traffic to your site.</p>

<p>Here is my encouragement to you! I had never done this before! I was a writer and I had a laptop, but that's about as much as I could bring to the table. On top of it, I had very little money! So I had to make things happen with a minimal investment!</p>

<p>I ended up spending less than $100, wrote and started selling two eBooks of my own . . . and within just over 5 weeks, I made more than $12,000. What I’ve since learned is that this is even more amazing since the two eBooks I wrote and I sold were both priced at under $10 each.</p></blockquote>

<p>And it goes on and on - it's almost as believable as Nigerian 419er: "Hello Sire, I am a princess living on a tiny farm in the middle of a cow field in Central Washington. My husband King Nuembela has just deposited $20 million dollars in an offshore account, I need you to... "</p>

<p>The comments underneath are ridiculous:</p>

<blockquote><p>What a terrific story Susan!...also, I'm going to pick up Your Portable Empire by OBryan. Sounds like it belongs in my library, too.</p></blockquote>

<p></p>

<blockquote><p>Thanks for your inspiration. I'm a new warrior and new to IM and you have given me a lot to think about. I wish you much more success and happiness. Thanks for sharing.
</p></blockquote>

<p></p>

<blockquote><p>That's inspiring! Just goes to show you that more can happen on the Internet than most people can dream of</p></blockquote>

<p>It's like - <span class="italic">get real people</span>. This isn't the outpourings of a 57-year-old grandmother from Washington. It's somebody trying to sell you an Ebook - it's a marketing pitch.</p>

<p>(I couldn't resist it. On the thread I wrote: "This story filled me with tears. God bless America! God bless the world!" The sarcasm was lost on these schmucks though)</p>

<p>A forum for warriors? Whatever.</p>

<h4>Digital Point</h4>

<p>Over at <a href="http://www.nickycakes.com/2008-top-10-worst-make-money-online-sites/">nickycakes.com</a>, Mr Cake(hole)has been less then complimentary to Digital Point:</p>

<blockquote><p>The place is just a cesspool of 3rd world scammers trying to make a few dollars a month clicking their own adsense ads.  It’s really impossible to describe, and the Cakes is probably preaching to the choir here, but if you’re part of the 1% of the readers who have not been there before, you really have to see it for yourself.  Make your way to the google adsense section on a rainy sunday weekend for more laughs than you can handle.</p></blockquote>

<p>I myself haven't visited much over the last 12 months - and even then it was just to go to the politics sub-forum.</p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/dps_logo.gif" alt="Digital Point" class="leftimage" width="209" height="85" /></p>

<p>The reason for that is I haven't had anything to drink since last summer (no, I've not been going to AA meetings instead).</p>

<p>You've got to be pissed to find Digital Point alluring. The drunken man never listens - he is only intent on giving an opinion. Read the threads. People just post with out properly reading the OP or its responses, consequently threads go on for pages without focus. It really is Digital "fluff" Point.</p>

<p>This all comes from a mistaken believe that building up 5,000 signature links will result in a successful SEO campaign.</p>

<p>Note as well the obligatory new daily thread in the Google sub-forum entitled 'When is the next PageRank update?'.</p>

<p>Digital Point seems to attract the youngest crowd with past surveys revealing that the majority of members are lads under the age of 21.</p>

<h5>Sphinn</h5>

<p>This Digg-clone was created by Danny Sullivan's Search Engine Land, and because it came from the god-awful Pligg CMS it seems to be the major stopping off point for every spam whore on the net.</p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/sphinn.gif" alt="Sphinn" class="leftimage" width="310" height="94" /></p>

<p>Admittedly, there are some good articles that make it to the frontpage but at the same time in typical SEO fashion there's a lot of gaming going on which means your more likely to find mediocre items then anything inspiring; and debates, when they happen, frequently boil down to the "I've got the biggest SEO cock" variety.</p>

<h6>Sitepoint</h6>

<p>The atmosphere at Sitepoint is really quite chilled and it has an ambiance of a caring uncle about it.</p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/sitepoint-logo.gif" alt="Sitepoint" class="leftimage" width="220" height="69" /></p>

<p>It is somewhere where I would point people if their are seeking qualified advice - although it is probably the only place on the internet where people become over-defensive about the Opera browser. </p>

<p>At times though it is just too slow with not enough new threads to keep me coming back regularly.</p>

<p>So, for now anyway, you're more likely to find me over at Sitepoint, although all of them hold some sort of attraction, no matter how weird.</p>

<p>-------------------</p>

<p><a href="http://www.suburban-glory.com/regions/web-design-chigwell.html">Chigwell web design</a></p>]]></description>
 <pubDate>2009-07-30T09:49:14Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">58 at http://www.suburban-glory.com</guid>
</item>
<item>
<title><![CDATA[The Best Blog Directory List in the World...Ever!]]></title>
<link>http://www.suburban-glory.com/blog?page=57</link>
<description><![CDATA[<p>I created a comprehensive and detailed list of blog directories in five parts over at dofollow001.com. Here they are put together into one long list.</p>

<p>Some of these directories require that you register first while some others ask for a reciprocal link, but they are all free to submit to.</p>

<p>I've examined them as so: The year the site was created; the exact number of pages indexed in Google; the number of backlinks to the domain as recorded by Yahoo; the Google PageRank of the homepage; whether the links are "dofollow", nofollow or a redirect; Quantcast data, if any; whether there is any editorial policy or whether they accept anything, and I also checked the index for gambling, pharmacy and porn sites to see if they link out to loads of low-quality spam sites.</p>

<div class="blog-directory">

<p><a href="http://www.blogged.com/" rel="nofollow">Blogged.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogged_header.gif" alt="Blogged.com" width="163" height="53" style="background-color:#000000;" /><br /><span class="strong">Year Site Created:</span> 2000
<span class="strong">Indexed Pages in Google:</span> 626,000
<span class="strong">Backlinks in Yahoo:</span> 4,162,405
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogged.com">8,140</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but editorial approved</p>

<p><a href="http://www.blogarama.com/" rel="nofollow">Blogarama.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogarama.png" alt="blogarama.com" width="234" height="100" /><br /><span class="strong">Year Site Created:</span> 2002
<span class="strong">Indexed Pages in Google:</span> 11,200
<span class="strong">Backlinks in Yahoo:</span> 6,815,785
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogarama.com">171,180</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> None stated but editorially approved before publication.</p>

<p><a href="http://www.blogcatalog.com" rel="nofollow">Blogcatalog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogcatalog.png" alt="Blogcatalog.com" width="277" height="67" style="background-color:#000000;" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 5,870,000
<span class="strong">Backlinks in Yahoo:</span> 2,570,000
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogcatalog.com">568</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but submissions are editorially approved.</p>

<p><a href="http://www.bloggernity.com/" rel="nofollow">Bloggernity.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/boggernity.gif" alt="Bloggernity.com" width="182" height="45" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 35,400
<span class="strong">Backlinks in Yahoo:</span> 2,224,331
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/bloggernity.com">227,763</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but submissions are editorially approved.</p>

<p><a href="http://www.bloghub.com/" rel="nofollow">Bloghub.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloghub.jpg" alt="Bloghub.com" width="214" height="63" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 18,400
<span class="strong">Backlinks in Yahoo:</span> 1,863,968
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/bloghub.com">278,768 </a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but submissions are editorially approved.</p>

<p><a href="http://www.globeofblogs.com/" rel="nofollow">Globeofblogs.com</a></p>

<p><span class="strong">Year Site Created:</span> 2001
<span class="strong">Indexed Pages in Google:</span> 18,800
<span class="strong">Backlinks in Yahoo:</span> 1,543,665
<span class="strong">PageRank:</span> 7
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website:</p>

<blockquote><p>I receive several emails a week inquiring why weblogs are not yet showing up. I'm not always able to answer these emails individually, and have updated the FAQ with a section that may answer the question "I submitted my weblog a while ago, so why isn't it listed yet?" It's possible that it could be for one of the reasons listed below:</p>

<p>1. The site submitted is a .rss or .xml page. Globe of Blogs is not a feed aggregator. (If your site has a .rss or .xml feed that's fine, just please don't submit it as your listing.)
2. The site submitted is a commercial site with no weblog content.
3. The site submitted does not contain any weblog content.
4. The site submitted has one or fewer weblog posts.
5. The submission was incomplete -- usually an invalid URL.
</p></blockquote>

<p><a href="http://www.bloghop.com/" rel="nofollow">Bloghop.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloghop.gif" alt="Bloghop.com" width="110" height="40" /><br /><span class="strong">Year Site Created:</span> 2000
<span class="strong">Indexed Pages in Google:</span> 103,000 
<span class="strong">Backlinks in Yahoo:</span> 542,700
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/bloghop.com">200,223</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website:</p>

<blockquote><p>
We will reject: Spam blogs, hate blogs, stolen blogs, links to non-blog websites, links to illegal or illicit topics like child pornography. Blogs with under 5 posts are no longer accepted, but they might be waitlisted for later review if they look cool.</p>

<p>Commercial blogs are fine, but they must be "fun and useful." Because of the huge amount of robot-generated blogs being submitted, blogs with the following will not be approved for listing: Acne, Mesothelioma, Real Estate, Lawsuits, Insurance, Gambling, SEO, Web Marketing, Medical Procedures and Enlargements, "Profit from Home", the boring Financial ones (you know who you are). Blogs submitted as "non-commercial" that are clearly commercial will also be rejected. If your commercial blog is on one of these topics, it better be very good. All submitted commercial blogs will be reviewed. 
</p></blockquote>

<div>

<p><a href="http://www.blog-search.com/" rel="nofollow">Blog-search.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsearch.jpg" alt="Blog-search.com" /><br /><span class="strong">Year Site Created:</span> 2009
<span class="strong">Indexed Pages in Google:</span> 1,200
<span class="strong">Backlinks in Yahoo:</span> 275,630
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blog-search.com">305,116</a>
<span class="strong">Editorial Policy:</span> yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but all submissions are editorially approved.</p>

</div>

<p><a href="http://www.blogtoplist.com/" rel="nofollow">Blogtoplist.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogtoplist.jpg" alt="Blogtoplist.com" width="232" height="84" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 182,000
<span class="strong">Backlinks in Yahoo:</span> 7,003,214
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogtoplist.com">3,192</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the website:</p>

<blockquote><p>
The membership is free and is for blog authors only. You are not allowed to sign up with someone else blog and/or with sites that are not blogs.</p>

<p>You are not allowed to use bad language in your site title or description. Blogs that do this will be warned, changed and/or even removed from the database without any warnings. Don't use capitals in the wrong way and don't use other characters to try to get more attention in the list. Your blog must be placed in a category that fits the subject of your blog. Blogs that don't follow this will be moved and deranked (score set to zero). You are also not allowed to use computer bots to get a better score. Blogs that use cheats will find them them self permanent banned from the toplist.</p>

<p>You are not allowed to sign up if your blog contains information that is illegal and not accepted by the laws of United States of America or Sweden.</p>

<p>We are not allowing blogs that has mainly pornographic content. Blogs like that will be removed and banned from the directory. 
</p></blockquote>

<p><a href="http://www.bloggapedia.com/" rel="nofollow">Bloggapedia.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloggapedia.png" alt="Bloggapedia.com" width="384" height="54" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 84,800
<span class="strong">Backlinks in Yahoo:</span> 1,053,582
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/bloggapedia.com">465,558</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the website:</p>

<p>* Your blog must be at least 3 months old with consistent posts in order to be accepted. </p>

<p>* Blog description must be at least 250 characters.</p>

<p><a href="http://www.blogflux.com/" rel="nofollow">Blogflux.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogflux.gif" alt="Blogflux.com" width="153" height="35" /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 497,000
<span class="strong">Backlinks in Yahoo:</span> 10,569,551
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogflux.com">12,315</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the website:</p>

<blockquote><p>
Please read this carefully. Due to abuse and spam, the following rules are in effect:</p>

<p>    * --We do not allow sites that feature adult content (nudity included), promote illegal activities, promote hate, feature warez, and/or are not blogs. Shill sites intended to do nothing more than garner traffic for another site are also rejected. This is to keep the directory both useful and also to cut down on spam.
    * --This is a blog directory - do not submit article sites, content sites, or such. They will be rejected.
    * --Each site is manually approved. Your site will not appear in the directory until approved by us.
    * --Linking back is nice, but not required.
    * --Optional information is highly recommended as it gives more ways of letting readers find your site. We highly recommend filling it.
    * --International characters: the site utilizes UTF-8 encoding - if you submit international characters, please ensure it is in that format.
    * --Spamming will result in you being banned from the directory (and no one wants that!)
    * --If your blog is new: Because of the large amounts of spam we receive, your blog must be 7 days old and have a minimum of 5 posts. It sounds draconian, but this rule is an unfortunate side effect of spammers. Hate them, not us (please)!
</p></blockquote>

<p><a href="http://www.superblogdirectory.com/" rel="nofollow">Superblogdirectory.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/superblogdirectory.gif" alt="Superblogdirectory.com" width="254" height="117" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 6,550
<span class="strong">Backlinks in Yahoo:</span> 194,321
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> <a href="http://www.superblogdirectory.com/submit.php" rel="nofollow">Detailed editorial policy here</a></p>

<p><a href="http://www.blogoriffic.com/" rel="nofollow">Blogoriffic.com</a></p>

<p><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 6,010
<span class="strong">Backlinks in Yahoo:</span> 148,028
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> No
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> None</p>

<p><a href="http://www.blogsrating.com/" rel="nofollow">Blogsrating.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsrating.gif" alt="Blogsrating.com" width="135" height="95" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 391
<span class="strong">Backlinks in Yahoo:</span> 23,303
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Mofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website:</p>

<blockquote><p>
Please save our time by not submitting spam and junk sites. Each blog is carefully reviewed by hand and regularly checked by our bots afterwards. Our idea is to have useful directory and not a link farm.
</p></blockquote>

<p><a href="http://www.blogs-collection.com/" rel="nofollow">Blogs-collection.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogcollection.gif" alt="blogs-collection.com" width="179" height="22" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 3,090
<span class="strong">Backlinks in Yahoo:</span> 284,134
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> NoFollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but editorially reviewed before publication</p>

<p><a href="http://www.browseblogs.com/" rel="nofollow">Browseblogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/browseblogs.gif" alt="Browseblogs.com" width="457" height="48" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 831
<span class="strong">Backlinks in Yahoo:</span> 5,684
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> DoFollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but editorially reviewed before publication</p>

<p><a href="http://blogville.us" rel="nofollow">Blogville.us</a></p>

<p><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 17,800
<span class="strong">Backlinks in Yahoo:</span> 9,020
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the submission page:</p>

<blockquote><p>*  Please be sure that what you are submitting is actually a blog.
* All submissions must contain appropriate content to be considered.
* Please do not submit sales pages, they will not be approved.
* Please submit only your main blog page, not a posts page, and not your feed.
</p></blockquote>

<p><a href="http://www.myblog2u.com/" rel="nofollow">Myblog2u.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/myblog2u-logo.jpg" alt="Myblog2u.com" width="297" height="91" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 973 
<span class="strong">Backlinks in Yahoo:</span> 172,785
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As from the submission page:</p>

<blockquote><p>
   * Strictly For Blog Sites Only.
    * Your blog must be at least 2 months old.
    * Your blog must contain at least 10 post.
    * Submit top-level blog domains or directory only (Example: http://www.myblog2u.com or http://www.myblog2u.com/blog)
    * Submit your blog sites to the most relevant category.
    * If your blog site is not in English, please submit to World Blogs category.
* The description and or detailed entry consists mainly of keywords. 99% of unsuccessful submissions are because of keyword listing. A carefully written description is of utmost importance.
    * Inappropriate CAPITALIZATI0N of words.
    * Excessive or incorrect punctuation
    * Mirror sites - web sites that have the same or similar content, but different URLs.
    * If you have a chain of websites - only submit one.
    * Multiple submission of the same web site.
    * Blog sites that contain only advertising material or links posting.
    * Blog sites composed mainly of affiliate links.
    * Blog sites that are under construction.
    * Blog sites in violation of copyright laws.
    * Blog sites with excessive pop-ups or pop-unders.
    * Blog site that contains unlawful, threatening, abusive, libellous, defamatory, obscene, pornographic, gambling, profane or encouraging conduct that would constitute a criminal offence, give rise to civil liability, violate any local, state, national or international law.
    * Excessive opening of new windows when browsing.
    * Squidoo/MySpace pages are not allowed.
    * Blog is used for SEO purposes only. 
</p></blockquote>
<div>

<p><a href="http://www.bloglisting.net/" rel="nofollow">Bloglisting.net</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloglisting.gif" alt="Bloglisting.com" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 854
<span class="strong">Backlinks in Yahoo:</span> 396,436
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As from the submission page:</p>

<blockquote><p>
Unacceptable Sites, Content &amp; few reasons why submissions are not approved:</p>

<p>    * No adult sites or adult related content.
    * Site made for adsense or other ad services.
    * No sites broken links.
    * Blogs that appear to be generated from RSS feeds will not be added.
    * A site submitted to an inappropriate category shall not be added.
    * The title should be less than 100 characters in length.
    * Inappropriate CAPITALIZATI0N of words.
    * Repeated &amp; excessive use of exclamation marks!
    * Submissions via email are not accepted.</p></blockquote>

</div>

<p><a href="http://www.blog-watch.com/" rel="nofollow">Blog-watch.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogwatch.png" alt="Blog-watch.com" width="254" height="64" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 1,750
<span class="strong">Backlinks in Yahoo:</span> 19,298
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but all submissions are editorially approved</p>

<p><a href="http://www.blogengage.com/" rel="nofollow">Blogengage.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogengage.jpg" alt="blogengage.com" width="226" height="42" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 2,070 
<span class="strong">Backlinks in Yahoo:</span> 73,759
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> No - user generated voting
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> User generated social bookmarking site for blog articles. There is also a blog directory that is free but charges a $1 fee for featured links.</p>

<div>

<p><a href="http://www.topblogarea.com/" rel="nofollow">Topblogarea.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/topblogarea.jpg" alt="topblogarea.com" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 129,000
<span class="strong">Backlinks in Yahoo:</span> 4,668,338
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/topblogarea.com">5,968</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website:</p>

<blockquote><p>This is a toplist for blogs only, we do not allow any kind of spam sites to register if you are one please quit the registration now and save us both some time.</p>

<p>You are not allowed to sign up if you blog contains any kind of materials which violate any applicable laws.
Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address is recorded to aid in enforcing these conditions.</p>

<p>We do not allow blogs with pornographic content or any kind of nude content. </p></blockquote>

</div>

<p><a href="http://www.blogexplosion.com/" rel="nofollow">Blogexplosion.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogexplosion.gif" alt="blogexplosion.com" width="275" height="65" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 72,300
<span class="strong">Backlinks in Yahoo:</span> 1,735,349
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blogexplosion.com">372,374</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As from the website:
</p><blockquote><p>We accept blogs and blog-related services. We do not accept blog directories, blog hosts, porn blogs, traffic exchanges, SEO (Search Engine Optimization) sites, referral links, blogs designed to send traffic to a commercial site, or blogs that exist strictly to make money.</p>

<p>All Blogs must meet the following minimum requirements:</p>

<p>    * Majority of content must be English
    * Must have some original content - strictly including or linking to another's content does not make a blog
    * Submitted URL must be that of the blog - not an RSS feed.
    * Must have a minimum of 5 posts. (Blogs with advertising must have at least 10 posts)
    * Must be at least 7 days old. (Blogs with advertising must be at least 14 days old)
    * Must be accessible to the general public without entering a password
    * Majority of posts must be readable by the general public without entering a password</p>

<p>Sites with any of the following will be declined:</p>

<p>    * Advertising that takes the majority of space on a page
    * Popups, pop-unders, or in-page obtrusive messages or advertising
    * Advertising at the top of a page which causes the posts to fall below the fold
    * Automatic requests to install non-standard ActiveX controls or other software.
    * Break-frames code
    * Hate content or discrimination against anyone based on race, creed, color, national origin, sex, political views, etc.
    * Promotion of violence or death
    * Encouragement or support of any activity considered illegal by the United States or International Law</p>

<p>Blogs with any of the following will be declined:</p>

<p>    * Advertising in every post
    * No posts within last 30 days
    * Many posts dated more than 1 week in the future (post-dating to create a sticky post is fine)
    * Language in the blog title that is unsuitable for a wide audience
</p></blockquote>

<p><a href="http://www.lsblogs.com/" rel="nofollow">LSBlogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/lsblogs.gif" alt="lsblogs.com" width="444" height="56" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 8,200 
<span class="strong">Backlinks in Yahoo:</span> 642,137
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Yes, as from website: Do not submit unsuitable sites (illegal content, racism, hate, spam, non blog related sites etc).</p>

<p><a href="http://www.getblogs.com/" rel="nofollow">Getblogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/getblogs.jpg" alt="Getblogs.com" width="319" height="95" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 24,800
<span class="strong">Backlinks in Yahoo:</span> 839,599
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but editorially approved before publication.</p>

<p><a href="http://www.sarthak.net/blogz/" rel="nofollow">Blogz</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogz.gif" alt="Blogz" width="241" height="95" /><br /><span class="strong">Year Site Created:</span> 2003
<span class="strong">Indexed Pages in Google:</span> 404
<span class="strong">Backlinks in Yahoo:</span> 124,648
<span class="strong">PageRank:</span> 0 - probably penalised by Google.
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Some
<span class="strong">Submission rules:</span> Not stated but items are held for review before publication</p>

<p><a href="http://technorati.com/" rel="nofollow">Technorati.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/technorati-logo.jpg" alt="technorati.com" width="320" height="350" /><br /><span class="strong">Year Site Created:</span> 2002
<span class="strong">Indexed Pages in Google:</span> 10,600,000
<span class="strong">Backlinks in Yahoo:</span> 285,498,560
<span class="strong">PageRank:</span> 9
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/technorati.com">577</a>
<span class="strong">Editorial Policy:</span> -
<span class="strong">Spam in index:</span> -
<span class="strong">Submission rules:</span> Content is probably filtered automatically to avoid spam or duplicate content. This is <span class="italic">the</span> place to submit your blog to. </p>

<p><a href="http://www.blogio.net/" rel="nofollow">Blogio.net</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogio.gif" alt="blogio" width="237" height="101" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 408
<span class="strong">Backlinks in Yahoo:</span> 51,797
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but all items are editorially reviewed before publication</p>

<p><a href="http://www.spillbean.com/" rel="nofollow">Spillbean.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/spillbean.gif" alt="Spillbean" width="365" height="48" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 329
<span class="strong">Backlinks in Yahoo:</span> 26,675
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As below:
</p><blockquote><p>
Submission Guidelines
1. Please submit only your blogs, information portals and web directories. All other sites would be instantly rejected.
2. We do not accept adult, warez and pharma sites and also sites that link to adult, warez or illegal content.
3. Gambling and casino sites are also not accepted.
4. Do not capitalize the first letter of every word in your description
5. No keyword spamming in the title. Please restrict the keywords to no more that 5 words in the title.
6. Non-English sites must be submitted only under the Regional category
7. Deeplinks are allowed as long as they are submitted to the revelant category
8. Blogs with duplicate content (copied from another source) will not be approved.
9. Blogs setup for selling products via affiliate links will not be accepted.
10. Submit as many websites as you like. We will approve all of them as soon as possible.</p></blockquote>

<p><a href="http://www.blogsitelist.com/" rel="nofollow">Blogsitelist.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsitelist.gif" alt="blogsitelist.gif" width="295" height="75" /><br /><span class="strong">Year Site Created:</span> 
<span class="strong">Indexed Pages in Google:</span> 199
<span class="strong">Backlinks in Yahoo:</span> 2,293
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but submissions are held back for review.</p>

<p><a href="http://blogfluence.com/" rel="nofollow">Blogfluence.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogfluence.png" alt="Blogfluence.com" width="294" height="81" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 265 
<span class="strong">Backlinks in Yahoo:</span> 1,949
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Blogs must be over 20 day old and in the English language.</p>

<div>

<p><a href="http://www.shoutyoursite.com/" rel="nofollow">Shoutyoursite.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/shoutyoursite.gif" alt="shoutyoursite.com" width="221" height="43" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 502
<span class="strong">Backlinks in Yahoo:</span> 2,260
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but all submissions are editorially approved before publication</p>

</div>

<p><a href="http://dir.yahoo.com/news_and_media/blogs/" rel="nofollow">Yahoo.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/yahoo.gif" alt="Yahoo" width="266" height="29" /><br /><span class="strong">Year Site Created:</span> 1995
<span class="strong">Indexed Pages in Google:</span> 538,000,000 (entire Yahoo.com domain)
<span class="strong">Backlinks in Yahoo:</span> 852,724,625 (entire Yahoo.com domain)
<span class="strong">PageRank:</span> 6 (For page as linked to above)
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/yahoo.com">2</a> (entire Yahoo.com domain)
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Good luck in getting included in this directory without paying the optional $299.</p>

<p><a href="http://www.dmoz.org" rel="nofollow">DMOZ</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/Dmoz.png" alt="Dmoz.png" width="120" height="120" /><br /><span class="strong">Year Site Created:</span> 1999
<span class="strong">Indexed Pages in Google:</span> 2,140,000
<span class="strong">Backlinks in Yahoo:</span> 26,351,000
<span class="strong">PageRank:</span> 8
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/dmoz.org">847</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Like Yahoo this is free for bloggers to submit to but unlikely that you'll be included due to the sheer number of submissions they receive. They list blogs on the subject of the internet, communications, libraries and news and media.</p>

<p><a href="http://www.blloggs.com/" rel="nofollow">Bllogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bllogs.png" alt="Bllogs.com" width="149" height="69" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 2,600
<span class="strong">Backlinks in Yahoo:</span> 4,729
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the site: All blogs are reviewed for quality and relevance before inclusion. Included blogs are those that have been updated regularly with original content.</p>

<p><a href="http://www.blogburst.com/" rel="nofollow">Blogburst.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogburst.gif" alt="blogburst.com" width="170" height="71" style="background-color:#000000;" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 162
<span class="strong">Backlinks in Yahoo:</span> 2,638,309
<span class="strong">PageRank:</span> 7
<span class="strong">Link Status:</span> -
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the site: </p>

<blockquote><p>
BlogBurst membership is by invitation only. If you have a high-quality, topically focused blog and would like to be considered for membership, please enter its URL below. BlogBurst will automatically check your blog and find your RSS feed, which we will review and let you know the outcome.
</p></blockquote>

<p><a href="http://www.blogfolders.com/" rel="nofollow">Blogfolders.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogfolders.gif" alt="Blogfolders.com" width="231" height="106" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 221
<span class="strong">Backlinks in Yahoo:</span> 9,604
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As from the site:
</p><blockquote><p>
# Only blogs are allowed.
# Blogs under construction are not allowed.
# Gambling or adult oriented blogs are not allowed.
# Only English blogs will be accepted.
# Blogs containing excessive affiliate links or ads are not allowed.
</p></blockquote>

<p><a href="http://blogfinds.com/" rel="nofollow">Blogfinds.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogfinds.jpeg" alt="Blogfinds.com" width="300" height="85" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 115
<span class="strong">Backlinks in Yahoo:</span> 10,175
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> -
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the site: We only allow blogs that have been around for at least 6 months and post at least once a week.</p>

<p><a href="http://bloggerschoiceawards.com/" rel="nofollow">Bloggerschoiceawards.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloggerschoice.png" alt="bloggerschoiceawards.com" width="181" height="167" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 63,100
<span class="strong">Backlinks in Yahoo:</span> 1,212,053
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/bloggerschoiceawards.com">212,675</a>
<span class="strong">Editorial Policy:</span> No
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> None so it seems. Users vote on best blog.</p>

<p><a href="http://www.myblogdirectory.net/" rel="nofollow">Myblogdirectory.net</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/myblogdirectory.png" alt="Myblogdirectory.net" width="440" height="90" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 321
<span class="strong">Backlinks in Yahoo:</span> 293,547
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> None stated but all submissions are editorially reviewed before publication.</p>

<p><a href="http://www.bloghints.com/" rel="nofollow">Bloghints.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloghints.gif" alt="bloghints.com" width="362" height="79" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 30,600
<span class="strong">Backlinks in Yahoo:</span> 322,105
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the site: Blogs with poor content will not be approved. No Gambling sites, or any site containing any unacceptable Adsense content.</p>

<p><a href="http://www.blog-collector.com/" rel="nofollow">Blog-collector.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blog-collector.gif" alt="blog-collector.com" width="296" height="83" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 2,140
<span class="strong">Backlinks in Yahoo:</span> 28,652
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> None stated but submissions are held back for review</p>

<p><a href="http://www.blog-directory.org/" rel="nofollow">Blog-directory.org</a></p>

<p><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 2,560
<span class="strong">Backlinks in Yahoo:</span> 136,310
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No datat
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> None stated but submitted items are held back for review</p>

<p><a href="http://blogintro.com/" rel="nofollow">Blogintro.com</a></p>

<p><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 2,650
<span class="strong">Backlinks in Yahoo:</span> 169,658
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but items are held back for editorial review</p>

<p><a href="http://blogs.botw.org/" rel="nofollow">Best of the Web Blogs</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bofw.gif" alt="Best of the Web Blogs" width="273" height="82" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 1,660
<span class="strong">Backlinks in Yahoo:</span> 309,751
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Like the Yahoo and DMOZ directories, Best of the Web is inundated with submissions. I would recommend that you pay the $49.95 inclusion fee if you want to stand any chance of being indexed here.</p>

<p>The submission rules are: </p>

<blockquote><p>
    *  The blog must be up and running 24/7;
    * The blog must contain unique content, as determined by a BOTW editor;
    * The blog must not contain any parts under construction;
    * All links on the blog must work;
    * The blog must have a history of 6 (six) months or longer;
    * The blog must be kept current, and have active participation;
    * The blog must be in the English language (or have an English version available);
    * The blog must support multiple browsers and capabilities;
    * The blog must not contain any content, products, services or other information that may be illegal to sell under any applicable law, that may infringe or violate anyone's rights, or that, BOTW believes, in its sole discretion, is offensive.</p>

</blockquote>

<p><a href="http://blogsbycategory.com/" rel="nofollow">Blogsbycategory.com</a></p>

<p><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 851
<span class="strong">Backlinks in Yahoo:</span> 234,871
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> None state but submitted sites are held back for editorial review</p>

<p><a href="http://www.bloggernow.com/" rel="nofollow">Bloggernow.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloggernow.gif" alt="Bloggernow.com" width="273" height="58" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 24,000
<span class="strong">Backlinks in Yahoo:</span> 677,472
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Some
<span class="strong">Submission rules:</span> Not stated but submitted items are held back for review</p>

<div>

<p><a href="http://directory.eponym.com/" rel="nofollow">Eponym.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/eponym.gif" alt="directory.eponym.com" /><br /><span class="strong">Year Site Created:</span> 2003
<span class="strong">Indexed Pages in Google:</span> 16,300
<span class="strong">Backlinks in Yahoo:</span> 112,003
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website: </p>

<blockquote><p>
We consider several factors when selecting blogs for approval, including publicly available metrics (inbound link counts, etc.) as well as a human review of the site. Sites that aren't approved can be resubmitted after 30 days.
</p></blockquote>

</div>

<p><a href="http://www.mvblogs.com/" rel="nofollow">Mvblogs.com</a></p>

<p><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 682
<span class="strong">Backlinks in Yahoo:</span> 13,898
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> Yes, stated on the top of the submission form.</p>

<p><a href="http://www.submitblognow.info/" rel="nofollow">Submitblognow.info</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/submitblognow.gif" alt="submitblognow.info" width="196" height="110" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 560
<span class="strong">Backlinks in Yahoo:</span> 33,389
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Nofollowsubmitblognow.gif
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/submitblognow.info">1,004,276</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the website: No sites containing copyright infringements, fraud, child pornography, racism, vulgarity or warez or casino sites.</p>

<p><a href="http://www.wilsdomain.com/" rel="nofollow">Wilsdomain.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/wilsdomain.png" alt="wilsdomain.png" width="601" height="60" /><br /><span class="strong">Year Site Created:</span> 2002
<span class="strong">Indexed Pages in Google:</span> 4,390
<span class="strong">Backlinks in Yahoo:</span> 85,681
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/wilsdomain.com">634,935</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the website: We do not accept blogs, RSS feeds or websites which promote child porn, pornography, online pharmacies, racism, sexism, hate, gambling, casinos, warez, or any other type of malicious sites.</p>

<p><a href="http://www.mybloglog.com/" rel="nofollow">MyBlogLog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/mybloglog.jpg" alt="MyBlogLog.com" width="180" height="140" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 1,370,000
<span class="strong">Backlinks in Yahoo:</span> 5,968,587
<span class="strong">PageRank:</span> 6
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/mybloglog.com">4,712</a>
<span class="strong">Editorial Policy:</span> No
<span class="strong">Spam in index:</span> For sure
<span class="strong">Submission rules:</span> None. This is one of the most active and popular blog hubs on the net and is owned by Yahoo. It's a great place to network and build up readers.</p>

<p><a href="http://www.blogtorn.com/" rel="nofollow">Blogtorn.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogtorn.png" alt="blogtorn.com" width="400" height="125" /><br /><span class="strong">Year Site Created:</span> 2009
<span class="strong">Indexed Pages in Google:</span> 1,610
<span class="strong">Backlinks in Yahoo:</span> 274
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Some
<span class="strong">Submission rules:</span> Read rules on the submission page.</p>

<p><a href="http://www.b4blogs.com/" rel="nofollow">B4blogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/b4blogs.gif" alt="b4blogs.com/" width="280" height="55" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 133
<span class="strong">Backlinks in Yahoo:</span> 2,485
<span class="strong">PageRank:</span> 0 (penalised by Google?)
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated but items are held back for review before publication</p>

<p><a href="http://www.qualityblogs.com/" rel="nofollow">Qualityblogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/qualityblogs.jpg" alt="Qualityblogs.com" width="316" height="131" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 369
<span class="strong">Backlinks in Yahoo:</span> 168
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Read the rules on the submission form</p>

<p><a href="http://www.bestblogdirectory.info" rel="nofollow">Bestblogdirectory.info</a></p>

<p><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 42
<span class="strong">Backlinks in Yahoo:</span> 2,776
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span>  Read the rules on the submission form</p>

<p><a href="http://www.freeblogdirectory.info/" rel="nofollow">Freeblogdirectory.info</a></p>

<p><span class="strong">Year Site Created:</span> 2009
<span class="strong">Indexed Pages in Google:</span> 24
<span class="strong">Backlinks in Yahoo:</span> 3,377
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Read the rules on the submission form</p>

<p><a href="http://www.spicypage.com/" rel="nofollow"> Spicypage.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/spiceypage.gif" alt="spicypage.com" width="280" height="75" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 33,800
<span class="strong">Backlinks in Yahoo:</span> 145,900
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> No
<span class="strong">Spam in index:</span> Yes, lots
<span class="strong">Submission rules:</span> None - this is user-generated content dependent on others giving you the thumbs up or down.</p>

<div>

<p><a href="http://www.blogdirectory.org.uk/" rel="nofollow">Blogdirectory.org.uk</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogdirectory.org.uk.jpg" alt="blogdirectory.org.uk" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 606
<span class="strong">Backlinks in Yahoo:</span> 5,887
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> From the submission page:
</p><blockquote><p>
Blogs must have at least 3 consecutive months of recent posts.</p>

<p>Blogs must not be made primarily for advertising.</p>

<p>Hyperlinks in the blog posts must not be primarily affiliate links.</p>

<p>Blogs must be in English or have an English version.</p>

<p>Blogs must be complete, not under construction.</p>

<p>The Title must be concise and should be the title of the blog. Avoid promotional language, and capitalise the first letter of each word.</p>

<p>The Site Description should be brief, objective, written in the third party, and in sentences starting with capital letters and ending with full stops.</p>

<p>Take time to find the most suitable category for your listing.
</p></blockquote>
</div>

<p><a href="http://blogdire.com/" rel="nofollow">Blogdire.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogdire.jpg" alt="Blogdire.com" width="215" height="70" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 372
<span class="strong">Backlinks in Yahoo:</span> 133,325
<span class="strong">PageRank:</span> 5
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blogwebdirectory.com/" rel="nofollow">Blogwebdirectory.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogwebdirectory.png" alt="www.blogwebdirectory.com" width="196" height="64" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 908
<span class="strong">Backlinks in Yahoo:</span> 3,467
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blogsrating.com/" rel="nofollow">Blogsrating.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsrating.gif" alt="blogsrating.gif" width="135" height="95" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 480
<span class="strong">Backlinks in Yahoo:</span> 30,427
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the submission page:</p>

<blockquote><p>
1. Submit Blogs, not blog pages or blog articles.
2. Our Recip Button/Link is required.
3. You need to have active blog with unique content.
</p></blockquote>

<p><a href="http://www.blogratedirectory.com/" rel="nofollow">Blogratedirectory.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogratedirectory.jpg" alt="blogsrating.gif" width="130" height="109" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 5,403
<span class="strong">Backlinks in Yahoo:</span> 827,444
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As on the submission page:</p>

<blockquote><p>   * Junk Blogs with little or no original content (see copyscape.com)
    * Blog has popups or pop-unders
    * Pornographic or adult only materials
    * Pharmacy or pharmaceutical drugs
    * Casino or online gambling
    * Excessive profanity and/or obscene content
    * Hacking, Cracking, Warez, RapidShare, BitTorrent, Proxies
    * Pitated content - ie: movies, music, software, downloads
    * Blogs that promote illegal activities or drugs
    * Blogs with racist, homophobic or misogynist content
    * Blogs containing copyrighted materials : mp3, photos, etc
    * Blogs promoting PTC, GPT, PTR or any "Get Paid to" Programs
    * Blogs promoting hyip, autosurf or ponzi schemes
    * Blogs focused on celebrity pictures or free wallpapers
    * Blogs focused on Busby SEO Test</p></blockquote>

<p><a href="http://fuelmyblog.com/" rel="nofollow">fuelmyblog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/fuelmyblog.gif" alt="fuelmyblog.gif" width="212" height="52" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 558
<span class="strong">Backlinks in Yahoo:</span> 940,100
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Redirect
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/fuelmyblog.com">570,413</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> As from the submission page:</p>

<blockquote><p>
Please note, we manually approve every blog on this site, if you are adding spam, porn or simply a website, we will reject it, this is a blog community and we only accept blogs.  Also - We do not add blogs with one post nor do we add blogs with different URL's and same content..Ever.  It is our way of keeping a decent community for you all :-)</p></blockquote>
<div>

<p><a href="http://www.bblogd.com/" rel="nofollow">Bblogd.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bblogd.jpg" alt="bblogd.jpg" width="700" height="113" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 260
<span class="strong">Backlinks in Yahoo:</span> 33,532
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

</div>

<p><a href="http://topofblogs.com/" rel="nofollow">Topofblogs.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/topofblogs.gif" alt="topofblogs.gif" width="266" height="45" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 63,300
<span class="strong">Backlinks in Yahoo:</span> 3,868,522
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/topofblogs.com">41,792</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://blogratings.com/" rel="nofollow">Blogratings.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogratings.gif" alt="blogratings.gif" width="310" height="122" /><br /><span class="strong">Indexed Pages in Google:</span> 13,700 
<span class="strong">Backlinks in Yahoo:</span> 221,510
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blog-search.info/" rel="nofollow">Blog-search.info</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsearch-two.jpg" alt="blogsearch-two.jpg" width="300" height="130" /><br /><span class="strong">Year Site Created:</span> 2004
<span class="strong">Indexed Pages in Google:</span> 2,100
<span class="strong">Backlinks in Yahoo:</span> 67,709
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> <a href="http://www.quantcast.com/blog-search.info">1,504,509</a>
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> <a href="http://www.blog-search.info/add.php?cat=" rel="nofollow">Read guideline on submission page</a></p>

<p><a href="http://blog.directory-seek.com/" rel="nofollow">Blog.directory-seek.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogseek.gif" alt="blogseek.gif" width="178" height="80" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 101
<span class="strong">Backlinks in Yahoo:</span> 6,439
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> "No Porn Type Blogs or Adult Blogs!"</p>

<p><a href="http://www.blogzila.net/" rel="nofollow">Blogzila.net</a></p>

<p><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 1,270
<span class="strong">Backlinks in Yahoo:</span> 1,808
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Nofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> See the submission page</p>

<p><a href="http://www.goblogz.com/" rel="nofollow">Goblogz.com</a></p>

<p><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 196
<span class="strong">Backlinks in Yahoo:</span> 19,400
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> See the submission page</p>

<p><a href="http://i2blog.com/" rel="nofollow">i2blog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/12blog.gif" alt="12blog.gif" width="197" height="49" /><br /><span class="strong">Indexed Pages in Google:</span> 300
<span class="strong">Backlinks in Yahoo:</span> 219
<span class="strong">PageRank:</span> 4
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blogbunch.com/" rel="nofollow">Blogbunch.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogbunch.gif" alt="blogbunch.gif" width="265" height="69" /><br /><span class="strong">Year Site Created:</span> 2005
<span class="strong">Indexed Pages in Google:</span> 608
<span class="strong">Backlinks in Yahoo:</span>  9,940 
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blogsbycountry.com/" rel="nofollow">Blogsbycountry.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogsbycountry.gif" alt="blogsbycountry.gif" width="153" height="77" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 341
<span class="strong">Backlinks in Yahoo:</span> 9,050 
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated other than reciprocal link is required.
 
<a href="http://blurbblogdirectory.info" rel="nofollow">Blurbblogdirectory.info</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blurbblog.gif" alt="blurbblog.gif" width="281" height="72" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 91
<span class="strong">Backlinks in Yahoo:</span> 6,890
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.blogdirectory.ws/" rel="nofollow">Blogdirectory.ws</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogdirectory.jpg" alt="blogdirectory.jpg" width="320" height="53" /><br /><span class="strong">Indexed Pages in Google:</span> 722
<span class="strong">Backlinks in Yahoo:</span> 1,530
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://buzzerhut.com/" rel="nofollow">Buzzerhut.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/buzzerhunt.jpg" alt="buzzerhunt.jpg" width="297" height="101" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 1,400
<span class="strong">Backlinks in Yahoo:</span> 63,700
<span class="strong">PageRank:</span> 3
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://all-blog-directory.com/" rel="nofollow">All-blog-directory.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/allblog.gif" alt="allblog.gif" width="347" height="97" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 69
<span class="strong">Backlinks in Yahoo:</span>  676
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://blogger-tips.com/directory/" rel="nofollow">Blogger Tips</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloggertips.gif" alt="bloggertips.gif" width="281" height="72" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 309
<span class="strong">Backlinks in Yahoo:</span>  1,380
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Quantcast Rank:</span> No data
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://blogmeeting.com/" rel="nofollow">BlogMeeting.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogmeeting.gif" alt="BlogMeeting.com" width="376" height="101" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 118
<span class="strong">Backlinks in Yahoo:</span> 111
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> A little
<span class="strong">Submission rules:</span> <a href="http://blogmeeting.com/submit.php?c=27" rel="nofollow">See submission page</a></p>

<p><a href="http://topblogdirectory.net/" rel="nofollow">Topblogdirectory.net</a></p>

<p><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 27
<span class="strong">Backlinks in Yahoo:</span> 4,223
<span class="strong">PageRank:</span> 2
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> None stated</p>

<p><a href="http://spreadmyblog.com/" rel="nofollow">Spreadmyblog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/spreadmyblog.gif" alt="BlogMeeting.com" width="508" height="69" /><br /><span class="strong">Year Site Created:</span> 2006
<span class="strong">Indexed Pages in Google:</span> 360
<span class="strong">Backlinks in Yahoo:</span> 249
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://blogz-search.com/" rel="nofollow">Blogz-search.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogz-search.gif" alt="BlogMeeting.com" width="423" height="39" /><br /><span class="strong">Indexed Pages in Google:</span> 881
<span class="strong">Backlinks in Yahoo:</span> 3,960
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> "No porn, spam, warez, racist, firearms"</p>

<p><a href="http://directory.myseoblog.net/" rel="nofollow">Directory.myseoblog.net</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/myseoblog.gif" alt="Directory.myseoblog.net" width="361" height="61" /><br /><span class="strong">Indexed Pages in Google:</span> 168
<span class="strong">Backlinks in Yahoo:</span>  3,040 
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://directoryblog.cn/" rel="nofollow">Directoryblog.cn</a></p>

<p><span class="strong">Indexed Pages in Google:</span> 417
<span class="strong">Backlinks in Yahoo:</span> 412
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://i-need-a-blog.com/index.htm" rel="nofollow">I-need-a-blog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/ineedablog.gif" alt="I-need-a-blog.com" width="150" height="30" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 23
<span class="strong">Backlinks in Yahoo:</span> 135
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://weblogs.co.in/" rel="nofollow">Weblogs.co.in</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/weblogs.gif" alt="Weblogs.co.in" width="350" height="124" /><br /><span class="strong">Indexed Pages in Google:</span> 146
<span class="strong">Backlinks in Yahoo:</span> 151
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span></p>

<blockquote><p>
* Your blog must be at least 6 months old
. Your blog must be active blog with regular blog posts.</p></blockquote>

<p><a href="http://blogodirectory.com/" rel="nofollow">Blogodirectory.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogodirectory.png" alt="Blogodirectory.com" width="332" height="50" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 804
<span class="strong">Backlinks in Yahoo:</span> 469
<span class="strong">PageRank:</span> 1
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> <a href="http://blogodirectory.com/rules.php" rel="nofollow"> Read their submission rules</a></p>

<p><a href="http://wkdbid.com/" rel="nofollow">Wkdbid.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/wicked.jpg" alt="Wkdbid.com" width="256" height="94" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 100
<span class="strong">Backlinks in Yahoo:</span> 54
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> Read their submission page</p>

<p><a href="http://www.bloggercyber.com/" rel="nofollow">Bloggercyber.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bloggercyber.jpg" alt="Bloggercyber.com" width="450" height="70" /><br /><span class="strong">Year Site Created:</span> 2007
<span class="strong">Indexed Pages in Google:</span> 149
<span class="strong">Backlinks in Yahoo:</span> 505
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<div>

<p><a href="http://bestbloglink.com/" rel="nofollow">Bestbloglink.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/bestbloglink.gif" alt="bestbloglink.com" width="562" height="337" /><br /><span class="strong">Year Site Created:</span> 2008 
<span class="strong">Indexed Pages in Google:</span> 552
<span class="strong">Backlinks in Yahoo:</span> 25
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> Yes
<span class="strong">Submission rules:</span> Not stated</p>

</div>

<p></p><div>

<p><a href="http://justblogz.com/" rel="nofollow">Justblogz.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/justblogz.gif" alt="Justblogz.com" width="600" height="140" /><br /><span class="strong">Year Site Created:</span> 2009
<span class="strong">Indexed Pages in Google:</span> 167
<span class="strong">Backlinks in Yahoo:</span> 155
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

</div>

<p><a href="http://blogsdirectory.info/" rel="nofollow">Blogsdirectory.info</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/blogdirectoryinfo.gif" alt="Blogsdirectory.info" width="280" height="55" /><br /><span class="strong">Year Site Created:</span> 2009
<span class="strong">Indexed Pages in Google:</span> 811
<span class="strong">Backlinks in Yahoo:</span> 1,750
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> See the submission page.</p>

<p><a href="http://blogs.mediadir.in/" rel="nofollow">Blogs.mediadir.in</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/dpnblog.gif" alt="Blogs.mediadir.in" width="448" height="145" /><br /><span class="strong">Indexed Pages in Google:</span> 5,480
<span class="strong">Backlinks in Yahoo:</span> 516
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>

<p><a href="http://www.allforblog.com/" rel="nofollow">Allforblog.com</a></p>

<p><img src="http://dofollow001.com/sites/all/themes/framework/images/allforblog.png" alt="Allforblog.com" width="390" height="280" /><br /><span class="strong">Year Site Created:</span> 2008
<span class="strong">Indexed Pages in Google:</span> 324
<span class="strong">Backlinks in Yahoo:</span> 690
<span class="strong">PageRank:</span> 0
<span class="strong">Link Status:</span> Dofollow
<span class="strong">Editorial Policy:</span> Yes
<span class="strong">Spam in index:</span> No
<span class="strong">Submission rules:</span> Not stated</p>


</div>

<p>----------</p>


<p><a href="http://www.suburban-glory.com/regions/web-design-goodmayes.html">Goodmayes Web Design</a></p>

]]></description>
 <pubDate>2009-07-27T18:43:28Z+0000</pubDate>
<dc:creator>Andy Walpole</dc:creator>
<guid isPermaLink="false">57 at http://www.suburban-glory.com</guid>
</item>
</channel>
</rss>
