
MikeB
Staff
/ Moderator

Aug 15, 2006, 10:00 AM
Post #3 of 6
(4746 views)
Shortcut
|
|
Re: [DefenceTalk.com] How to insert random numbers in Filename?
[In reply to]
|
Can't Post
|
|
Hi DefenceTalk, I just wanted to follow-up to let you know that by using some JavaScript I've managed to put together a script that will automatically output a datestamp for you in the "Filename" field in Article Manager. Here's how it works: When you create a new article in Article Manager you'll type in your Title, choose your category and status and the next step is to type in the filename. When you click the textbox for Filename this JavaScript will automatically output a datestamp in this field and you can then type your filename. For example, when you click the text box you would first see something like this: _20060815 You can then just click before the underscore and type in your actual filename so it will then look like this: this_is_an_article_filename_20060815 Once you click "Save" this value is saved as the filename and your static file (PHP in your case) will be created. Also, if you click "modify" on this article within Article Manager you can click on the "Filename" field without having to worry about losing any content as I've set the JavaScript up to recognize that there is already a value in this field. As the JavaScript is a bit lengthy I've attached a copy of the _art_menus.html and _writer_menus.html that you can use rather than outlining all of the code. You can upload these to your /artman/templates/interface/ directory and you'll want to be sure to make backups of the existing files. If you've already made changes to these templates, just let me know and I'll put up a post to outline the changes you can make to get this up and running with your existing templates. I hope this helps and if you have any questions about this, just let me know! Cheers, Mike Briggs - Product Specialist support@interactivetools.com [hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url] Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]
|