Topic Modified Date

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Topic Modified Date

Post by Carsten Pedersen »

Hi,

When looking in the System Variables I'm missing the "LastSavedDate" as in Word in the MadCap Flare list.
How do I get the last saved date of the current topic?

I was trying maybe to create a script that could do this from the variable "SourceFile", but dident succeed.

-cpede
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Topic Modified Date

Post by lacastle »

You can use the System variable - ShortDate - for the date of the build. i don't think there's a way to to get the saved date for a particular topic.
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Topic Modified Date

Post by NorthEast »

There isn't a variable, but you could use javascript; e.g.:

Code: Select all

<script type="text/javascript">
document.write ('Modified date: ' + document.lastModified);
</script>
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: Topic Modified Date

Post by Carsten Pedersen »

Thanks for the code :lol:

My only problem is that this seems to work only for Web Help (probably also HTML Help),
but not for PDF outputs :(

Somehow the interpreter is bypassing the script in PDF. Any workaround for this problem?

-cpede
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Topic Modified Date

Post by NorthEast »

Actually, forget that; it would effectively just show the build time of the output file.

Unfortunately, I don't know anything about using javascript with regards to PDF outputs, so can't really help.

I was a bit confused though, as you mentioned you want to show the saved date of the topic; but a PDF file doesn't have any topics as such.
Are you trying to display the saved date of each source topic on that topic's page in the PDF?
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Topic Modified Date

Post by RamonS »

The Flare compiler would need to insert the date into the PDF. Even if the script runs in a PDf viewer, it probably would pull only the date of the PDF file creation in, which may be OK. But I yet have to come across a PDF viewer that has JavaScript enabled by default. JS in PDF is just a bad idea for security reasons.
Carsten Pedersen
Propeller Head
Posts: 96
Joined: Wed Feb 08, 2006 1:11 am

Re: Topic Modified Date

Post by Carsten Pedersen »

And I just found out. The lastModified date is in fact the date when the project is build or previewed.
This is ofcause not what I want, I want the date when the last changes was made to the document,
and not when the help ot PDF was generated.

-cpede
Ineffable
Sr. Propeller Head
Posts: 152
Joined: Mon Jan 15, 2007 3:08 pm
Location: Bay Area, CA

Re: Topic Modified Date

Post by Ineffable »

Carsten Pedersen wrote:And I just found out. The lastModified date is in fact the date when the project is build or previewed.
This is ofcause not what I want, I want the date when the last changes was made to the document,
and not when the help ot PDF was generated.

-cpede
This is a much needed feature, although it might be tricky from a development standpoint; does simply opening the file constitute a change, thereby updating the Updated On date? Does one have to make an edit to the page? If so, what if I Undo--does the date revert back to the original date?

I have about a thousand documents and showing the build date doesn't do much for me or my customers; I manually edit the Updated On date located in a table at top of each topic.

I'm sure you've entered it in the feature request page on the Madcap website? I have.
Post Reply