My First Attempt at Tackling SES
Okay, I have to admit, I'm not sure if people are going to find this as interesting as me, but I'm kind of weird. I love to create dynamic websites, but I've always hated the ugly url's they tend to create. You know what I mean. Let's say you have a product page. In the old days, you could do something as simple as this:
products.cfm?pid=2369
... and your ColdFusion code for the products.cfm would look something like this:
<cfparam name="url.pid" default="0">
<cfquery name="GetProduct" datasource="mydns">
SELECT Category, SubCategory, ProductName, PID
FROM Products
WHERE PID = #url.pid#
</cfquery>
We finally had some downtime and decided to re-work our own website and hope you enjoy the improvements. The first thing you might notice is that we incorporated Raymond Camden's excellent cfcBlog blogging software for ColdFusion. It allowed us to add a true blog to our site, while at the same time allowed us to throw a skin on it that closely resembles our old site.
We hope to update the site with more coding examples of ColdFusion, JavaScript and CSS tricks and hopefully you'll be able to contribute without all the headaches that came with the little website we had before.
As of right now, we have only moved a few of the items over from the old website, please bare with us, our old system was put together with duct tape and bailing wire. (I think there was some Fortran in there too!) Moving the old data into the new system is basically a manual process.
In the future we plan on putting even more of the "things we do" on the site. Apparently a lot of people did not realize that we are a full fledged graphic design house. Go figure. So we're going to be sure to put some of that type of stuff on here as well.
We appreciate you visiting and if you have any questions or comments, please drop us a line and let us know.
Two Useful Form Field Validation Functions
Here are two quick ColdFusion scripts to validate if a user supplied a real e-mail address or website URL using Regular Expressions.
To validate an e-mail address:
<cfif REFindNoCase("^[\w\.-]+@[\w\.-]+\.[a-zA-Z]{2,3}$",form.EMAIL) lt 1>
<--- E-mail address was not valid.... --->
</cfif>
... and to validate a website url:
<cfif REFindNoCase("^(http://|https://)[\w\.-]+\.[a-zA-Z]{2,3}(/?)$",form.WEBSITE) lt 1>
<--- Website URL was not valid.... --->
</cfif>
I wanted to post these real quick just so I have them handy, but also you might find them useful as well.
Taking a Much Needed Break
I just wanted to give everyone a heads up that I will be taking a small vacation until next Monday. My top priority will be to finish debugging openWYSIWYG for Safari, and once that is complete I plan on finishing a few of my other projects. This includes the new ColdFusion Wiki Thingy I've been working on (if you haven't already figured it out, openWYSIWYG is an integral part of that)
And in true vacation form, I am not taking a laptop with me... it wouldn't be much of a vacation if I did! So the blog posts may be light or non-existent until I get back.
Enjoy your week everyone!
CJ Hitman Tip & Trick
One of my clients is using the CJ Hitman link manager script I created to track various links on their website. They use about 15 domains that point people to different areas of their site and they we're curious if they could use the information gathered through the script to determine the total hit counts for each domain.
We sure can. CJ Hitman is recording the entire path, so all we need to do is perform a little SQL QUERY magic to group the results for the domains.