CFAdmin custom extension

I just read Steven Erat’s post on his nifty ‘never miss a hotfix’ extension to CFAdmin. I dig the idea, but it does not work for me so well being behind a firewall at the cube farm. But, it did jog me into creating my own custom extension. Wow, with a ‘holy kow batman’ look on my face I whipped one up that will display the CF instance name, well more precisely, the JRun server name. This is very helpful when you have multiple instances running. Create a file called extensioncustom.cfm in your cfide/administrator directory and paste the below into it:

<cfsetting enablecfoutputonly="Yes">
<!---
author: Douglas Knudsen doug@cubicleman.com
date: 01/11/2007
purpose: Display the ColdFusion Instance Name
--->
<cfobject action="create" type="java" class="jrunx.kernel.JRun" name="jr" />
<cfset servername = jr.getServerName() />
<cfoutput>Instance Name: #servername#</cfoutput></p>

<cfsetting enablecfoutputonly="No">

Enjoy!

DK


One Response to “CFAdmin custom extension”

  1. A Random CF'er
    August 1st, 2008 | 6:38 pm

    Just a tiny quibble — the filename is actually extensionscustom.cfm (note the plural “s” in the middle); while the filename as stated won’t break anything, it also won’t *do* anything!

    Hopefully, this will save a few minutes for the next CF tweaker to stop by!

Leave a reply