» Smart Phones, Web Design, Google or whatever
Web Design
Web Design, likley a lot about what you should and should not do in web design from a coding and design standpoint as relating to usability or “web site common sense”.
Book Giveaway off and Running
Sep 28th
Well, the book giveaway for Web Style Guide: Basic Design Principles for Creating Web Sites, Second Edition is now officially out there. Initial testing of the contact form failed until I realized it was working but somewhere the email was not coming through because I was using email addresses like george@example.com and the emails were not being delivered. A valid test entry confirmed the Book Giveaway form is working fine, so enter to win a free book!
htaccess Rewrite URL to www – or No www
Sep 21st
To make ALL visits to your website go to your website with www. (www.example.com) or without it (example.com) use the following code in your .htaccess file. The idea is that some search engines (or at least the important ones) will direct “search engine juice” to one of your URL’s instead of splitting it between 2, and Web Analytics programs list one URL per page instead of 2:
KEEP WWW.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
REMOVE WWW.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^.*$ http://example.com%{REQUEST_URI} [R=301,L]
This way no matter what a web visitor types they are sent to your website with or without the www, and as mentioned above benefits SEO and Analytics.
Book Giveaway Announced Titles Expanded
Sep 17th
Here’s the expanded list of books I will be giving away in the upcoming months, Follow me on Twitter or subscribe to my RSS feed so you don’t miss out. Tell your friends, too!
Beginning in September (on this blog) October (on George’s Wonder blog) I will be giving away one book or set of books per month. Dates and specific details will be announced when the giveaway actually begins!
I am also doing a book giveaway on my George’s Wonder Blog … go and check it out here.
HALO PAPERBACK NOVELS
Halo Ghosts of Onyx (By Eric Nylund, 2 copies)
Halo: The Flood (By William C. Dietz)
Halo: First Strike (By Eric Nylund)
Halo The Fall of Reach (By Eric Nylund)
WEB DESIGN
Web Style Guide: Basic Design Principles for Creating Web Sites, Second Edition (By Patrick J. Lynch, Sarah Horton, and Louis Rosenfeld)
SitePoint’s THe CSS Anthology, 101 Essential Tips Tricks and Hacks (By Rachel Andrew)
PHP, Your Visual Blueprint for Creating Open Source, Server-Side Content (By Paul Whitehead and Joel Desamero)
Cascading Stylesheets, The Designer’s Edge (By Molly E. Holzschlag)
Free Book Giveaway: Web Style Guide
Sep 7th
Since I’m late with the book giveaway I’m announcing the first book to be given away, beginning later this month. I’ll be giving away my Web Style Guide: Basic Design Principles for Creating Web Sites, Second Edition by Patrick J. Lynch, Sarah Horton, and Louis Rosenfeld (Paperback – Mar 2002) – link on Amazon for info & picture.
Using PHP to convert a string to lowercase
Jul 15th
At times you may need to change a string to all lowercase letters, here is the way to do that (2 samples including one practical application):
SYNTAX: string strtolower (string $mystring);
$myLowercaseString = strtolower ($mystring);
As with all PHP, test to make sure you’ve implemented correctly. Comments, questions or suggestions? Please leave a comment.
Using PHP to redirect to another page
Jun 18th
Using PHP to redirect to another page is a common task, especially when you are working with email forms. Fill the form out, process it, then redirect to a “thank you” page:
<?php
header( “Location: http://www.example.com” ) ;
exit;
?>
You can also use variables for the URL like so:
<?php
$destURL = “http://www.example.com”;
header( “Location: ” . $destURL ) ;
exit;
?>
NOTE: The code above has to be processed before any HTML headers, so it needs to be placed above ANY HTML code.
NOTE 2: Watch the code above, depending upon my current CSS in my current theme the single quotes or even double quote may change to fancy quotes which will need to be edited if you cut-n-paste the code.
MORE info available on PHP.net’s header manual page
Using PHP to grab the Referer
Jun 18th
You can use PHP to track how someone got to a specific page by grabbing the referring page, called the referer. Use this code to get that info:
<?php
$myReferer = $_SERVER['HTTP_REFERER'];
?>
NOTE: Watch the code above, depending upon my current CSS in my current theme the single quotes or even double quote may change to fancy quotes which will need to be edited if you cut-n-paste the code.
MORE info available on PHP.net’s $_SERVER manual page
CSS: All Caps
Jun 16th
Need to have all caps and CSS seems the best way to do it? Maybe you don’t want to re-code an entire menu (like me today!).
Use this:
.allcaps {text-transform: uppercase;}
… and there’s no need to re-type a bunch of text links.
MORE INFO