Info Extension Plugin
Info Extension Plugin
I've written a concept for pluging Info data more closely into Celestia. Here is what it does:
---------------------------------------------------------------------------------
The Info Extension Plugin was created to offer a concept of how to include more, and more extended informations for planets, moons and other objects, than Celestia itself can provide currently.
The plugin uses the Info menu topic together with the 'InfoURL' setting to provide extended information throught a set of HTML/Javascript Files. The plugin is prepared to be used with alternate Info sets for different tasks. Following is a short usage description:
. The plugin adds a new directory 'html' to the Celestia base folder. It is itself contained within the 'info' directory inside 'html'.
. Every information set for an object starts with a HTML document called base[ObjectName].html.
. The object definition has to contain a setting 'InfoURL "html/info/base[ObjectName].html"' inside its defining .ssc.
. For the info set supplied with this base package, which provides extended information for the nine planets, this means you have to add the following lines to each planet definition inside 'solarsys.ssc':
InfoURL "html/info/baseMercury.html"
InfoURL "html/info/baseVenus.html"
InfoURL "html/info/baseEarth.html"
InfoURL "html/info/baseMars.html"
InfoURL "html/info/baseJupiter.html"
...
. The list of information sources (online and offline) provided in the initial window can be extended to your needs.
. Alternative info sets can be switched via 'pluginConfig.js' inside 'html/info/js'.
. A script or activity designer who wants to provide an alternate set of object informations that is suited to his intends, may to so by either providing an alternate 'pluginConfig.js', or by extending the existing one with an alternate value set, defining the start directory and the size and position of the info window. The info set itself goes into a separate directory inside 'html/info'.
. An addon designer who has created his own fictional solarsystem(s) may provide extended information for his planets, moons and stars, by placing the HTML/Javascript files, the styles and the page design graphics into a complete own directory inside 'html/info', and adding 'InfoURL' definitions to his .scc files.
. Any changes done inside the HTML/Javascript files can take effect without restarting Celestia, because they are handled by your local webbrowser and not by Celestia.
-------------------------------------------------------
This is however more a proof of concept than a ready solution.
So you will find the pages design quite simple. Moreover I do really want to have feedback about acceptance, usability, testing with different browsers/OS and startup delay times on different systems.
The download is available here: http://www.nefkom.net/z-bau/celestia/info%20plugin.zip
have fun
maxim
---------------------------------------------------------------------------------
The Info Extension Plugin was created to offer a concept of how to include more, and more extended informations for planets, moons and other objects, than Celestia itself can provide currently.
The plugin uses the Info menu topic together with the 'InfoURL' setting to provide extended information throught a set of HTML/Javascript Files. The plugin is prepared to be used with alternate Info sets for different tasks. Following is a short usage description:
. The plugin adds a new directory 'html' to the Celestia base folder. It is itself contained within the 'info' directory inside 'html'.
. Every information set for an object starts with a HTML document called base[ObjectName].html.
. The object definition has to contain a setting 'InfoURL "html/info/base[ObjectName].html"' inside its defining .ssc.
. For the info set supplied with this base package, which provides extended information for the nine planets, this means you have to add the following lines to each planet definition inside 'solarsys.ssc':
InfoURL "html/info/baseMercury.html"
InfoURL "html/info/baseVenus.html"
InfoURL "html/info/baseEarth.html"
InfoURL "html/info/baseMars.html"
InfoURL "html/info/baseJupiter.html"
...
. The list of information sources (online and offline) provided in the initial window can be extended to your needs.
. Alternative info sets can be switched via 'pluginConfig.js' inside 'html/info/js'.
. A script or activity designer who wants to provide an alternate set of object informations that is suited to his intends, may to so by either providing an alternate 'pluginConfig.js', or by extending the existing one with an alternate value set, defining the start directory and the size and position of the info window. The info set itself goes into a separate directory inside 'html/info'.
. An addon designer who has created his own fictional solarsystem(s) may provide extended information for his planets, moons and stars, by placing the HTML/Javascript files, the styles and the page design graphics into a complete own directory inside 'html/info', and adding 'InfoURL' definitions to his .scc files.
. Any changes done inside the HTML/Javascript files can take effect without restarting Celestia, because they are handled by your local webbrowser and not by Celestia.
-------------------------------------------------------
This is however more a proof of concept than a ready solution.
So you will find the pages design quite simple. Moreover I do really want to have feedback about acceptance, usability, testing with different browsers/OS and startup delay times on different systems.
The download is available here: http://www.nefkom.net/z-bau/celestia/info%20plugin.zip
have fun
maxim
I suppress pop-ups in my browser (Opera 7.50.3494) so I just get the initial black page.
If I enable pop-ups the base url window opens and the info panel opens in the far right bottom corner of the screen.
You may want to change the cursor to a hand in your css for those javascript hyperlinks in the info panel.
cheers
greenwood
If I enable pop-ups the base url window opens and the info panel opens in the far right bottom corner of the screen.
You may want to change the cursor to a hand in your css for those javascript hyperlinks in the info panel.
cheers
greenwood
Howdy Maxim,
Very nice idea!
However...
1. I too (like most folks) use a pop-up blocker, which requires a special key be pressed during the entire load-time for the initial window.
2. I use Win XP Pro SP1 and IE 6 XPSP2. If one or more browser windows are currently open, your app takes them over, one by one. Not good.
3. When taking over an existing browser window, nothing is displayed except a blank page.
4. Can text size be changed (in my case larger) by the user?
5. Can the window size be made re-sizable? It appeared that the little window was not resizable.
6. Is there any other way, than manually editing the solarsys.ssc file, to get your required lines added? Such as a secondary SSC file?
Like I said above, very nice idea! Would love to see it worked on a bit.
Cheers,
-Don G.
Very nice idea!
However...
1. I too (like most folks) use a pop-up blocker, which requires a special key be pressed during the entire load-time for the initial window.
2. I use Win XP Pro SP1 and IE 6 XPSP2. If one or more browser windows are currently open, your app takes them over, one by one. Not good.
3. When taking over an existing browser window, nothing is displayed except a blank page.
4. Can text size be changed (in my case larger) by the user?
5. Can the window size be made re-sizable? It appeared that the little window was not resizable.
6. Is there any other way, than manually editing the solarsys.ssc file, to get your required lines added? Such as a secondary SSC file?
Like I said above, very nice idea! Would love to see it worked on a bit.
Cheers,
-Don G.
selden wrote:Patience!
Hihi, sorry - I know I can be very unpatient sometimes.
greenwood:
- Does Opera give the option to allow popups for local (or intranet) URLs?
- The base URL should resize to 100x100 and go into the background immediately. Does it?
- The Info window should stay 20px from right edge and 100px from bottom edge, regardless of your screen resolution.
- A hand cursor would be worth considering, I think.
- How long is your startup delay?
maxim
-
- Posts: 169
- Joined: 31.01.2002
- With us: 22 years 9 months
- Location: Wisconsin
Don:
1. Does your popup blocker allow for exclusion of certain URLs (locals or single ones)?
2. Yes, not good. That shouldn't happen. I have to investigate (althought I don't have XP).
3. Related to 2. I think.
4. Yes. Go into html/info/css/styles.css. Everywhere you see those:
you can change font size, weight and family. This affects all (current and future) documents. Relating font-family: the first is the preferred, the others are fallbacks.
5. Yes. Go into html/info/js/pluginConfig.js:
On the fifth-last line you will see 'resizable=no' somewhere. Change this to 'resizable=yes'.
6. I am afraid not. The InfoURL directive has to be in the initial objects definition AFAIK. One of the developers may know better, but I think it's currently not possible.
maxim
1. Does your popup blocker allow for exclusion of certain URLs (locals or single ones)?
2. Yes, not good. That shouldn't happen. I have to investigate (althought I don't have XP).
3. Related to 2. I think.
4. Yes. Go into html/info/css/styles.css. Everywhere you see those:
Code: Select all
font-size: 10px;
font-weight: bold;
font-family: Tahoma,Arial,sans-serif;
you can change font size, weight and family. This affects all (current and future) documents. Relating font-family: the first is the preferred, the others are fallbacks.
5. Yes. Go into html/info/js/pluginConfig.js:
Code: Select all
/***** Default Value Set ***********************************************************/
var path = "default/"; // starting path of actual info deployment
var width = 300; // start width of info window
var height = 200; // start height of info window
var xpos = screen.width-width-20; // horizontal window position on screen
var ypos = screen.height-height-100; // vertical window position on screen
/***** End Of Default Value Set ****************************************************/
/**********************************************************************/
/* Put other value sets here. Only one set may be activ at same time. */
/**********************************************************************/
/***** Creation of the Information Window *****/
function createInfoWindow(page) {
this.blur();
this.resizeTo(100,100);
var options = "width="+width+",height="+height+",left="+xpos+",top="+ypos+
",location=no,menubar=no,resizable=no,status=no,scrollbars=yes,toolbar=no";
var document = path+page;
textwin = window.open(document,'Textwindow',options);
this.blur();
}
On the fifth-last line you will see 'resizable=no' somewhere. Change this to 'resizable=yes'.
6. I am afraid not. The InfoURL directive has to be in the initial objects definition AFAIK. One of the developers may know better, but I think it's currently not possible.
maxim
Maxim,
I'd suggest specifying relative font sizes (%) in your stylesheets instead of absolute font sizes. Some people need small fonts and some people need large fonts. Your design also needs to allow for people who have Accessability features enabled -- like "ignore font sizes specified in Web pages".
I'd suggest specifying relative font sizes (%) in your stylesheets instead of absolute font sizes. Some people need small fonts and some people need large fonts. Your design also needs to allow for people who have Accessability features enabled -- like "ignore font sizes specified in Web pages".
Selden
- Does Opera give the option to allow popups for local (or intranet) URLs?
not as far as I know, they are just switched off...would an IFRAME be a better alternative to javascript?
- The base URL should resize to 100x100 and go into the background immediately. Does it?
No it is full screen...there is no background as such all pages are tabbed within opera, the info window does receive focus though.
- The Info window should stay 20px from right edge and 100px from bottom edge, regardless of your screen resolution.
Yep, it does that...i cant read anything in the info window I can just see the bullet points and none of the text...the info window comes out at 300px wide by 230px high
- A hand cursor would be worth considering, I think.
style.css add
.jref{cursor:hand}
html files add
<li class="jref"
- How long is your startup delay?
not really measerable, instant.
IE6 takes about 5 seconds
not as far as I know, they are just switched off...would an IFRAME be a better alternative to javascript?
- The base URL should resize to 100x100 and go into the background immediately. Does it?
No it is full screen...there is no background as such all pages are tabbed within opera, the info window does receive focus though.
- The Info window should stay 20px from right edge and 100px from bottom edge, regardless of your screen resolution.
Yep, it does that...i cant read anything in the info window I can just see the bullet points and none of the text...the info window comes out at 300px wide by 230px high
- A hand cursor would be worth considering, I think.
style.css add
.jref{cursor:hand}
html files add
<li class="jref"
- How long is your startup delay?
not really measerable, instant.
IE6 takes about 5 seconds
Howdy Maxim,
Here's some more info ...
Entering "localhost" or "http://localhost" does not work. However, I looked at the "blocked" list and found entries for "file:///C:/Program%20Files/Celestia2/..." and entering this much of it did the trick.
Related to #2 and #3 above ...
* The browser window that gets "taken over" results with the title "Celestia - Earth Info - Internet Explorer", an Address line of "C:\Program Files\Celestia2\html\info\baseEarth.html", and a blank page about the size of a postage stamp.
* The actual information window (a new pop-up browser window) has the title "Celestia - Earth Info Panel".
* When I click the "close" button in the Information Panel, I get a pop-up message from Microsoft Internet Explorer saying the following, "The Web page you are viewing is trying to close the window. Do you want to close this window? [Yes] [No]"
If I click Yes, BOTH browser windows are closed (the one taken over AND the Info Panel).
If I click No, only the Info Panel is closed.
Your text size and window size fixes work fine. However, I agree with Selden that a variable size font (%) would be better than having to manually change all the font size definitions.
May I also suggest having the default be resize=yes, instead of no?
Or, maybe a text-based configuration file of some sort would be in order, that can be read and displayed (via Java) for easy user modification?
FYI, I use the "Ignore colors specified on Web pages" Accessibility option and that works fine.
It's too bad that users can't ADD a file that Celestia would automatically append to the solarsys.ssc file, instead of having to make manual changes -- which *always* kicks you in the butt when update time comes along. Maybe this would be a good feature request for Chris?
Thanks for creating this new means of allowing a user to add extra information text to their Celestia versions.
Cheers,
-Don G.
Here's some more info ...
Entering "localhost" or "http://localhost" does not work. However, I looked at the "blocked" list and found entries for "file:///C:/Program%20Files/Celestia2/..." and entering this much of it did the trick.
Related to #2 and #3 above ...
* The browser window that gets "taken over" results with the title "Celestia - Earth Info - Internet Explorer", an Address line of "C:\Program Files\Celestia2\html\info\baseEarth.html", and a blank page about the size of a postage stamp.
* The actual information window (a new pop-up browser window) has the title "Celestia - Earth Info Panel".
* When I click the "close" button in the Information Panel, I get a pop-up message from Microsoft Internet Explorer saying the following, "The Web page you are viewing is trying to close the window. Do you want to close this window? [Yes] [No]"
If I click Yes, BOTH browser windows are closed (the one taken over AND the Info Panel).
If I click No, only the Info Panel is closed.
Your text size and window size fixes work fine. However, I agree with Selden that a variable size font (%) would be better than having to manually change all the font size definitions.
May I also suggest having the default be resize=yes, instead of no?
Or, maybe a text-based configuration file of some sort would be in order, that can be read and displayed (via Java) for easy user modification?
FYI, I use the "Ignore colors specified on Web pages" Accessibility option and that works fine.
It's too bad that users can't ADD a file that Celestia would automatically append to the solarsys.ssc file, instead of having to make manual changes -- which *always* kicks you in the butt when update time comes along. Maybe this would be a good feature request for Chris?
Thanks for creating this new means of allowing a user to add extra information text to their Celestia versions.
Cheers,
-Don G.
It wouldn't prevend from javascript usage.greenwood wrote:...would an IFRAME be a better alternative to javascript
At first the 'pluginConfig.js' provides a central plugin and configuration point. If you want to set up your very own set of info panels, you just put them in a separate directory, and set 'pluginConfig.js' to point to that directory instead the default one. Nothing else has to be changed, especially nothing inside solarsys.scc - because you did that before, for one and all times by adding the InfoURLs.
Secondly I don't see any other way to get rid of all the tools-,status-,adress-, and other lines that I don't want to see when the small window pops up inside (on top of) my current celestia window - to give me information of what I'm currently watching, an still want to watch while I'm reading the infos.
Opera can be configured to work in single window and multi windows mode. The plugin is indented do be used for browsers with multi windows mode. There are limitations for single window modes. In this case you are right, and an IFRAME would make more sense.greenwood wrote:...there is no background as such all pages are tabbed within opera
greenwood wrote:I can just see the bullet points and none of the text
Strange. Can you figure out why? textcolor?
maxim
Last edited by maxim on 01.02.2004, 12:31, edited 1 time in total.
Name and size are ok. But it should't take over an existing browser window but instead create his own one. This blind 'controller window' is needed to allow for a central plugin point, from where you can add your own info panels without having to change solarsys.scc ever again. Additionally it allows to create a popup without all those unneccessary adress-,status-, and tool-lines attached.don wrote:The browser window that gets "taken over" results with the title "Celestia - Earth Info - Internet Explorer", an Address line of "C:\Program Files\Celestia2\html\info\baseEarth.html", and a blank page about the size of a postage stamp.
That's the only one you should see in front of your running celestia.don wrote:The actual information window (a new pop-up browser window) has the title "Celestia - Earth Info Panel".
That's ok so far. It's an effect of a browsers security constraint. Pressing 'close' starts a javascript routine that closes the Info Panel and his opener (The 'blind' controller window). Due to security considerations browsers will not allow popups to close the window that opened them without confirmation. This should prevent 'bad' popups from taking over, closing its opener and miming its behavior or breaking your current sessions history, while taking you to a complete other server. So this message arises while javascript tries to close the opener window. If you say 'no', only the info panel is closed, not the controller. In our case you can always say 'yes'. This behavior can't be switched off.don wrote:When I click the "close" button in the Information Panel, I get a pop-up message from Microsoft Internet Explorer saying the following, "The Web page you are viewing is trying to close the window. Do you want to close this window? [Yes] [No]"
If I click Yes, BOTH browser windows are closed (the one taken over AND the Info Panel).
If I click No, only the Info Panel is closed.
As I said initially, this is at first a proof of concept, not a ready solution.don wrote:Your text size and window size fixes work fine. However, I agree with Selden that a variable size font (%) would be better than having to manually change all the font size definitions.
May I also suggest having the default be resize=yes, instead of no?
Or, maybe a text-based configuration file of some sort would be in order, that can be read and displayed (via Java) for easy user modification?
The primary indention is that is is flexible and pluggable. This inherits that users can make their preffered configuration settings, and these are not to be altered by further plugin addings. So the files 'styles.css' and 'pluginConfig.js' shouldn't be touched by plugin addings. Users can adapt these to their personal needs (regarding windows size, position and options, font-size etc.) and be happy with it without worrying.
Should there be a plugin (as part of a specialized script or an education activity) that needs for any reasons it's own fixed setting, it should put itself into another directory inside info and parallel to default, and use it's own style and window settings without interferring with the default ones.
I suggest that we should destille a set of default values that meets most common requirements and leave the rest to the individual user. I will consider percentage fonts - the use of it would require also automatic button resizing and automatic window resizing, so I first have to check for this.
don wrote:Maybe this would be a good feature request for Chris?
I've seen you've done that already.
maxim
Hi maxim,
Thank you for your answers.
One more thing this add-on provides, that might not be thought of right away ... it allows information to be displayed in ANY LANGUAGE, without modifying Celestia!
This is where I think a simple config file or scriptlet would be much more effective, like Celestia uses (celestia.cfg). If a config file is used, it should be a simple plain text file that contains the required setting information, with comments in plain <your language here>, that all users can understand (no knowledge of JS or CSS required) and edit to meet their needs. If a scriptlet is used, it could modify a data file of any format containing the necessary settings.
Thank you for considering percentage fonts. If you provide a way for the user to set font sizes (other than editing the CSS) then this might not be necessary. But, button and window sizes would need to be adjusted accordingly.
Cheers,
-Don G.
Thank you for your answers.
Agreed. Is this a JS problem or IE problem?maxim wrote:Name and size are ok. But it should't take over an existing browser window but instead create his own one.
Actually, in my case, I need to click No, or I lose the browser window it hijacked! When I say No, I can then resize the browser window to where it was and click the Back button to re-display the web page it was on.maxim wrote:In our case you can always say 'yes'. This behavior can't be switched off.
Yes, I fully understand. My writing this was merely to encourage continued development into a product that would not require the *user* to know JavaScript and/or CSS formatting, unless they want to create their own info sheets. Add-on developers would obviously need to know these things if they want to create sheets for their add-ons.maxim wrote:As I said initially, this is at first a proof of concept, not a ready solution.don wrote:Or, maybe a text-based configuration file of some sort would be in order, that can be read and displayed (via Java) for easy user modification?
One more thing this add-on provides, that might not be thought of right away ... it allows information to be displayed in ANY LANGUAGE, without modifying Celestia!
maxim wrote:I suggest that we should destille a set of default values that meets most common requirements and leave the rest to the individual user.
This is where I think a simple config file or scriptlet would be much more effective, like Celestia uses (celestia.cfg). If a config file is used, it should be a simple plain text file that contains the required setting information, with comments in plain <your language here>, that all users can understand (no knowledge of JS or CSS required) and edit to meet their needs. If a scriptlet is used, it could modify a data file of any format containing the necessary settings.
Thank you for considering percentage fonts. If you provide a way for the user to set font sizes (other than editing the CSS) then this might not be necessary. But, button and window sizes would need to be adjusted accordingly.
Cheers,
-Don G.
Ok, here I,m back after a few days.
I've released a new version, that includes some improvements.
Resizable is default now. Hand cursor is used. I removed function code from 'pluginConfig.js', so it can be regarded now as something like a plain text configuration file. More configuration settings are available. One of them is font size, which can now be adjusted from a central point.
greenwood:
Was this due to the original settings, or to changes you did?
don:
There is no way of using a 'real' configurations file, because javascript is not allowed to read/write onto your filesystem. Everything (*.html, *.css, *.js) is part of the loading HTML document, and included at load time, even if parts are spread over different files. The solution I provide now, is the nearest to a 'real' configuration file. Remember that we don't have a webserver with cgi scripting in the background. Everything is done directly by the browser.
The hijacking thing seems to be browser configurable, althought I don't know which setting. The initial call is done from within Celestia while opening what you've defined via an 'InfoURL' setting. This openes (in our case) the base background window.
If you try to open another 'InfoURL' that referres directly to a web adress (there should be several inside default Celestia) you should also watch that an existing window is hijacked. Because on my computer IE is always opening InfoURLs inside a separate window without hijacking any existing one, the conclusions is that there should be an option anywhere that controlles this behavior. Please (anybody) give me a short hint if you find it.
Checking for use of % fontsize settings, I found them badly useable. Other than one might expect the % value is not relative to the screen resolution or the windows size but to the parental HTML element that contains the element that want's to use the fontsize setting. It may be useable inside sophisticated, well planned layouts, but not for our needs.
maxim
I've released a new version, that includes some improvements.
Resizable is default now. Hand cursor is used. I removed function code from 'pluginConfig.js', so it can be regarded now as something like a plain text configuration file. More configuration settings are available. One of them is font size, which can now be adjusted from a central point.
greenwood:
Was this due to the original settings, or to changes you did?
don:
There is no way of using a 'real' configurations file, because javascript is not allowed to read/write onto your filesystem. Everything (*.html, *.css, *.js) is part of the loading HTML document, and included at load time, even if parts are spread over different files. The solution I provide now, is the nearest to a 'real' configuration file. Remember that we don't have a webserver with cgi scripting in the background. Everything is done directly by the browser.
The hijacking thing seems to be browser configurable, althought I don't know which setting. The initial call is done from within Celestia while opening what you've defined via an 'InfoURL' setting. This openes (in our case) the base background window.
If you try to open another 'InfoURL' that referres directly to a web adress (there should be several inside default Celestia) you should also watch that an existing window is hijacked. Because on my computer IE is always opening InfoURLs inside a separate window without hijacking any existing one, the conclusions is that there should be an option anywhere that controlles this behavior. Please (anybody) give me a short hint if you find it.
Checking for use of % fontsize settings, I found them badly useable. Other than one might expect the % value is not relative to the screen resolution or the windows size but to the parental HTML element that contains the element that want's to use the fontsize setting. It may be useable inside sophisticated, well planned layouts, but not for our needs.
maxim
Maxim,
The % resizing must be relative to the parent window's font size. That parent font size was chosen by the user because that's what he needs -- for whatever reason. The Info font sizes should be that way too.
You must not assume that any particular font size is "best". Think of the Info windows as ways to display information, not as pretty pictures that you design down to the last pixel.
The % resizing must be relative to the parent window's font size. That parent font size was chosen by the user because that's what he needs -- for whatever reason. The Info font sizes should be that way too.
You must not assume that any particular font size is "best". Think of the Info windows as ways to display information, not as pretty pictures that you design down to the last pixel.
Selden