[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] sending PHP file to browser

On 14/08/2018 19:24, Jim Nagel wrote:


Note: I'm not familiar with StrongED's toolbar configuration - never needed to look at or change any of it, and I'm nowhere near RISC OS at the moment. Looking at Richard's StrongED instructions online, the toolbar may not be covered yet; there's no link for it at:


I assume the toolbar involves internal commands/setting up/whatever, coupled with the ability to invoke star commands. (I'd guess that clicking on the run icon does exactly that, by calling *filer_run ?)

Is there some way I could achieve this goal of sending via Webjames,
maybe by defining Adjust-click on the running-man button?  This would
save a lot of repetititive error-prone manual typing in the URL bar!

The *command part of that would be to call

*URIdispatch <url>

In other words, the first part of the file's pathname needs to be
replaced by http://localhost/ , but determining exactly how much of
the path to change might be tricky to program, since some sites have
more deeply nested directories than this one.

This, however, is the more interesting bit - it needs to be dealt with before the star command, and therefore probably needs some knowledge of how StrongED works.

OTOH, another alternative would be to issue a star command to invoke an external program that handles changing the file path to a URL, then calls either *URIdispatch or the equivalent SWI.

A program that does that shouldn't be difficult to knock together.
Perhaps use could be made of the system variable that I already use to
tell Webjames which of my several sites is the current target for
"localhost" -- <webjames-thissite$dir>.  (I have an obeyfile in each
site that sets this variable to <obey$dir>.  This has proved to be a
good trick, and I'll do a hint&tip in Archive mag.)

There's a better way to do that, you know. I haven't used WebJames in a long time, but I know from when I did that it allows you to set up multiple virtual servers - so you can serve up your local copy of more than one website simultaneously, instead of having to 'choose' the one you want it to serve.

You could have, for example, the site referred to in your post as glastcons.local, the Archive website as archive.local, and so on.

(The .local isn't necessary - it's just what I used to do so that my local copies effectively had a TLD that identified them as locally served.)

It's all explained in WebJames' instructions, somewhere!

Vince M Hudd
Soft Rock Software - www.softrock.co.uk
RISCOSitory        - www.riscository.com

To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at