Bobby Hartsfield wrote: > Being able to able to move and/or rename the templates and still have the > system keep track of them will most definitely prove to be tough if > everything else is important to you.
Here's my plan, the system will check to see if a file has an ID at the top of it. If it does, it will check the permissions and make sure the current user has the credentials to pass through. If not, page load is halted. If the file doesn't have an ID, it will write an ID to the file being requested and halt processing because permissions haven't been set on the file. > To be able to shuffle them around, you'd be back to making sure every file > had its unique ID set at the top of the template. This is excactly why I want the ID creation scripted instead of me generating a random number to put at the top of each file. I thought of that, but I like automatic things better ;) > Rather you use path/filename or hash of cgi.script_name they are basically > the same thing. One is just encrypted. There really is no difference in > which one you use. Hashing them will require de-hashing them (but man those > hashes look cooler than dir/file.cfm) :) I can also use a random nubmer, it really doesn't matter. What matters is that each file has a unique id associated with it so my application can know what file is what. In the event that a duplicate is found, it will probably halt execution and do something cool ... like email me or log it or something like that.... haven't gotten that far yet.. >>I think what's going to be trick is converting the script_name to a >>path for cffile to understand. > > You can get the full path of file with getcurrenttemplatepath() > This will give the entire path including the file name Ok, I think I played with that a short while ago when I was messing around with uploading files. I'll take a look at that again. > Yes. Cgi.script_name will hold everything in the url that comes AFTER the > domain name (and before any url variables). So if you are at: > > http://mysite.com > > usually the default document in a CF app would be index.cfm so > cgi.script_name in this case would be "index.cfm" Got it! Thanks for the confirmations - I appreciate it. Mike ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217317 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54