Template variable changes

Started by PeterR, September 10, 2003, 05:05:42 PM

Previous topic - Next topic

PeterR

I got a bug report that my flight plan list wasn't showing any contents. Upon checking my HTML, I discovered that the template variables for flight plans had changed. "_text" has been appended to the end of the time variables.

^^time_filed_text^^
^^time_opened_text^^
^^time_closed_text^^
^^open_time_text^^

I don't know when they changed as I received the report only recently.  So, if you've been making a custom RemoteAccessPublic.html, you may want to check that.
Peter
Bush Flying Unlimited
"At home in the wild"

Russell Gilbert

Hi Peter,

Actually this hasn't changed in quite a long time.  There are two forms of the variables... One is without _text, and those sometimes have HTML in them, such as font color tags to make the numbers blue if the plan is "filed", etc.  And the ones with _text are always just numbers, without HTML.  It's been that way since at least 2.6, but I have modified them slightly along the way, so maybe that messed you up.  Anyway, take a look here, to see the current list of variables...  (this is in the beta directory, so use the usual beta username and password to login, then scroll down to the section titled "The Flight Plan list"):

http://www.chocolatesoftware.com/fshost/beta/help.html#web

Ignore all the broken images, I only copied the html file up to the server for now.

Russell

PeterR

#2
That's peculiar because I've always used these variables without "_text" and at some point, they stopped displaying. If you remove "_text" from the flight plan variables in the template file on your system, does it still work? If it does, then I really don't know what happened because I don't recall doing anything more than compare the template variables in my status page to the ones in the latest status page and adjust the variable names accordingly. Maybe something else was wrong but then I don't know how I fixed it.
Peter
Bush Flying Unlimited
"At home in the wild"

Russell Gilbert

I looked at the code again...  Some time in the past couple of months, I changed those variables, but I made it so they were backwards compatible.  So it still sets time_filed, time_opened, time_closed, and open_time, just like it did before, but those variables aren't being used in the templates anymore.  I also tried changing the public page to use the variables listed above, and they worked just like they do with _text added.  Are you seeing something different?

Russell

PeterR

With the old variables, no flight plans would show up on the Bush Net server. Anyway, I tested my new template on my machine with beta 12 and it's working. I sent the updates to our server admin and as soon as he installs it on the Bush Net server, I'll check it there. Then, if it doesn't work, at least I'll know that the problem lies elsewhere. Sorry for jumping to conclusions. This is really bizarre.
Peter
Bush Flying Unlimited
"At home in the wild"