• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Publishing and Date Last Updated

Explorer ,
Jul 14, 2010 Jul 14, 2010

Copy link to clipboard

Copied

We're using RoboHelp 8.02 using the WebHelp SSL. There have been several discussions on how to effectively incorporate a "date last updated" in RoboHelp. I thought I'd found a strategy that worked, but now, publishing seems to have some random behavior that's throwing a kink into the strategy. Help me understand if my understanding of what "publish" does in RoboHelp is correct and what I may be doing wrong. My strategy is:

  1. I add a JavaScript script at the bottom of each page that pulls in, formats, and displays the file's Date Modified attribute.
  2. I generate the project locally.
  3. I publish the project to the server. (We're in a LAN environment where I can publish directly to the Web server.) The Publish settings are:
    • Check for deleted files: Selected
    • Prompt before overwriting files: Unselected
    • Republish all: Unselected

It has been my understanding that, with Republish all turned off, RoboHelp would only move files that had been changed to the server when publishing. In that way, the old files on the server (and hence displayed to the reader)  would continue to show the an older date, and the newly published files would show the newer date.

However, when we recently published one project, it appears that RoboHelp randomly moved some files that had not been modified to the server. Interestingly, it wasn't all the unmodified files, just some of them, and a random selection at that. Am I missing something, or is the behavior a bug?

For those who might be interested, the JavaScript that I use is:

<script type="text/JavaScript"
  language="JavaScript"><!--
//
// format date as dd-mmm-yy
// example: 12-Jan-99
//
function date_ddmmmyy(date)
{
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();

  // handle different year values
  // returned by IE and NS in
  // the year 2000.
  if(y >= 2000)
  {
    y -= 2000;
  }
  if(y >= 100)
  {
    y -= 100;
  }

  // could use splitString() here
  // but the following method is
  // more compatible
  var mmm =
    ( 1==m)?'Jan':( 2==m)?'Feb':(3==m)?'Mar':
    ( 4==m)?'Apr':( 5==m)?'May':(6==m)?'Jun':
    ( 7==m)?'Jul':( 8==m)?'Aug':(9==m)?'Sep':
    (10==m)?'Oct':(11==m)?'Nov':'Dec';

  return "" +
    (d<10?"0"+d:d) + "-" +
    mmm + "-" +
    (y<10?"0"+y:y);
}


//
// get last modified date of the
// current document.
//
function date_lastmodified()
{
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;

  // check if we have a valid date
  // before proceeding
  if(0 != (d1=Date.parse(lmd)))
  {
    s = "" + date_ddmmmyy(new Date(d1));
  }

  return s;
}

//
// finally display the last modified date
// as DD-MMM-YY
//
document.write(
  "This page was last updated on " +
  date_lastmodified() );

// --></script>

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 23, 2010 Jul 23, 2010

Copy link to clipboard

Copied

In my template that is applied to each topic, I have a header and a footer. The footer contains copyright info and links to our support page and this code:

<p class=footertext><span style="font-size: x-small; font-style: italic; x-condition: Not_Print;">Last
modified: <variable name=date x-format=default x-constant=TRUE x-value=40381.572928>July 23, 2010</variable></span>

That updates the date on the topic when the help is generated. For example:

http://help.globalscape.com/help/eft6-2/index.htm#Introduction_to_EFTServer.htm

Much less complicated that all of that JS!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

Chances are, the unmodified file had some connection to at least one modified file (a hyperlink to or from the other file), or the unmodified file had at least been "touched" (opened but not edited).

You did say files, and not topics, so I'm wondering if you're talking about the files in the whdata, whgdata, and whxdata folders. Those files are constantly being redone according to some internal RH load-balancing algorithm, which provides for faster displays of the TOC, Index, and Search info contained within these folders.

Good luck,

Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

Actually, I was referring to topic files, not the supporting files. Your answer really sheds some light on this. I'm guessing that a See Also reference would likely qualify as a "hyperlink to or from the other file." I'm going to have to check that lead out when I get back into the office.

You've really shed some light on this problem. It's a shame that RoboHelp doesn't provide for this automatically; it should be a part of any help system.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

I wasn't aware of the "variable" tag. Is it something that's built into RoboHelp? How does the x-value get entered? It looks like a serial date; if one has to enter that manually, then it would be just as easy to manually enter the date. Ditto for "July 23, 2010." Is it automatically produced by the code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 26, 2010 Jul 26, 2010

Copy link to clipboard

Copied

LATEST

Yes, I have the code in the template and when I generate and publish WebHelp, the date is updated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp