Re: SSI (Server Side Includes)

[ Follow Ups ] [ Post Followup ] [ Palview Developers Forum ]
Posted by James Garner on December 18, 19102 at 21:08:44:

In Reply to: Re: SSI (Server Side Includes) posted by Andy Templeton on December 17, 19102 at 21:35:06:

I sent the files zipped for you to look over.

As far as a common JavaScript, I am sure it can be done.
You should be able to define a common js file which essentially defines the logic of the game, board, pieces, and move list and how they interact for a single game.

I strongly recommend making a ChessGame object to contain all this logic. This give one the advantage of creating separate instances of the game varaiable, one for each game needed on a page. A variable like gameID can be used to track each game and its pieces by naming all images and divisions based named derived through logic from the gameID variable.

Such a script or object must have settable flags comparable to the flags set in the ini file to adjust its behavior accordingly. For example: a frame enabled (requiring) page should set the frames flag on in the object, which would make use of a locally defined game doc variable (gdc) which would need to be set by the calling html code (goes with out saying...) Thus all pieces, images etc can be logically found at run time based on the setting of these variable. These variables would need to be set based the settings contained in the ini file, and contained within the html generated by PalView.

Such a script could be readily used to produce a page with one game. With the naming described above, it should handle games on frames and multiple games on a page.

The logic of PalView would be reduced to creating html pages which to use of this fairly complex object, or script file.

PalView would no longer need to generate javascript, just html. Essentially the javascript would be a separate configurable item. Probably more stable thatn PalView itself.

Now regarding the ini file settings. If the script is lacking in its logic, the problem with varing ini files will persist. If the logic is taken to completion, all flags in the ini file will effect the functioning of the script in some way, thus the js file should still be valid.
(in essence the js file becomes like a dll)

If you would like assistance in making suich changes, or would like an eye to look over your changes, and possible to test them, just send me a message with the code.
(e-mail: jkgarner@charter.net)

Thanks for your work on such a fine tool.

Follow Ups:
Post a Followup

Name:   
Subject:

Comments:

Optional Link URL:

Link Title:

[ Follow Ups ] [ Post Followup ] [ Palview Developers Forum ]