Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued Products: Article Manager 1:
How to insert random numbers in Filename?

 

 


DefenceTalk.com
User

Aug 11, 2006, 7:44 AM

Post #1 of 6 (2252 views)
Shortcut
How to insert random numbers in Filename? Can't Post

Hello,

How do I insert random numbers or even date (20060811) in filename when article filename is being specified by the author?

I know about the Article Pages option in server option but this one is related to allow users to specify filename.

this_is_an_article_filename.php to

this_is_an_article_filename4565459.php

Any ideas?

Thanks!


MikeB
Staff / Moderator


Aug 12, 2006, 12:53 PM

Post #2 of 6 (2235 views)
Shortcut
Re: [DefenceTalk.com] How to insert random numbers in Filename? [In reply to] Can't Post

Hi,

Thanks for the post! Smile

While adding a number (or a date stamp) to the "Filename" field isn't something I've seen before I do have an idea of how something like this might work with a bit of JavaScript in Article Manager's interface templates.

I'd like to take a bit of time to play around with this but I just wanted to reply to your post to let you know that this is something I'm going to look into.

I should have an update in a few days to let you know if there is a way of setting up something like this.

In the meantime if you have any other questions, just let me know! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
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 Priority Consulting.


MikeB
Staff / Moderator


Aug 15, 2006, 10:00 AM

Post #3 of 6 (2206 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! Smile

Cheers,
Mike Briggs - Product Specialist
support@interactivetools.com


Hire me!
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 Priority Consulting.
Attachments: _writer_menus.html (45.3 KB)
  _art_menus.html (52.0 KB)


DefenceTalk.com
User

Aug 15, 2006, 10:18 AM

Post #4 of 6 (2202 views)
Shortcut
Re: [MikeB] How to insert random numbers in Filename? [In reply to] Can't Post

Mike, Thank you. I will test it out soon (weekend perhaps) and see how it goes.

Appreciate the hard work. Cool


DefenceTalk.com
User

Aug 22, 2006, 7:59 PM

Post #5 of 6 (2142 views)
Shortcut
Re: [DefenceTalk.com] How to insert random numbers in Filename? [In reply to] Can't Post

Thanks Mike! This works without any problem so far. :D

Demo: http://www.defencetalk.com/news/publish/


DefenceTalk.com
User

Oct 20, 2006, 8:50 PM

Post #6 of 6 (1679 views)
Shortcut
Re: [DefenceTalk.com] How to insert random numbers in Filename? [In reply to] Can't Post

Is this possible with AM 2.0? How about Random number instead of date? Sly

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4