Tag Archives: display

Death to Internet Explorer 6

This morning, much like every morning, I wake, prepare for the day, walk my partner to work, get home and read through my emails and RSS subscriptions before I start my working day.

This morning I came across a post from Ryan Stemkoski about How IE 6 is Dead and a comment from that post how Ryan gets 23% and Thomas J Brown gets ~2% of IE 6 visitors. I checked out my statistics and I get 37.7% of my visitors using IE 6.

Top 6 Browsers to visit my Blog.

Top 6 Browsers to visit my Blog.

The top 6 browsers to visit my Blog are IE 5, 6 & 7, Firefox 2 & 3 and Safari.

I can’t believe that IE 6 is kicking around in such high percentages, and worse still is some IE 5 visitors! On a recent website we blocked all support for IE 6 and below, it directed to a splash page with links to download the decent major players. Generally I just let the visitor browse the site as is.

You have an Old Browser - Upgrade

You have an Old Browser - Upgrade

For the first time I loading this blog with this new theme in IE 6 and it does display well, although there is nothing fancy with the design.

http://sheldon.lendrum.co.nz In IE 6

http://sheldon.lendrum.co.nz In IE 6

In all – Why oh why?

Why do so many people use these old browsers? Because of lazy IT departments, yes, Because of illegitimate copies of Windows that stop windows updater, I bet. But surely with Safari and Firefox both being free?

Do it for us Developers and upgrade ! Please!

Displaying Ordered Directory Listings

This is a follow up to a previous post http://sheldon.lendrum.co.nz/clean-dynamic-directory-listing-with-php_206/04/ that will Dynamically display the files in a set directory.

In this version the files can be ordered by the date that they were last modified. I will also explain how to order both Ascending and Descending by the date the file was created also.

Example Usages:

< ?php
	//  EAMPLE USAGE
	//  SHOWS THE 10 NEWEST .php FILES IN A UNORDERED LIST
	echo("
    ". direcotryList("10","./",".php","
  • ","
  • \n") .""); // SHOWS ALL JPG IMAGES AS THUMBNAILS echo(direcotryList("","./images/",".jpg","\n")); ?>

< ?php

	// DIRECTORY DISPLAY USING GLOB SORTNG BY LAST MIDIFIED FILE DATE.
	// IF ALL PERIMATORS ARE EMPTY WILL SCAN DEFAULT DIRECTORY
	// '$display' =>  AMOUNT OF RECORDS TO DISPLAY
	// '$path'    =>  PATH TO DIRECOTRY TO SCAN
	// '$ext'     =>  FILES EXT,  IF YOU WANT OT ECLUDE IT,  OR ONLY SCAN FOR ONE TYPE OF FILE
	// '$start'   =>  APPEND TO START OF OUTPUT LINE EG: '
  • ' OR '
    ' // '$end' => APPEND TO END OF OUTPUT LINE EG: '
  • ' OR '\n' => DEFAULT '\n' function direcotryList($path = "./",$display = NULL, $ext = NULL, $start = NULL, $end = "\n"){ $return = (int)0; $output = ""; $ignore = array(".","..","thumbs.db"); if(empty($display)){ $display = time() * 1000; } if(($count = count($files = glob($path ."*". $ext))) > 0){ foreach($files as $v){ $filemtime[] = filemtime($v); } array_multisort($filemtime, SORT_DESC, $files); foreach($files as $file){ if($return < = $display){ if(is_file($file) and !in_array($file, $ignore)){ $output .= $start . $file . $end; $return++; } } } } return $output; } ?>

    Alterations:

    To order the directory by Creation time rather than the current Modified date Alter line 17 to filectime.

    $filemtime[] = filectime($v);

    Currently the output is orders Newest to Oldest, to reverse the Order, change the Constant in the array_multisort on line 19.

    array_multisort($filemtime, SORT_DESC, $files);

    If you have any comments or suggestions, please ask below.