The following ColdFusion applications, custom tags, and UDFs we have developed 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.
Custom Tags
User Defined Functions
DBX is a CF application which interacts with SQLServer 2K and 2K5 database objects and provides an easy way to explore database objects and metadata, as well as generate relevant ColdFusion code.
Will generate cut and paste CFQUERY and CFSTOREDPROC code based on the datatypes contained in the given db object, and allow the viewing of View, Stored Procedure and User Defined Function schemata.
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.
Works via DSN, not direct connection to the DB server, minimizing security risks.
New in this version [11/29/2007]: Minor Javascript fix. As always, check notes and readme/version_history.txt for full details.
Free for commercial and non-commercial use (see application notes). Download
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.
Example: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
A form and page anti-spam tag, CF_Nospam prevents unauthorized submission to forms and external linking to pages by verifying domain and referrer. Includes an option to redirect to an error page or other location and accepts an optional list of authorized referring domains.
Primarily used to restrict form submissions to Cold Fusion scripts to specific authorized domains, it can also be used to restrict page linking from domains outside your own, or to allow linking only from specific domains.
Free for commercial and non-commercial use (see tag notes). Download
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 are enormous).
Free for commercial and non-commercial use (see tag notes). Download
changeInnerCommas( string , newchar, type )
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:
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 (inputval, mask)
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:or
<cfset timeToDisplay = secsToTime(1345,'h.m.s')>
Free for commercial and non-commercial use. View Code
secsToLongTime (inputval)
Takes a given number of seconds and outputs a formatted string representation of that value in 'long time' format.
Example:would return: 12 hours, 59 minutes, 59 seconds
Free for commercial and non-commercial use. View Code
timeToSecs (inputval, mask)
mask : use hh:mm:ss as mask values. Include the delimiter if exists.
New in this version: it works now :).
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.
or
<cfset totalSeconds = timeToSecs('12:30:22','hh:mm:ss')>
Free for commercial and non-commercial use. View Code