Home | Features | Demo | Downloads | About Us | Support | Purchase

Using the CFWebstore Scratch Pad

Did you know that CFWebstore comes with a ColdFusion scratch pad that you can use for testing code? This is a great little tool for trying out code that you don't want to actually implement into the fusebox structure. Let's say you want to check out a new web service. Open up test.cfm in the top-level directory and paste in your code for calling the service, plus any debug or output code you need. Save the file and then call the scratch pad from your website using the format:

http://www.yoursite.com/index.cfm?fuseaction=home.test

That's all there is to it! Make sure to remove the code when you are done if you are using this on a live site (mainly if it's something you would prefer is not visible to visitors to the site.) But the scratchpad is not linked anywhere in the site, it's there strictly for your own use.

Here's another simple way to use this. CFWebstore uses hashed user passwords. This means they are not visible in the database and hash is only one-way so cannot be decrypted. So what happens if you are setting up a site and have changed the admin password and managed to get locked out? If your email password reset function is working you can use that, but you can also just use the scratchpad to get the hash of the desired password, like this:

<cfoutput>#Hash('yourpassword')#</cfoutput>

Grab the string from the page, paste it into the password field of your Users table for the appropriate user and you should be able to get in now.

The scratchpad is a handy little tool, so have fun with it!

Comments
Don's Gravatar Man, I wish I knew about this a long time ago!!
# Posted By Don | 5/28/08 4:11 PM
 
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.