In code/common. First off, what is with this shit:
usb_uirt_module=USB_UIRT
Windows users are forced to add this INI entry to make this work. Why would that be? Just do something like:
use USB_UIRT;
Same goes for other similar redundancies found scattered throughout MH. Why make extra work for the users?
And look at this:
<form action="SET;referer" target="control" name=fm>
First off, the referer token is deprecated (at least here.) The http_server script asserts that it doesn't work on Audreys. So that means this whole script is broken for Audrey users. Look carefully and you can see that it would
be broken regardless as it hard-codes a target attribute (for framesets.) The punch line is that this frame (control) does not exist in IA5. Here is the IA5 frameset:
<html><head><title>MrHouse</title>
<!--#include var="$config_parms{html_style}" -->
<meta name='robots' content='noindex, nofollow'>
<!--#include var="$config_parms{web_refresh}" -->
<!--#include var="$config_parms{web_resize}" -->
</head>
<frameset rows='61,*,20' framespacing=0 border=0>
<frame src='top.shtml' name='title' marginheight='1' marginwidth='1' border='0' frameborder='0' scrolling='no'>
<frame src='menu.shtml' name='main' marginheight='0' marginwidth='0' border='0' frameborder='0'>
<frame src='<!--#include var="$config_parms{'html_status_line' . $Http{format}}"-->' name='status' marginheight='0' marginwidth='0' border='0' frameborder='0' scrolling='no'>
</frameset>
</html>
Where's control? The end result is a new window, which Audreys cannot handle (and which annoys the living shit out of anyone trying to use the IA5 or other frameset interface.) And yes, I explained this to the bum who wrote this (several times) over a year ago. He's too busy trying to rewrite the X10 code to remove these stupid target attributes. It isn't like they help at all anyway (the default target is the frame containing the form!)
Here's another one:
<a target="control" href="SUB;referer?usb_uirt_update_html()">
Same shit, different line. Two attributes to remove. No more new windows. What to do about the referer token? That's where the second $ENV variable comes (mentioned in a previous post.) It is called: $ENV{HTTP_REQUEST} and contains a "cooked" request (updated if outside of the firewall to reflect the path on the secure proxy.) The basic rule of thumb is to replace any instance of the referer token with this environment variable. That is how I quickly rewrote most of these scripts (a few of them were so tangled up in common code that it took a little more effort to get them straightened out.)
Here is an example of what this environment variable should look like inside and outside of the firewall. Assume that the path to my site on the remote proxy is /MySite:
Inside: /mhx/usb_uirt_learning.shtml
Outside: /MySite/mhx/usb_uirt_learning.shtml
By using the environment variable (which is set in the http_server.pl script), all links snap into place, regardless of where they are browsed. Without such a thing, all links are broken, unless you take that one loser's advice and set up the "mother of all workarounds", involving another server to rewrite page links. Note that the "rewriter" will choke on more complex pages (eg pages that generate dynamic links with client-side script.) Get it? For standard links (which do not involve proprietary MH directives), a base href will do nicely as long as it is based on
this environment variable. Images that are invariably sourced to /images should be updated to ../images to allow the base href to do its job. That's about it. Any questions?
It's already been over a year since I first suggested this (and over two years since I implemented these changes here.) How many more years will it take before this starts to sink in. New windows: bad. Framesets: bad. Web scripts "married" to specific framesets: bad. These are the very reasons why there are no new interfaces for MH (not even a new frameset!) There will never be a normal (non-frameset) interface published until these changes are made. Too bad as mine is light years ahead of IA5. Ask anyone who ever dropped by my site when I had "open houses" in the past. I know Bruce Winter liked it as he kept asking me to send him the files. As I told him back then, the files won't do any good by themselves (you have to make these other updates first!) Anyone who wants the re-written Web scripts (eg shopping list) is welcome to them, but they are two years old (so only useful as a guide to rewriting the current versions.) Same goes for http_server.pl. I've sent that to more than one person over the years, but nobody seems to have time to bother with it. There are a lot of changes in it, but only a few are critical (like populating the two aforementioned $ENV variables.)