Projects
The following ColdFusion applications, custom tags, and UDFs are free and available for download for use in your own ColdFusion enabled site (subject to the restrictions, if any, outlined in the included comments or documentation). Feel free to contact us for more information regarding any of these products or if there is a specific application or custom tag you'd like to see developed.
DBX - SQL Server / CF Development Tool <ColdFusion Application>
DBX is a tool to aid in the development of repetitive coding tasks for SQL Server 2000/2005/2008 databases, as well as providing a convenient way of viewing db objects and schema without resorting to Enterprise Manager / SQL Management Studio.
DBX allows easy exploration of SQL Server database objects and metadata, generates cut and paste CFQUERY and CFSTOREDPROC code based on the datatypes contained in the given db object, and lets you quickly access the schema and details of tables, views, stored procedures, user-defined functions, triggers and more.
When generating stored procedure (both cfquery and cfstoredproc) code, the code generator generates 'positionally correct' SQL statements, in addition to providing the named parameters. This allows the generated code to be used with earlier versions of CFMX / SQLServer where named parameters were not supported, but relied upon sequence of the parameters in the executed call.
DBX does not employ nor require an application scope; it is by design intended to be able to be dropped anywhere, regardless of framework, or lack thereof.
DBX provides a number of customization points which allows you to create your own generated output templates if desired; these features do not attempt to impose any specific code generation styles upon you (such as specific methods of creating CFC's); instead, it provides a number of hooks which allow you to take db object data, contained in a query, and customize your own output templates from there.
Free for commercial and non-commercial use (see application notes).
Download:
- Download from RIAForge.org - preferred
- Alternate download here
CF_HurlParamsMX v1.7 (CFMX,CF4.5/5) - SES QueryString Modifier <ColdFusion Custom Tag>
Creates URL's that are search engine friendly, since there isn't a ? or an & to be found in any url (which breaks many search engine spiders). This means no more 'gateway' pages for dynamically driven sites to allow search engine indexing of catalogs or other db driven sites.
Standard URL
http://www.blah.com/catalog.cfm?prodid=152&category=Utilities
HurlParam URL
http://www.blah.com/catalog.cfm/hurl/prodid=152/category=Utilities/Keyword-Rich-Text.html (CF4.5/5)
http://www.blah.com/catalog.cfm/hurl/prodid=152/category=Utilities/Keyword-Rich-Text (CFMX)
HurlParamsMX allows the use of query strings without ? and & delimiters by returning "hurl'ed" url's into the URL structure so you may continue to reference these params as normal (#url.variablename#). Only requires a slight syntax change in your page links, for which I've included a helper UDF to do this. See documentation in tag for more specifics and for notes regarding CFMX implementation.
New in this version:
- Added ability to specify which delimiters to be used in the hurl'ed name/value pairs (by request)
- Modified the helper udf to support specifying the delimiter surrounding the name/value pairs (see notes)
- Added SSL awareness, if the requested page is an https url, then basehref will be rewritten with an https:// prefix, prevents SSL 'breakage' from an insecure url reference
- Added a regex to prevent multiple dashes (-) from occurring in the keyword rich description portion in the helper udf (would yield undesirable results when there were hyphenated words)
See tag notes for full description.
Free for commercial and non-commercial use (see tag notes). Download
CF_RIN <ColdFusion Custom Tag>
Tired of pseudo-random numbers? I bet. So, what's better than a not-really-random random number? Why, several multiplied together!
With this in mind, I wrote this tag to generate 'random' id's, with the additional options of a string prefix and a timestamp suffix. Given a length sufficient, and with timestamping turned on, you effectively have a very unique identifier.
I have used this extensively, mainly for generating a 'redemption' key for various things, which when combined with a primary key in a table, prevent unauthorized redemptions or guessing of values when needing to offer one time or multiple time validation of a user's id. Imagine passing a user id in a URL from an email for some type of validation - easy to play with the number to gain access to another user's identity. Now add a RIN - using the two in a validation scheme effectively prevents guessing of the values (sequential primary keys are rotten as 'secure' identifiers, and GUID's may be guessable depending on the generation technique).
Free for commercial and non-commercial use (see tag notes). Download
changeInnerCommas() <ColdFusion UDF>
changeInnerCommas( string , newchar, type )
string : string list you're working with. In the example below, you'd strip out the extraneous Javascript to leave only the list, then pass that in as the list to work with.
newchar : this is the new delimiter with which to replace the inner commas.
type : is either "single" or "double", depending on which quote type has been used in the Javascript array.
Say for example you have the following array in JavaScript, and need to parse it into an equivalent ColdFusion list:
var test = new Array( 'one two three','four , five, six' ,56,72, 'seven,eight' );
Converting this to a CF based array is damn near impossible due to the way that CF handles 'lists' and their delimiters. Were you to copy the above 'list' into a CF variable, then use a #listlen(test)# to get the list length based on commas as delimiters, CF would report 8 as the list item count, when truly the list count is 5, three string vars and two numeric vars.
The only way to properly treat this as a list is to change either 'outer' or the 'inner' instance of the comma. This UDF changes the inner instances of the commas to another character, as defined in the functional call, thereby allowing the use of the default comma as the list delimiter (for CF purposes).
Note the sloppy use of spaces in the sample JS array above; this UDF will handle them properly from the standpoint of replacing the commas occuring within the quoted strings.
Free for commercial and non-commercial use. View Code
secsToTime() <ColdFusion UDF>
secsToTime (inputval, mask)
inputval : the number of seconds
mask : use hh|mm|ss as possible mask values. Double letter values will force padding with zero's. Default mask if none is provided is hh:mm:ss
Takes a given number of seconds and outputs a specified, formatted string representation of that value.
Example:
<cfset timeToDisplay = secsToTime(1345,'hh:mm:ss')>
or
<cfset timeToDisplay = secsToTime(1345,'h.m.s')>
Free for commercial and non-commercial use. View Code
secsToLongTime() <ColdFusion UDF>
secsToLongTime (inputval)
inputval : the number of seconds
Takes a given number of seconds and outputs a formatted string representation of that value in 'long time' format.
Example:
<cfset timeToDisplay = secsToLongTime(46799)>
would return: 12 hours, 59 minutes, 59 seconds
Free for commercial and non-commercial use. View Code
timeToSecs() <ColdFusion UDF>
timeToSecs (inputval, mask)
inputval : the time string to convert to seconds
mask : use hh:mm:ss as mask values. Include the delimiter if exists.
Takes a time passed in as a string, along with a mask defining the 'structure' of that time string, and returns the number of seconds represented by it.
Example:
<cfset totalSeconds = timeToSecs('002121','hhmmss')>
or
<cfset totalSeconds = timeToSecs('12:30:22','hh:mm:ss')>
Free for commercial and non-commercial use. View Code