Installation Wide contentRenderer for MuraCMS
I have a fairly large Mura installation, with a good number of sites on it. I have some customizations that I'd like to be pushed out across all of the sites in my installation. For example, I've changed the way the dspPrimaryNav function works, so that I can prevent child pages from being displayed. Unfortunately, as flexible and customizable as Mura is, there is no good to make global changes to the `contentRenderer.cfc` without losing those changes everytime you perform an update to your core files.Read complete post
Calculate Next Billing Date
I had a need to figure out the next billing date after today, based on a known start date and billing interval. Here’s the function I came up with to make it happen.
<cffunction name="getNextBilling" access="public" output="false" returntype="date" >
<cfargument
name="StartDate"
type="date"
required="true"
hint="The date the billing started"
/>
<cfargument
name="BillingInterval"
type="numeric"
required="true"
hint="The number of units for the billing. For example,
if something is billed every 90 days, this value will be 90"
/>
<cfargument
name="IntervalUnit"
type="string"
default="d"
required="false"
hint="The date part for the billing interval. This is the
CF datepart, such as 'd', 'm', 'yyyy', etc. The default is 'd'."
/>
<cfset var TimeFromStart = DateDiff(Arguments.IntervalUnit, StartDate, Now()) />
<cfreturn DateAdd(Arguments.IntervalUnit, TimeFromStart + Arguments.BillingInterval - (TimeFromStart MOD Arguments.BillingInterval), Arguments.Startdate) />
</cffunction>
Let me know if you spot a problem with the solution, or have suggestions for improvement.
Show in Finder in Eclipse
It's horribly annoying trying to find a file on your file system when it's buried folders deep in your project, on who knows which hard drive. In an effort to make this easier I scoured the interwebs for you, and found a solution.Read complete post