Flexible alternatives to PHP includes found here! Excellent!
http://blog.everymanhosting.com/php-coding/warning-include-functioninclude-url-file-access-is-disabled-in-the-server-configuration/
Sunday, July 05, 2009
Friday, April 10, 2009
Identifont - Identify fonts by appearance, find fonts by name
Identifont - Identify fonts by appearance, find fonts by name - this is very helpful!!!
Monday, February 09, 2009
Lightbox 2 Problem - Progress Indicator on left instead of centred
I've been scratching my head over this for a while but have finally found an answer.
If you are using Lightbox 2 (see huddletogether.com) you might see the progress indicator or 'loading icon' off to the left instead of centred. This is confusing and looks a bit sloppy.
It turns out that if you have used
Described in less detail on the
forum
If you are using Lightbox 2 (see huddletogether.com) you might see the progress indicator or 'loading icon' off to the left instead of centred. This is confusing and looks a bit sloppy.
It turns out that if you have used
Display:blockfor images in your main CSS this will cause a problem for the Lightbox. Simply edit the jquery.lightbox-0.5.css file adding
Display:inline;to the
#jquery-lightbox a img { } statement and that should fix it for you.Described in less detail on the
forum
Monday, September 29, 2008
Cheap / Free Stock Photos - SXC / Fotolia
Dan told me about this cheap/free photo library (you need to check royalties on a photo-by-photo basis).
SXC Photo
Fotolia.com
Don't forget you can also use some of the photos on Flickr too - just check the creative commons licences on each image.
SXC Photo
Fotolia.com
Don't forget you can also use some of the photos on Flickr too - just check the creative commons licences on each image.
Thursday, August 14, 2008
UK Legal Obligation to put Company Details on a Website
I have only been made aware of this today but there is a legal obligation for a company to put various details, such as it's address and company details, on its website.
Note that there are similar obligations relating to business letters and emails too.
Note that there are similar obligations relating to business letters and emails too.
The Google Link: operator
The 'link:' operator on Google is supposed to show you what sites link to yours. This is quite helpful when assessing SEO because as we know, the number of links in to your site helps your ranking.
IT DOESNT WORK
==============
Google is thought to report only 5% of backlinks that exist. This is apparently because if they revealed more links people would be able to figure out how their search algoritms work. So, the bottom line is that the 'Link:' operator is rubbish.
http://www.successful-blog.com/1/check-google-backlinks-through-yahoo/
http://www.seo-guy.com/forum/thread10675.html
Google recommends using Webmaster Tools instead of the link command
====================================================================
"you can get a much larger sampling of sites linking to yours using Google Webmaster Tools"
http://www.google.com/support/webmasters/bin/answer.py?answer=55281&ctx=sibling -
Google Webmaster Tools better than the Google Link: operator
http://googlewebmastercentral.blogspot.com/2007/02/discover-your-links.html
Google recommends another alternative approach to the 'link:' command
=====================================================================
"To obtain a comprehensive list of sites that point to a page, perform a Google search on the URL. From the search results page, select the "Find web pages that contain the term" link, and Google will provide you with webpages that mention that address. Note that in this case, Google will return all pages that mention this URL, not just those that link to it."
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=34453
Others recommend using the Yahoo link: command
==============================================
http://www.seo-guy.com/forum/thread10675.html - this thread mentions the approach but I think the yahoo operators mentioned no longer work as described.
Backlink checking tools
=======================
There are tools available to check backlinks, such as marketleap.com, but several of them, including marketleap, just report the results of a standard Google 'Link:' query, which is pretty poor.
A quick test looking at www.chrisbikes.co.uk
============================================
Google Link:www.chrisbikes.co.uk - 3 links shown
Google Webmaster Tools - 231 links shown
Google search on www.chrisbikes.co.uk - 42 occurences shown
Yahoo Link:www.chrisbikes.co.uk - 35 links shown
yahoo.co.uk linkdomain:www.chrisbikes.co.uk - 42 links shown
http://siteexplorer.search.yahoo.com - 263 links shown
http://siteexplorer.search.yahoo.com/uk/ - 35 links shown
Conclusions
===========
There seem to be 3 broad categories of results returned when it comes to looking for backlinks:
1. Absolute Rubbish
- results from google 'Link:' command
2. High Quality Links without much repetition
- results from a google search on the domain, or
- results from the yahoo link: or linkdomain: command
3. Comprehensive list of links with lots of repetition
- results from Google Webmaster Tools
- results from yahoo site explorer (US version - http://siteexplorer.search.yahoo.com)
Recommendations
===============
Do not use the google 'Link:' command.
Consider using the following:
Google Webmaster Tools or Yahoo Site Explorer
http://siteexplorer.search.yahoo.com to get a comprehensive list of links in.
To get a list of high quality links in try the yahoo link: or linkdomain: commands.
IT DOESNT WORK
==============
Google is thought to report only 5% of backlinks that exist. This is apparently because if they revealed more links people would be able to figure out how their search algoritms work. So, the bottom line is that the 'Link:' operator is rubbish.
http://www.successful-blog.com/1/check-google-backlinks-through-yahoo/
http://www.seo-guy.com/forum/thread10675.html
Google recommends using Webmaster Tools instead of the link command
====================================================================
"you can get a much larger sampling of sites linking to yours using Google Webmaster Tools"
http://www.google.com/support/webmasters/bin/answer.py?answer=55281&ctx=sibling -
Google Webmaster Tools better than the Google Link: operator
http://googlewebmastercentral.blogspot.com/2007/02/discover-your-links.html
Google recommends another alternative approach to the 'link:' command
=====================================================================
"To obtain a comprehensive list of sites that point to a page, perform a Google search on the URL. From the search results page, select the "Find web pages that contain the term" link, and Google will provide you with webpages that mention that address. Note that in this case, Google will return all pages that mention this URL, not just those that link to it."
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=34453
Others recommend using the Yahoo link: command
==============================================
http://www.seo-guy.com/forum/thread10675.html - this thread mentions the approach but I think the yahoo operators mentioned no longer work as described.
Backlink checking tools
=======================
There are tools available to check backlinks, such as marketleap.com, but several of them, including marketleap, just report the results of a standard Google 'Link:' query, which is pretty poor.
A quick test looking at www.chrisbikes.co.uk
============================================
Google Link:www.chrisbikes.co.uk - 3 links shown
Google Webmaster Tools - 231 links shown
Google search on www.chrisbikes.co.uk - 42 occurences shown
Yahoo Link:www.chrisbikes.co.uk - 35 links shown
yahoo.co.uk linkdomain:www.chrisbikes.co.uk - 42 links shown
http://siteexplorer.search.yahoo.com - 263 links shown
http://siteexplorer.search.yahoo.com/uk/ - 35 links shown
Conclusions
===========
There seem to be 3 broad categories of results returned when it comes to looking for backlinks:
1. Absolute Rubbish
- results from google 'Link:' command
2. High Quality Links without much repetition
- results from a google search on the domain, or
- results from the yahoo link: or linkdomain: command
3. Comprehensive list of links with lots of repetition
- results from Google Webmaster Tools
- results from yahoo site explorer (US version - http://siteexplorer.search.yahoo.com)
Recommendations
===============
Do not use the google 'Link:' command.
Consider using the following:
Google Webmaster Tools or Yahoo Site Explorer
http://siteexplorer.search.yahoo.com to get a comprehensive list of links in.
To get a list of high quality links in try the yahoo link: or linkdomain: commands.
Monday, May 05, 2008
Better PHP Includes - php includes - solving "no suitable wraper could be found"
I've had a few problems with PHP Includes done at the directory level. Particularly with the $root variable I mentioned in a previous post.
34sp pointed out that, "If you simply use the $_SERVER['DOCUMENT_ROOT']."/path/to/file" it is more secure", so that's what I'm doing now.
34sp pointed out that, "If you simply use the $_SERVER['DOCUMENT_ROOT']."/path/to/file" it is more secure", so that's what I'm doing now.
Friday, April 04, 2008
Free webpages for Cambridge people & another Cambridge Index
www.colc.co.uk is Cambridge Online. They have so many links that they are almost another Cambridge Directory, and a good one too.
They have a great service helping Cambridge People to get on the web, letting you have a 1 page website for free. It's fantastic! These sites seem easy to find on Google too.
They have a great service helping Cambridge People to get on the web, letting you have a 1 page website for free. It's fantastic! These sites seem easy to find on Google too.
Friday, March 14, 2008
SEOmoz | Google Search Engine Ranking Factors
SEOmoz | Google Search Engine Ranking Factors - an excellent article which reports on a survey of SEO experts about which things are important to your web page for effective SEO. I know enough about all this to put quite a lot of faith in this survey - the things ranked as most important here correspond to my understanding.
Wednesday, February 13, 2008
Wordtracker - Keyword analysis
Word Tracker seems like a great tool for helping you figure out which keywords your customers might be typing in to find a business like yours. This is worth a good read.
Thursday, February 07, 2008
Don't let Nominet rip you off for a domain name
I was doing some work for Chris' Bikes today. He had got a domain name renewal letter from Nominet asking for £94 for 2 years. What a complete rip-off! He is not a web expert and might well have just paid it. I talked to the guys at www.34sp.com and we managed to renew the domain name for £10 for 2 years.
I was chatting with someone later who put me onto www.1and1.co.uk. They sell domain names for as little as £2.62 per year !
I was chatting with someone later who put me onto www.1and1.co.uk. They sell domain names for as little as £2.62 per year !
Tuesday, January 29, 2008
Telling Google WHERE you are in the world
Step 1. Go to http://maps.google.com
Step 2. Go to 'mymaps' tab and create a map, with a pushpin marking your location
Step 3. Hit the 'View in Google Earth' button and save the .kml file
Step 4. Load the .kml file into Google Earth
Step 5. Save the new .kml file from Google Earth (this one is cleaner)
(an alternative to the above 5 steps would be to use http://www.addressfix.com/ (I've just discovered that useful tool!)
Step 6. Edit the kml file in your favourite text editor making good use of the tags and links you can put in there.
Here is a nice example of a .kml file which indicates the kinds of things you can do with the <description> tag:
http://www.seo-expert-services.co.uk/seo-expert-services-london.kml and in use here.
Step 7. Put a link to the kml file in the sitemap.xml file, like this...
<url>
<loc>http://www.userexperiencedesign.co.uk/userexperiencedesigncambridge.kml</loc>
<priority>0.5</priority>
<changefreq>daily</changefreq>
</url>
Refs:
http://weblog.millionpieces.nl/2007/4/how-to-get-your-information-into-google-maps
Some more advanced KML examples.
Step 2. Go to 'mymaps' tab and create a map, with a pushpin marking your location
Step 3. Hit the 'View in Google Earth' button and save the .kml file
Step 4. Load the .kml file into Google Earth
Step 5. Save the new .kml file from Google Earth (this one is cleaner)
(an alternative to the above 5 steps would be to use http://www.addressfix.com/ (I've just discovered that useful tool!)
Step 6. Edit the kml file in your favourite text editor making good use of the tags and links you can put in there.
Here is a nice example of a .kml file which indicates the kinds of things you can do with the <description> tag:
http://www.seo-expert-services.co.uk/seo-expert-services-london.kml and in use here.
Step 7. Put a link to the kml file in the sitemap.xml file, like this...
<url>
<loc>http://www.userexperiencedesign.co.uk/userexperiencedesigncambridge.kml</loc>
<priority>0.5</priority>
<changefreq>daily</changefreq>
</url>
Refs:
http://weblog.millionpieces.nl/2007/4/how-to-get-your-information-into-google-maps
Some more advanced KML examples.
Monday, January 21, 2008
Web Page Title Tags for Search Engine Optimization & Web Usability - Search Engine Marketing FAQ - SEO Logic
Sunday, January 20, 2008
Google Webmaster Tools
Google has some pretty handy Google Webmaster Tools - Dashboard to use to show you how it sees your website.
You can check your robots.txt file here and your sitemap and loads of other stuff.
You can check your robots.txt file here and your sitemap and loads of other stuff.
Add a robots.txt page to tell search engines like google which pages to leave out of the index
There is a good summary of the robots.txt file here: The Web Robots Pages.
These days, you can add a reference to the location of your sitemap here too.
These days, you can add a reference to the location of your sitemap here too.
Adding a Sitemap
An interesting Google article asks - What is a Sitemap file and why should I have one?
It is worth adding one to tell google all about your website. It is also worth adding a robots.txt file if you have parts of your website that you would like Google to avoid, or indeed, would like to make really sure Google finds your sitemap!
It is worth adding one to tell google all about your website. It is also worth adding a robots.txt file if you have parts of your website that you would like Google to avoid, or indeed, would like to make really sure Google finds your sitemap!
Tuesday, January 08, 2008
base href does not work for php includes !! (and what to do about it)
Base href is very handy for organizing relative addressing on a website. You may, for example, be working on a project for a client with a directory structure like this:
www.userexperiencedesign.co.uk/projects/cambridge_motorcycles
The 'normal' root of this would typically be www.userexperiencedesign.co.uk but if you want the /cambridge_motorcycles part to be the root, you could define a base href so that all the sub-directories under it would refer to that as root instead. Like this...
This works GREAT for images and general relative addressing.
I was stumped for a while, trying to figure out why this didn't work for PHP includes. PHP experts would not be so stumped. PHP is handled server side, so the base href in the document is not used. After a lot of head scratching I figured that you could define an equivalent for base href to be used by the PHP includes.
First, you need to define the variable in PHP. Mine is like this...
Then, when you call the include file you do it like this...
This gives us a neat way to fake up a base href equivalent for PHP includes. Neat!
If you are an efficiency expert you might worry about how many server calls are made by the PHP includes and whether, when defining $root, you should give the whole path or something relative. My sites are very small so this is not a big deal for me but if anyone wants to leave comments on efficiency (or anything else) I am always happy to learn!
www.userexperiencedesign.co.uk/projects/cambridge_motorcycles
The 'normal' root of this would typically be www.userexperiencedesign.co.uk but if you want the /cambridge_motorcycles part to be the root, you could define a base href so that all the sub-directories under it would refer to that as root instead. Like this...
<base href="http://www.userexperiencedesign.co.uk/projects/cambridge_motorcycles/\" />
This works GREAT for images and general relative addressing.
I was stumped for a while, trying to figure out why this didn't work for PHP includes. PHP experts would not be so stumped. PHP is handled server side, so the base href in the document is not used. After a lot of head scratching I figured that you could define an equivalent for base href to be used by the PHP includes.
First, you need to define the variable in PHP. Mine is like this...
<?php $root="http://www.userexperiencedesign.co.uk/projects/cambridge_motorcycles/\"; ?>
Then, when you call the include file you do it like this...
<?php include ($root."include/header.html\"); ?>
This gives us a neat way to fake up a base href equivalent for PHP includes. Neat!
If you are an efficiency expert you might worry about how many server calls are made by the PHP includes and whether, when defining $root, you should give the whole path or something relative. My sites are very small so this is not a big deal for me but if anyone wants to leave comments on efficiency (or anything else) I am always happy to learn!
Sunday, December 09, 2007
embedd a flickr slideshow set to allow good control of display order
I always seem to struggle with embedding flickr photos into my web pages and I'm not sure why really. If you want a lot of control of the order your photos will display, you should create a flickr set and put the photos in there and order them.
Then you'll need to use your flickr user id number (see idgettr.com) and the set id number for your photos (shown in the URL when you view the set).
Then replace the user_id and set_id in the following bit of code, showing my Impington Swimming Club set.
Created with flickrSLiDR.
Then you'll need to use your flickr user id number (see idgettr.com) and the set id number for your photos (shown in the URL when you view the set).
Then replace the user_id and set_id in the following bit of code, showing my Impington Swimming Club set.
<iframe align=\"center\" src=\"http://www.flickr.com/slideShow/index.gne?group_id=&user_id=79364623@N00
&set_id=72157594394097360\" frameBorder=\"0\" width=\"500\" height=\"500\" scrolling=\"no\"></iframe><br/><small>Created with <a href=\"http://flickrslidr.com\" title=\"flickrSLiDR\">flickrSLiDR</a>.</small>Created with flickrSLiDR.
Sunday, December 02, 2007
Aardvark Maps - An easy way to add pushpins to Google Maps
Aardvark Map - a simple tool for building a map for your website with a few pushpins on it. A bit like this...
Saturday, November 24, 2007
Can I embed Google Maps into my website or blog?
Can I embed Google Maps into my website or blog?
Here's how to embed a google map in a website - handy!
Here's how to embed a google map in a website - handy!
Wednesday, November 21, 2007
Putting code into a blogger post
It can be a bit of a faff to put code onto a blogger post. I have just found a nifty utility to convert it into the right format to make it easy.
Check out http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/.
This adds the escape characters you need to put code onto a blog. You can put the results between <pre></pre> tags.
Check out http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/.
This adds the escape characters you need to put code onto a blog. You can put the results between <pre></pre> tags.
How to hide your email address from spammers if you have to put it on the internet
When you put an email address on the internet, computer programs called 'spam robots' will find it by trawling over all the web pages they can find. Over the years these 'spam robots' have become more sophisticated but they can be thwarted to some degree. There are various ways to thwart them, one of which is to make your email address into an image which has no code equivalent that can be read by the programs. This is a bit nasty from an accessibility perspective - how do people with disabilities access this information?
Another way to do it is to assemble the email address with a snippet of javascript. Whilst a computer program could interpret this ('parse it'), it probably won't bother since there are plenty of other email addresses out there which are not protected at all and they may as well sell Viagra to those people.
Here is how my email address is protected. You will see how it appears at the end bottom of my website, www.userexperiencedesign.co.uk.
The code looks like this. It's a little more complicated looking than I would like because I have had to ensure that it is still valid XHTML. The comments in the code reference the sources of information I used in coming up with this.
You should note that this is NOT a foolproof way of ensuring you don't get spam but it should reduce the amount you get.
<!-- This Javascript hides an email address from spam robots -->
<!-- See The JavaScript Source!! http://javascript.internet.com -->
<!-- I got this to validate following advice from here http://www.geocities.com/wb7crk/ -->
<!--The 'noscript' tag provides alternative contact info for people with Javascript switched off-->
<div>
<script type=\"text/javascript\">
<!--//<![CDATA[
var user = \"carl.myhill\";
var site = \"userexperiencedesign.co.uk\";
document.write(\"<a href=\\\"mailto:\" + user + \"@\" + site + \"\\\" accesskey=\\\"9\\\" \\>\" + user + \"@\" + site + \"<\\/a> <em>[9]</em> \"); //]]>-->
</script>
<noscript>
<p><em>Contact carl.myhill at userexperiencedesign.co.uk</em></p>
</noscript>
</div>
NOTE: This bit of code also activates accesskey 9 for your email address. This is the standard (in the UK government at least) accesskey for 'feedback' and allows users to hit Alt+9 to send you an email instead of needing to navigate to the link.
Another way to do it is to assemble the email address with a snippet of javascript. Whilst a computer program could interpret this ('parse it'), it probably won't bother since there are plenty of other email addresses out there which are not protected at all and they may as well sell Viagra to those people.
Here is how my email address is protected. You will see how it appears at the end bottom of my website, www.userexperiencedesign.co.uk.
The code looks like this. It's a little more complicated looking than I would like because I have had to ensure that it is still valid XHTML. The comments in the code reference the sources of information I used in coming up with this.
You should note that this is NOT a foolproof way of ensuring you don't get spam but it should reduce the amount you get.
<!-- This Javascript hides an email address from spam robots -->
<!-- See The JavaScript Source!! http://javascript.internet.com -->
<!-- I got this to validate following advice from here http://www.geocities.com/wb7crk/ -->
<!--The 'noscript' tag provides alternative contact info for people with Javascript switched off-->
<div>
<script type=\"text/javascript\">
<!--//<![CDATA[
var user = \"carl.myhill\";
var site = \"userexperiencedesign.co.uk\";
document.write(\"<a href=\\\"mailto:\" + user + \"@\" + site + \"\\\" accesskey=\\\"9\\\" \\>\" + user + \"@\" + site + \"<\\/a> <em>[9]</em> \"); //]]>-->
</script>
<noscript>
<p><em>Contact carl.myhill at userexperiencedesign.co.uk</em></p>
</noscript>
</div>
NOTE: This bit of code also activates accesskey 9 for your email address. This is the standard (in the UK government at least) accesskey for 'feedback' and allows users to hit Alt+9 to send you an email instead of needing to navigate to the link.
Thursday, November 15, 2007
Test your web design in different browsers - Browsershots
Test your web design in different browsers - Browsershots
What a GREAT tool for testing how your website looks in multiple different browsers. Inspired!!!! Browsercam.com looks good too but is expensive, this one is free!
This post was extremely helpful...
http://www.sitepoint.com/forums/showthread.php?threadid=462563
What a GREAT tool for testing how your website looks in multiple different browsers. Inspired!!!! Browsercam.com looks good too but is expensive, this one is free!
This post was extremely helpful...
http://www.sitepoint.com/forums/showthread.php?threadid=462563
Wednesday, November 14, 2007
base href and named anchors
This is just a rough note for now. I have always wanted to use the base href tag. With this you can have structure like this...
maindomain
maindomain\projects
maindomain\projects\bikeshop
maindomain\projects\bikeshop\map
maindomain\projects\bikeshop\about
Well, normally the root you are working with is maindomain but if you want to temporarily have your bikeshop project sitting in some sub folders you can and you can specify the base ref to acheive it, like this...
maindomain\projects\bikeshop\index.html
<head>
<base href="http://www.maindomain.com/projects/bikeshop">
And now any sub folders can be set up with relative links and will all look at the baseref. SWEET
One thing is not sweet. When you are in this file...
maindomain\projects\bikeshop\about\index.html
...and you jump to a named hyperlink within that document, you jump to the base href instead. Which is a complete pain.
After many hours of surfing it seems that good old PHP has an easy answer for us...
<p class="skiplink"><a class="skiplink" href="<?php echo $_SERVER['REQUEST_URI']; ?>#top" accesskey="2" >Skip over navigation</a></p>
This server request returns the actual URL of the document and sticks it into the page, so, your named hyperlink within the page is more fully qualified.
This probably makes no sense but it is very handy to me to write it down right now!
maindomain
maindomain\projects
maindomain\projects\bikeshop
maindomain\projects\bikeshop\map
maindomain\projects\bikeshop\about
Well, normally the root you are working with is maindomain but if you want to temporarily have your bikeshop project sitting in some sub folders you can and you can specify the base ref to acheive it, like this...
maindomain\projects\bikeshop\index.html
<head>
<base href="http://www.maindomain.com/projects/bikeshop">
And now any sub folders can be set up with relative links and will all look at the baseref. SWEET
One thing is not sweet. When you are in this file...
maindomain\projects\bikeshop\about\index.html
...and you jump to a named hyperlink within that document, you jump to the base href instead. Which is a complete pain.
After many hours of surfing it seems that good old PHP has an easy answer for us...
<p class="skiplink"><a class="skiplink" href="<?php echo $_SERVER['REQUEST_URI']; ?>#top" accesskey="2" >Skip over navigation</a></p>
This server request returns the actual URL of the document and sticks it into the page, so, your named hyperlink within the page is more fully qualified.
This probably makes no sense but it is very handy to me to write it down right now!
Subscribe to:
Posts (Atom)
