Matthew Steven Kelly

Just another WordPress weblog

My Alma Mater

May2

This is just a little demonstration of embedding Google maps into a website or blog. I just created a website for an upcoming event and wanted to give visitors directions from a local hotel to the event. To make it easier for everyone, I just embedded a Google map with directions on the “Directions” page.

More information from Google here

As a demonstration, if the event was at the University of Dayton, and my guests were staying at the Dayton Marriott…

Print this map

View Larger Map

However, so much more is possible with the Google Maps API. Matt Cutt’s (a favorite blogger of mine) made a great post about things you can do: http://www.mattcutts.com/blog/fun-with-zip-codes/

posted under Random | No Comments »

HTTPS Apache Redirect using mod_rewrite

February6

This site has a few sections that need to be secure when data is transmitted between the server and local computer. I implement an SSL certificate to accomplish this encryption. However, the issue arose as to how I ensured every time someone visited those pages they were using SSL. If I forgot even a single link to those pages and left the link as http:// instead of https:// users would get to the page unsecured. Additionally a user could always simply manually enter the URL into their web browser’s address bar without the https:// as well. The solution of course is for the web server to detect if the user is viewing the secured page with http:// and redirect them to https:// if they are.

Server Requirements:

  1. Apache web server
  2. Uncomment the mod_rewrite LoadModule call (LoadModule rewrite_module modules/mod_rewrite.so) in the httpd.conf file
  3. Make sure AllowOverride is set to “All” instead of “None” in the Directory section of the httpd.conf file

Since this site is powered using Apache web server I can perform this switch over using mod_rewrite and the .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>

All you need to do is create a file called “.htaccess” with the above contents and put it in the directory of your web server you need to switch to SSL (remember that your server must first be configured to use SSL). This is a great feature for webstores, etc. Simply create a directory called “secure”, place all of your web store files in that directory along with the above .htaccess file and you have just ensured your web store is always using encrypted HTTPS communication. The alternative, trying to manage every link into the web store pages, is a nightmare (I’ve done it before).

Take note that since Windows will not allow a file without a name stored on your hard drive, you will need to name the file “htaccess.txt” locally and then rename it after uploading it to the web server using the FTP program used during upload.

posted under Random | No Comments »

Agree To Terms Validation

February5

Every so often I need a simple script to validate an “agree to terms” check box for an HTML form. Here is a simple script I came up with to perform that validation using javascript:

The code:

<script type=”text/javascript”>
<!– 
function checkValues(form)
{
  if ( form.terms.checked == false )
  {
    alert("You must check the AGREE TO TERMS AND PRICING box.");
    return false;
  }
  form.submit();
}
–>
</script>
<br><form name="pricingterms" action="validation.html" method=post>
<div class="msg_head”><input type="checkbox" name="terms" value="Yes" />AGREE TO PRICING AND TERMS</div>
<br><input type="button" name="SubmitButton" value="Register It Now" onclick="checkValues(this.form)" />
</form>

And a form to test with:

License Agreement Validation Form

AGREE TO PRICING AND TERMS
posted under Random | No Comments »

Tag Cloud

February3

I always found tag clouds interesting. I think it will be fun to watch this “cloud” grow as posts continue.

So why is this in the SEO section? Tag clouds organize your pages into categories that cater to the specific word they are targeting. They are the Web 2.0 version of keywords. They add navigability to the site which helps both search engines crawl your pages, but more importantly, users trying to find the material that is relevant to them. Click on the word “SEO” below to see all the posts related to… SEO.

It should be noted that tag clouds aren’t just for blogs, they work for any site with lots of content. Large corporate sites that use tags include Amazon and Flickr. If your site utilizes the pretty much useless meta-keywords (which has been defunct for years but is still somehow touted by “SEO Experts”), now is the time to upgrade to tags and the power of the tag cloud to bring usability and improved navigation to your site. Add the SEO benefits, and it’s a no-brainer.

posted under Random | No Comments »

PSD 2 HTML

January25

I was googling around for some CSS formatting when I found this little gem:

http://psd2html.com/about-us.html

This company really intrigues me, as it is a very familiar concept. A typical site design for me involves someone giving me an image file of what they want the site to look like, as well as the content in a separate word document or such. I then take those files and generate an entire site based on how their template looks.

This is a very effective means to get some great site design from a graphical artist and some great coding from a software developer. Coders are not always the best designers, and vice-a-versa.

Anyways, the appreciation of understanding the separation of design, functionality, and content makes me enjoy psd2html and think it’s a marvelous idea.

W3 HTML Certification

January17

Tonight I passed the W3 Schools HTML certification correctly answering 66 out of 70 questions. The certification can be verified here:
http://www.refsnesdata.no/certification/cert_diploma_html.asp
Username: matt@matthewstevenkelly.com

The HTML Developer Certificate is for developers who want to document their knowledge of HTML 4.01, XHTML, and CSS.

To pass the examination the developer must have a fundamental knowledge of:

  • The Hypertext Markup Language – HTML 4.01
  • The Extensible Hypertext Markup Language – XHTML 1.0
  • Cascading Style Sheets – CSS1 and CSS2

It is based off of the standards produced by the World Wide Web Consortium

More infomation about the Consortium can be found here

posted under My Career | No Comments »

HTML Master

January10
Matthew Steven Kelly
Master 50,000 Expert Points
PHP Scripting Language

Click here: View Profile to view my Experts Exchange profile.

Click here: View Certificate to view my HTML certificate.

And more information about Experts-Exchange and me:
http://www.matthewstevenkelly.com/blog/technology/experts-exchange.html

posted under My Career | No Comments »

HTML Compliance

November15

I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes this site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium.

Valid XHTML 1.0 Transitional
Valid XHTML 1.0 Transitional

If you make your website compliant, you can add the compliance link to every page of your site. The code snippet below allows for users to click the link to really know you are compliant.

The best compliance to go for is XHTML. This is because XHTML is a stricter and cleaner version of HTML. XHTML not only makes it easier for people to follow your HTML code, but makes it more likely to be displayed in multiple browsers. With many surfers using browsers such as Apple Safari, Google Chrome, Mozilla FireFox, or the multiple version of Microsoft Internet Explorer, writing clean strict HTML code is the best thing you can do for usability of your site.

You may be tempted to say that a majority of “normal” web users use IE anyways, and any one technical enough to use an alternate browser will be able to figure the site out anyways. But think of all the Mac users who use Safari or Opera browsers! Do you really want to keep the technically inclined and Mac users away from your site?

I know as someone who helps users out with their website formatting I would love if every piece of HTML code I looked at was formatted XHTML compliant. This would make it much easier to troubleshoot problems when users post their code.

I hope everyone at least checks their website for compliance at the minimum, and strives to make it compliant after doing so. If you have any reservations about how worthwhile it is I encourage you to download some of the alternate browsers to Internet Explorer and see how well your website holds up:
- http://www.apple.com/safari/
- http://www.google.com/chrome
- http://www.mozilla.com/en-US/firefox/

More information:

If you are unsure what XHMTL is but want to learn more visit:
http://www.w3schools.com/xhtml/xhtml_intro.asp

The World Wide Web Consortium (W3C) is an international consortium where Member organizations, a full-time staff, and the public work together to develop Web standards.

More information about the World Wide Web Consortium can be found here: http://www.w3.org/ and a great overview of the organization is described at the W3 Schools website: http://www.w3schools.com/w3c/w3c_intro.asp

Their site validation tool can be found here: http://validator.w3.org/

posted under Random | No Comments »