Local InfoUrls

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Local InfoUrls

Post #1by rthorvald » 01.10.2005, 02:26

Question / feature request:
I can define an InfoUrl to be opened from a local directory (example: file:///Users/Shared/Celestia/extras/addons/myaddon/test.html).

BUT: i can??t distribute the SSC file, since this path will be unique to me, on the computer i am using right now.
Is it possible for Celestia to consider it??s own appfolder as root, so that one can write an url like this: /extras/addons/myaddon/test.html

... I think this would be incredibly useful, since the user does not need to be online to lookup (whatever).

Or is this possible today, am i missing something obvious here?

- rthorvald

bdm
Posts: 461
Joined: 22.07.2005
With us: 19 years 4 months
Location: Australia

Post #2by bdm » 01.10.2005, 12:57

I think this is an excellent idea. I have also wanted to have local URLs so we could distribute HTML files with an addon.

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #3by ElChristou » 01.10.2005, 13:28

Yes, also agree, this could be quite usefull...
Image

Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Post #4by Guckytos » 04.10.2005, 10:29

Wasn't there the "Info Extension Plugin" from maxim, for handling such things??

Just going to try it out, since I also have some extra infos I want to incorporate. And I also think it is usefull if things are stored local.

Anyways, it would be a real good thing if extended Informations could be handled by Celestia itself.
And I'd vote for an XML- or html-format for the files.

Okay, now i am going crazy:

What would you think of a transparent window that is hovering in front of the object and displays the extra info? Wouldn't that be really crazy? Saw something like this in another program, don't know if Celestia could handle this.

Okay i found the program and took a screenshot:

Image

Something like this could look good in Celestia, don't you think?

Regards,

Guckytos

Topic author
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #5by rthorvald » 12.10.2005, 14:13

Guckytos wrote:Anyways, it would be a real good thing if extended Informations could be handled by Celestia itself.


Absolutely. But i??ll settle for having Celestia look in a pre-defined local directory before going to nineplanets.org. I imagine this would be trivial to implement. Can any of the developers comment?

-rthorvald

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #6by hank » 12.10.2005, 14:24

rthorvald wrote:
Guckytos wrote:Anyways, it would be a real good thing if extended Informations could be handled by Celestia itself.

Absolutely. But i??ll settle for having Celestia look in a pre-defined local directory before going to nineplanets.org. I imagine this would be trivial to implement. Can any of the developers comment?

-rthorvald

IIRC, InfoUrls are handled by the browser, not by Celestia itself.

- Hank

Topic author
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #7by rthorvald » 12.10.2005, 14:38

hank wrote:InfoUrls are handled by the browser, not by Celestia itself.


Yes, but it is Celestia that passes the URL to the browser. Since the different OSes (and users) have different addreses to local root, it is currently impossible to distribute html files with an addon and have the browser look it up via Web Info.

But: If Celestia??s default was a particular local folder instead of the nineplanets website... Something like this:

"check for whatever.html in local folder. If missing, go to http://www.nineplanets.org/whatever.html"

-rthorvald

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #8by hank » 12.10.2005, 15:08

rthorvald wrote:Since the different OSes (and users) have different addreses to local root, it is currently impossible to distribute html files with an addon and have the browser look it up via Web Info.

But: If Celestia??s default was a particular local folder instead of the nineplanets website... Something like this:

"check for whatever.html in local folder. If missing, go to http://www.nineplanets.org/whatever.html"

-rthorvald

Which local folder should be checked?

- Hank

Topic author
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #9by rthorvald » 12.10.2005, 15:15

hank wrote:Which local folder should be checked?

Who knows... The Extras folder perhaps...?

-rthorvald

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #10by hank » 12.10.2005, 15:28

rthorvald wrote:
hank wrote:Which local folder should be checked?
Who knows... The Extras folder perhaps...?

-rthorvald

Since it was your feature request, I thought you might know. You want just the Extras folder checked? What about its subdirectories?

- Hank

Topic author
rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Post #11by rthorvald » 12.10.2005, 15:36

hank wrote:Since it was your feature request, I thought you might know. You want just the Extras folder checked? What about its subdirectories?


I have a long wish list... Just wanted to keep it simple. Ideally, of course, the InfoUrl would be retrieved from the Addon Folder of the spesific addon in question. I kept the suggestion simple because i *really* would like this to be possible, and though that the simpler the request was, the greater were the chance that someone actually would take the time to do it.
I just wanted to be able to deliver information to the user without the need for him to be online. How it is done is really much less important than that it is possible at all.

Anyway, thanks for the interest.

-rhorvald

hank
Developer
Posts: 645
Joined: 03.02.2002
With us: 22 years 9 months
Location: Seattle, WA USA

Post #12by hank » 12.10.2005, 15:58

rthorvald wrote:Ideally, of course, the InfoUrl would be retrieved from the Addon Folder of the specific addon in question.

That's what I thought you'd want. I think that's probably non-trivial to implement because the default url is created when the info is reqested, and at that point I don't think Celestia knows what addon the object came from. If checking just the Extras folder were sufficient, it probably wouldn't be too hard, although I'm afraid it would require changes in the platform-dependent code. In any case it's a moot point (as are all new feature requests), since Celestia isn't being updated these days...

- Hank

maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #13by maxim » 19.10.2005, 21:10

Runar,

what's your specific problem. The installation directory of celestia is defined as the default directory for a local url (at least on windows and linux). So if you provide a url like 'html/mystuff/page1.html' the browser will look in a directory 'html/mystuff' located in your celestia application directory.

The 'Info Extension Plugin' I made, showed how to use this for capturing a url request before sending it to the internet an provide a list of alternate resources via html/javascript. I know it was tested on windows and linux, but I don't know if anyone ever tested it on macos.

maxim


Return to “Development”