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

replacing legacy twisty code without breaking the twisty

Guest
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

We started using twistys back in 2005, with the original twisty code from grainge.org. We've started using the newer twisty code mentioned, but I haven't been able to figure out a way to update the legacy twisties to the new code without vaporizing the content of the twisty. We've tried scripting it in perl, and the Brute Force find and replace method using FAR.

With over 2400 to replace, my boss has ruled out the piecework method, but a recent Mozilla Firefox update has rendered our older twisties inert, so I need a solution sooner rather than later.

Has anyone had any experience with this kind of find and replace project? I can supply a "before" and "after" code sample on request.

.MW

Views

1.5K

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
LEGEND ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

Hi,

Which newer twisty method are you referring to? If you refer to my twisty script, updating may indeed prove a bit of a pain, so to speak. It isn't made with backward compatibility in mind.

Some of the old twisty methods stopped working, but those scripts have been updated. Are they broken again?

Greet,

Willam

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
Guest
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

First off, mez apologe, RH8.0.2, WindowsXP 32 SP3.

Older twisty code:

<p id="P1"><a class="dropspot" href="javascript:TextPopup(this)" onclick="JavaScript:swapImage(dropdown1);showhidecheck()"
     onfocus="this.blur()" id="a1" style="position: relative;">

      <img src="../image/plus_sign.gif" name="dropdown1" alt="click to expand" title="click to expand" id="dropdown1"

       style="border: none; margin-right: 10px;" width="11" height="11" border="0" />Analysis & Synthesis Settings Report</a></p>


Newer twisty code (which may well be yours Willem):

<p id="p23"><a class="dropspot" href="javascript:TextPopup(this)" id="a2"
     style="position: relative;"><img class="TwistyImage" alt="Collapse"
              src="../image/minus_sign.gif"
              style="border: none;
              display: none;" width="11"
              height="11" border="0" />
<img class="TwistyImage" alt="Expand" src="../image/plus_sign.gif" style="border: none;
   margin-right: 10px;" width="11" height="11" border="0" />GXB Behavior
Differences Report</a></p>

I can dig around on grainge.org and look for solutions there. I see that there's a section on twisties with sample projects and the li,e. We've been using showhide_twisty.js for years. I guess I need to get with the program!

.MW

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
LEGEND ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

Hi,

The latest version of the twisty scripts that I know exist, are available on http://www.grainge.org/pages/authoring/twisty/twisty.htm

I do believe that migrating to the TS Paul method or my method should be possible. Be sure to check out the RH scripting tool. If you can script in Perl, you can surely master the power of the RH scripting tool.

Greet,

Willam

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
Guest
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

I wasn't doing the perl scripting, and that resource has since been reallocated. I've been meaning to learn perl, but alas, time is fleeting.

Thanks, I'll check out the page you refer too. If I can update the .js file to something that works with both the old and new twisty code, that would be best.

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
Guest
Nov 03, 2010 Nov 03, 2010

Copy link to clipboard

Copied

I puttered around with Willam's showhide.js and twisty_rev.js files in a test project with little success. I was able to install an older version of Firefox 3.6.8 that at least allows the Show/Hide buttons to work. We're approaching a production deadline, so I won't be able to explore this much further until after we release.

On an interesting side note, the projects I'm working in are ones I inherited from Jesse Brossard (the fellow mentioned with Lewis Gault in the credits of one of Peter's update pages.)

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 ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

Have you investigated FAR's Define Substring use of variables? That is, you can identify start and end strings, then identify the substring that you want to maintain as a variable within changed or new start and/or end strings.

For example, say you want to change all <h1></h1> tags to <h2 class=BBB></h2> tags while, of course, maintaining each topic's original h1 heading text.

h1-h2BBB.jpg

This will replace all instances of <h1>MyHeading</h1> with <h2 class=BBB>MyHeading</h2>. Of course, I don't know what your original code is, but you might need to do this in two stages instead of one, depending on the complexity of that code and what you want it changed into.

Although I doubt that you would be confident enough to instruct FAR to Replace All (I know I wouldn't), you could certainly step through each instance quite quickly.

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
Guest
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

It has been a few months since I experimented with FAR (everything was working then, so it wasn't deemed

an effective use of my time), and I did have to use some ofthe advaced features. My recollection of experimenting in an offline project was that the twisty code was updated cosmetically but then failed to work(?). Perhaps I'll give it another go.

Which version of FAR is that?

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 ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

FAR 5.0.0.698

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
Guest
Nov 04, 2010 Nov 04, 2010

Copy link to clipboard

Copied

More information on this. I checked our published webhelp with the Firefox 4 beta, and the results are not encouraging. Twistys don't seem to work at all, or with very limited functionality (I tested the original twisty format and the TSPaul format). Twistys in the merged TOC are dead as well.

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
LEGEND ,
Nov 05, 2010 Nov 05, 2010

Copy link to clipboard

Copied

Are only the twisties broken? How about TOC, Index and search? FF4 is in beta and changing a script now may be a waste of time as a new beta may break the updated script. I'd wait for the FF4 release before worrying.

Greet,

Willam

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
Guest
Nov 05, 2010 Nov 05, 2010

Copy link to clipboard

Copied

Actually, I think it would be more productive for Adobe to work with Mozilla to fix this issue. To paraphrase Leonard "Bones" McCoy, "Dammit Jim! I'm a technical writer, not a software engineer!"

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
LEGEND ,
Nov 05, 2010 Nov 05, 2010

Copy link to clipboard

Copied

Hi there

I totally understand wanting things to "just work", but I'm failing to see how the onus is on Adobe here? Unless I misunderstood, you are using a separately developed script from independent sources for this.

Now I do know the onus is on folks like Adobe to produce functional output for all the major browsers. But it seems a bit odd that something works fine in version x of a browser. The browser manufacturer creates version y and suddenly things break. So we all start screaming at Adobe when it breaks. Why don't we scream at the browser maker? After all, things worked until they "enhanced" the browser, no?

Just musing out loud... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!

Adobe Certified RoboHelp HTML Training

SorcererStone Blog

RoboHelp eBooks

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
Guest
Nov 05, 2010 Nov 05, 2010

Copy link to clipboard

Copied

LATEST

WebHelp is an Adobe standard. I'm suggesting that Adobe work with Mozilla to adapt a javascript standard that doesn't require fiddling by us amateurs.

When I report that FireFox 4 breaks merged webhelp, I'm trying to warn the tech comms community that there may be a looming problem, and that it behooves us  to investigate and prepare.

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