Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

ColdFusion and Dynamic SES (Search Engine Safe) URL's : Part 2

Revisiting SES's

If you read my last post on Search Engine Safe (SES) URL's, you may have noticed that it was pretty basic. But like everything I post, it's kind of a work in progress.

Anyways, I've been working on a project and I had to revisit using SES's and I discovered another trick. Basically what I had before, using a URL parameter, should still be valid. If you don't remember, it looked something like this:

http://www.whatever.com/products.cfm?id=2369/accessories/gloves/Fuzzy+Pink+Mittens/
read full article...

Ported CJ Html Parser to ColdFusion

Now that I wrapped up the JavaScript version of this function, I thought I would go ahead and create a ColdFusion version as well. The big difference between the two functions is that JavaScript will allow you to use a function pointer in the replace-string portion of the regular expression replace function. ColdFusion does not allow us to do that, but there is a pretty cool function that I used, ReplaceList(). This function will find a match in one list and replace it with the corresponding list index item in another string. Other than that it's pretty identical to the CJ Html Parser function.

Note: CJ Html Parser was formally known as Html2Ascii

read full article...

ColdFusion And Dynamic SES (Search Engine Safe) URL's

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>
read full article...

Validating E-Mail and Web Addresses Using Regular Expressions with ColdFusion

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.

read full article...

Get Hit Count On Multiple Domains Using CJ Hitman

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.

read full article...
Page: 123456