Palview4 Manual * The Palview Pages * The Palview Developers Forum * Home * Palamede

## The Page Types Index Before determining what type of page you want to create, you probably should read about the various parts of a Palview-generated page. These parts are described in the section, The Parts of a Palview Page below Palview can generate a number of different Html-JavaScript page types. The actual choice is made using the htmltype INI option. A short description of these various page types can be read by clicking on any of the page type names below. Those that appear in green are new page types for Palview4.
normal | The normal page.
frames | A setup that uses frames.
iframe | A setup that uses the Html IFRAME.
static | Used to create static non-replayable games.
database | Combines several games played on the same board without moves.
muliframe | Each game gets its own IFRAME on the page.
batch | Used to create a crosstable linked to separate normal html files for each game.
overview | Shows last position of each game on a board with links to the full replayable game.
overdb | Similar to the above, except that the games are placed into a database.
problem | A page dedicated to composed chess problems.
tactics | A page that is dedicated to tactical exercises.
magazine | You create the Html and then Palview inserts whatever chess material you ask for.
magviewer | The reusable game viewer that is required for the magazine page.

## The Parts of a Palview Page Below is a picture of what an htmltype = normal page looks like. The game has been placed in a table with two cells. The first cell, on the left, contains the chess board and pieces, where the game moves will be replayed. Under this board is a caption space where Palview writes the moves. In the diagram the caption move is 17. Rxe6! Under the caption is the control panel that is used to navigate within the game. It can also be used to flip the board itself. In the right side of the table you will see the game itself. At the top is a bordered box called the game infobox. This box contains the relevant information about the game such as the Opening and ECO code of the game, and the names of the players, their titles, ratings, and country. Other information is also available such as the location where the game was played and the date. Below this infobox we see the actual game moves written into an Html DIV (division). The Numeric Keypad can sometimes be an unseen part of a Palview page as it may be used to allow visitors to navigate through the game. The Html Page can also be considered a part of the Palview page by itself in that there are a number of INI options that apply to the page overall. These various parts of the normal page are common to all the other page types. Below is a discussion on each of these sections. ### The Board and Pieces The Palview board uses transparent GIF images for chess pieces. The program currently supports four different piece sizes: 19, 24, 29, and 35 pixels. This piece size is controlled by the pcsize INI option. the names of the images are formed by the color of the piece, w for white, and b for black, the piece letter, p, n, b, r, q, k, and the size of the piece in pixels. So the black 24 pixel rook is br24.gif. In order to reduce the size of the Html file itself, the 29 pixel set does not append 29 to the piece, so wn.gif is a white 29 pixel knight. (It is assumed that most webmasters will use the 29 pixel set by default.) Each set also contains a special empty square piece called i.gif (or i24.gif etc.), and three special board marker pieces that are used to mark an empty square with a circle, o.gif, a dot, v.gif, and an X, x.gif. These piece images are expected to reside in a folder called jpc by default, but their location can be changed by using the imgurl option. Since the piece images have transparent backgrounds, it is possible to move them about freely on the board using the movingpcs option. This lets your page visitors Kibitz their own ideas in what if ... fashion. Palview comes with six different piece sets that are based upon a number of very popular chess fonts. You can see each of these sets in the section, The Palview Chess Sets. You will have noticed that all the pieces in each set have the same name for each piece. That is, both the Linares and Merida 24 pixel black knights are called bn24.gif. This means that if you want to use multiple sets on your site, then you will need to create a separate folder for each set and then use the imgurl option to set the url to this folder for each of the pages you create. But this is probably more work than you need to do. We expect that you will pick the set that you like the most and that you will use it throughout your site in order to maintain the same look and feel. In this case, you only need to place the set you want into some folder, say jpc, and simply use this in all your pages. The actual board image, the squares of the chess board, are slipped under the chess pieces by setting the background image of the Html TABLE to the chosen boardimage. This boardimage only requires a picture of four squares of the chess board as in the following example: The browser will tile this simple image to complete all the 64 squares of the board. The image itself can be either a JPG or GIF. A good collection of board images come with Palview and can be seen in The Palview Chess Boards. The border around the chess board is controlled by the pgbb CSS class in the stylesheet. (See Palview and CSS for more information on this topic.) It is important to note that Netscape 4.x does not understand CSS borders. While we recommend using the Internet Explorer 4 or 5 or the new Netscape 6.x browser, we have also created a special INI option for creating pages that are as compatible as possible with Netscape 4. This option is ns4comp. If you use this option, you will also be able to use the bordercolor to create a border even in Netscape 4. For the htmltype = normal page you can decide how you wish to vertically align the board using the boardvalign option. The default is to center the board both horizontally and vertically. A feature with Palview is the ability to have the last move played in the game written as a tooltip whenever you hover the mouse over the board itself. This is the tooltipboard option. (Note that Netscape 4 does not support this new option.) If you are going to use movingpcs with your page, then you should probably not tooltipboard the board as this becomes a bit annoying when trying to move the pieces around on the board. In the picture above of the normal page, you will notice the last move played in the game is written directly under the board. This area under the board is called the Board Caption. The actual appearance of the caption is controlled in the stylesheet using the pt class. (See Palview and CSS for more information on this topic.) (See ns4comp for more information on the Board Caption and Netscape 4.) One other option that is useful in regard to this caption area is the variationcolor. You use this to control the color that variation moves will be displayed in under the board. Normally you would want to set this to be the same as the color you are using for the variation moves in the game score itself. (See Palview and CSS for more information on this topic.) ### The Control Panel Underneath the board you will find the control panel that is used to navigate through the moves of the game. As you can see above, the control panel has nine separate buttons. Reading from left to right, these buttons are: Start, Back5, Back, Forward, Forward5, End, Flip, Autoplay, and Step. Each of these buttons can have a tooltip assigned to them to indicate their function. (See constarttip, con5backtip, conbackttip, conforwardtip, con5forwardtip, conendtip, confliptip, conautotip, and consteptip.) The Start button, takes you to the start of the game, just as you would expect. The Back5 button, moves backward in the game by five moves. Note, however, that this button will not step into any variations. In other words, the game will be stopped at either five moves back or at the end of a variation sequence. Looking at the game above as an example, if you had just played the move14. Qd3 and then pressed the Back5 button, you would be taken to the move 11... h6. It stops here because there is a variation sequence between the move 11. Bc2 and 11... h6. On the other hand, if you had just played the move 11. Bc2 and pressed the Back5 button, then you would be taken to the move 6. Bd3. The Back button, takes you back one move in the game. It is important to remember that this button will always look for the next move at the same depth as the current move. Using the above game as an example, if you were currently on the move 17. Rxe6! and you clicked the Back button, you would end up on the move 16... Kg7 since this move is at the same depth. (i.e. the variation between the moves is skipped.) On the other hand, once you are inside a variation sequence, using the Back button will take you back one move in the variation itself (because it is at the same depth as the last move played). The Forward button, takes you forward one move in the game. It is important to remember that this button will look for the next move at the same depth as the current move unless the Step button is toggled on. Using the above game as an example, and assuming the Step is off, if you were currently on the move 16... Kg7 and you clicked the Forward button, you would end up on the move 17. Rxe6! since this move is at the same depth. (i.e. the variation between the moves is skipped.) On the other hand, if the Step is toggled on, then you tried to go Forward from 16... Kg7, you wouldn't skip any move at all and would end up playing the first move of the variation, namely 16... Nf4. The Forward5 button, takes you five moves forward in the game. But just like the Back5 button, it will not step into any variations. In other words, the game will be stopped at either five moves forward or at the start of a variation sequence. The End button, takes you to the end of the game. Note that this is the actual end of the game -- the last move actually played. If you look at the example game above you will see that there are a couple of variation moves that follow after the last move. These extra moves can be played by using the Forward button or clicking on the moves themselves if movelinks has been enabled. The Flip button, flips the board so that the black pieces will appear at the bottom of the screen, rather than the top, and vice versa each time the button is clicked. The Autoplay button, toggles the automatic playback of the game. the actual time between moves, to control the speed of playback, is set with the autotime option. The Step button, toggles stepping into variations with the Forward button. When stepping into variations is enabled, the button becomes dark and the Forward button will play each and every move, one after the other, irregardless of whether or not they are a variation move or not. When off, the forward button will skip over variations. By default the control panel images will be expected to reside in the same folder as your piece sets, namely the folder set by the imgurl option. But you can choose to place your control panels in their own specific folder using the conpanurl option. ### The Game Infobox The next part of the Palview page to look at is the infobox. Here is an example All of the relevant information displayed in the infobox is provided in the Tag section of each PGN game. You can decide not to display any of this information at all by setting the option pgnheader = off. By default, Palview will always display the Tag information, but you can determine how it will be displayed using the gameinfomode option. By setting gameinfomode = 0, you get a very simple display of the Tag information like the following: To get the actual infobox above, you would set gameinfomode = 1. The actual appearance of the infobox is largely determined by the CSS classes in the stylesheet. (For more information about this, see the section Palview and CSS) At the top of the infobox you will notice the Opening classification information. These values are normally provided by the PGN Tags: Opening, Variation, Subvariation, and ECO. But you can also use the Palview eco file to classify your games and provide these values. You will need to set the pathname of the eco file that you wish to use for this purpose using the ecofilename option. You will probably also want to use the new tooltipopening option to have the Variation and Subvariation names provided as a tooltip to the Opening name itself. This reduces the amount of wasted space in the infobox while still providing the Variation and Subvariation names. (For more information on how Palview classifies games by openings, see the section, The p3eco Program and Opening Names.) How the names of the players is displayed is largely determined by the CSS classes in the stylesheet. But you can decide whether to display a name as Robert J. Fischer or R Fischer, etc. using the namepattern option. With Palview you can display a player's country using flags. In order to do this, you must set the option flags = on and tell the program where the flags are located using flagurl. The program will also need to know what each player's country actually is. Palview recognizes two new PGN Tags, WhiteCountry and BlackCountry for this purpose. (Please see the section, New PGN Tags. for more information.) ### The Game Moves The moves of the game are written into an Html DIV (division) which allows us to selectively control their appearance using CSS classes within the stylesheet. (For more details see the section Palview and CSS) Sometimes a game will begin with a comment rather than a move. Palview treats any comments before the first move of the game as an intro comment and allows you to specify a special style to them in the stylesheet. You may find that certain chess software may write some unwanted into comments to the PGN files that you export. In this case, you can use the introcom option to have Palview ignore these comments when writing the Html so that they won't be written. But generally speaking you will probably want to use these special intro comments to provide an introduction to your games. The actual moves of the game themselves can be linked to the chess board using the movelinks option so that when you click on a move in the game the board will be set to that position. For languages other than English, Palview allows you to specify the letters to use for the various pieces. For this you would use the pcletters option. Another feature can be used to allow your page visitors to dynamically choose the language. This feature, multilang is only supported by Internet Explorer (so far) and should really be used only for displaying blank games (games without commentary) and should never be used in Live Game Broadcasts. The chess moves can also be displayed using figurines from the Alpine family of chess fonts by Steve Smith. (For more information on this topic see the section Palview and Figurines.) Finally, the moves themselves can be highlighted as they are played if your visitor is using Internet Explorer 4,5 or Netscape 6. You can see in the above game that the last move played, 17. Rxe6!, is highlighted in the game section. You can set the background color to use for this highlighting with the option hilightcolor. In the above game you will notice that all the moves and the commentary are formatted as one big paragraph. This allows us to save some valuable screen space. But you can have Palview insert linebreaks into the game just as you would normally expect to see in a chess book. (This can be useful when using the frames, iframe or muliframe pages where screen space is no longer important since the game itself is scrollable.) Palview comes with a complete set of chess symbols in compressed GIF format. The program understands the common symbols used by ChessBase and can replace any symbols with the appropriate GIF image. But you can also choose to have Palview use common text-based short hands for the symbols in order to save a bit of download time. An example of a symbol short hand is the use of +/- for the chess symbol ±. You select how Palview will display chess symbols by using the symbolmethod option. If you choose to use the GIF chess symbols, you will need to specify what folder they are kept in on the server using the symurl option. One of the nice features of using the GIF chess symbols is the ability to have the program tooltip each symbol with its meaning. To do this you use the new option symtips. ### The Numeric Keypad The numeric keypad can sometimes be an unseen part of a palview page. If you set the option usekeystrokes = on, visitors to your page will be able to use several keys to navigate through a game. ### The Html Page Itself There are a number of INI options that affect the overall page itself. The most important of these is the htmltype option that is used to select the type of page you want Palview to generate. The rest of this particular section is devoted to describing each of these different page types. There are a number of features that you can choose to use on your page, and a number of CSS styles, that the Netscape 4 browser does not handle very well. The program allows you to generate pages that are as compatible as possible with Netscape 4 using the ns4comp option. You will end up with pages that do not look as nice as they can be, but that is the price you have to pay to continue to support the old browser. While the ns4comp option allows you to generate pages that Netscape 4 can cope best with, there are two page types that this older browser simply cannot display at all because they use the Html IFRAME element. For these pages, iframe and muliframe, you can choose to have your visitors redirected to another page whenever the page detects that it is being loaded by the Netscape 4 browser. To do this, you would use the ns4redirect option. The JavaScript code that is used to move the pieces on the board, among other things, can be written as a separate JS file and linked to the Html by using the jsfile option. This can be useful if you are going to edit the Html page later on with FrontPage2000 or some other Html editor since it effectively removes most of the JavaScript from view so that you can concentrate on the Html itself. But it is sometimes critical that you make sure that Palview writes a single Html file that contains the JavaScript code rather than writing a separate JS file. One example of this is Live Game Broadcasts where a single file is absolutely essential. (See Palview and Live Game Broadcasts). Even if you choose to have the script written into the Html file, you can further decide whether you want this script written into the HEAD or the BODY section of the Html. You use the scriptloc option for this. The program continues to support Server Side Includes with the ssi option. The Title of your page can now be determined by the use of the new titletype and titletext options. The games you want Palview to generate Html files from must be in a PGN file. You can share this PGN file with your visitors by using the options pgnlink and pgnurl. These options are used to provide a link to your PGN file at the bottom of the page that Palview creates. It is up to you, the webmaster, to make sure that you upload the PGN file to the server along with the Html page itself. Two Palview options can be quite powerful and flexible when used under the right circumstances. These options, headerfile and footerfile, allow you to insert Html code into each page that Palview generates. this html code is kept in separate text files and is read and written into the Html file by the program. The headerfile contents is written directly after the <BODY> tag, while the footerfile contents is written directly before the closing </BODY> tag. Finally, one other method for changing the appearance of the overall page is through the stylesheet. Here you can apply a background color or image to the page. (Please see the section Palview and CSS for more information on this topic.)

## The Normal Page We have already seen what a normal page looks like above. Essentially the normal page produces a single Html file that contains a table for each game. You can choose to have the outer table border suppressed, or you can allow the moves of the game to wrap around the chess board by using the displaymode option. The width of the table can be set using the tablewidth option. The padding of the table can also be set. This page type is ideal for games that do not contain any commentary at all, or are very lightly commented. Long games, such as those heavily commented, will cause the board itself to scroll off the screen when you are trying to look at moves near the start or end of the game. For such games we recommend the frames page.

## The Frames Page The frames option produces three Html files: One named after the PGN file that is used to set up the frames themselves, and then two other Html files, one for the board (the left frame) and another for the game(s) (the right frame). These frames are respectively named after the PGN file but with a 'b' or 'g' appended to the name for the board and game frame. The chess board is placed in the left frame and under the control panel is a drop down selection box. This selection box is used to select which of the games to play through. The actual game information in this selection box can be altered using the options dbnamepattern and dbtags. The games themselves are placed in the right frame. This page type is ideal for well annotated games since the games can be scrolled independently of the board. This means that the board itself will always be in view. Frames have also been around for some time, so just about every browser out there can understand and display such a page.

## The Iframe Page The iframe option uses a single board to play out the moves of all the games and the games are placed in an Html file of their own that is loaded into an IFRAME. This particular page type cannot be viewed by Netscape 4.x so you may want to use the ns4redirect option to send your visitors using this browser to another page. The new Netscape 6 browser and IE4+ can all view this Palview page type without any problem. The width of the IFRAME itself is set with the iframewidth option. We recommend that you set the iframewidth as if all of your visitors are using a screen resolution of 800x600. Try to use most of that width and then let the browser 'center' the entire table. This way your page will look good even on a higher resolution screen. Very few of your visitors will be using a screen resolution less than 800. For these few visitors they will see a horizontal scrollbar at the bottom of the page so that they can scroll the screen left and right. When calculating the iframewidth, please keep in mind that the chess board's <TD> cell is given a width of 10 × pcsize. So if you are using the standard 29px set, this cell's width will be 290. This will leave you about 800 - 290 = 510 left to play with (or approximately 500). You should always try your page in the browser before uploading it to your server, just to make sure that you are happy with it. I personally like this new page type more than the frames option. With this page you are still working with a single document that completely fills the screen. This means that you can have a banner that runs completely across the top of your page. You cannot do that with a frames set up.

## The Static Page The static option produces a single Html file. This file does not allow replayable moves and does not produce any JavaScript code. One nice feature of this page type is the ability to mark places in the game where you would like Palview to generate a diagram of the current position. You can do this by adding a comment after the move that begins with the '#' character, as in:
    1. d4 d5 2. Nf3 Nf6 3. e3 c6 4. c4 e6
    5. Nc3 Nbd7 6. Bd3 Bd6 7. O-O O-O
    8. e4 dxe4 9. Nxe4 Nxe4 10. Bxe4 Nf6
    11. Bc2
    {#[Position after 11. Bc2]}
Notice that you can also provide a board caption by enclosing the caption text in the square brackets immediately after the '#' marker. The '#' character can also be created using ChessBase's Diagram Marker command and then exporting the game to PGN. It is up to you, the webmaster, to use the static game Html file to best fit the needs of your own particular situation. Palview does not attempt to place the game in any kind of Html TABLE or to place any other form of structure upon the file as a whole. You can add that kind of structure yourself to the existing file, or you can copy / paste the contents of the page into another page of your own creation.

## The Database Page The database option produces a single board with a drop down SELECT that allows you to choose which game you would like to play out. The actual game information in this selection box can be altered using the options dbnamepattern and dbtags. In this mode none of the game moves will be seen -- they can only be replayed using the controlpanel or the numeric keys if usekeystrokes has been activated. This page type was created as a way of placing the games form the latest round of some tournament into a small frame that any site could place on their front page. Here is an example:

## The Muliframe Page The muliframe is short for Multiple Iframe. This page type is just like the iframe page except that each and every game is placed into its own IFRAME rather than all the games sharing a single one. Again, Netscape 4.x does not understand IFRAMEs, but NS6.0 and IE4+ does. For more information please see the iframe page above.

## The Batch Page The batch page type is really a special case of the normal page. The difference is that each game in the PGN file is written to its own separate Html file. This is advantageous for a number of uses, and it also allows for the creation of crosstables. For more information on using the batch page type and creating crosstables, see the section Crosstables and Tournament Coverage.

## The Overview Page The overview and overdb page types were specially created for Live game broadcasts. Essentially, they show the last known position of all the games in the Live event. These positions can be linked to the actual games themselves so that visitors can click on the game that most interests them and they will be taken to a page dedicated to that particular game. Here, they will be able to replay the moves of that game, Kibitz, if movingpcs has been enabled, and perhaps follow the live commentary if the game is being annotated by a Master. The actual positions from each of the games are placed inside an Html TABLE. The number of positions across the TABLE can be controlled using the overviewcols option. Here is an example of what an Overview page might look like: For more information on using the overview page, please see the section Palview and Live Game Broadcasts.

## The Overdb Page The overview and overdb page types were specially created for Live game broadcasts. Essentially, they show the last known position of all the games in the Live event. These positions can be linked to the actual games themselves so that visitors can click on the game that most interests them and they will be taken to a page dedicated to that particular game. Here, they will be able to replay the moves of that game, Kibitz, if movingpcs has been enabled, and perhaps follow the live commentary if the game is being annotated by a Master. In the overdb page, all the Live games are placed in a database-like page where a single board is used to replay the games and the games are chosen from a selection box under the board. For more information on using the overview page, please see the section Palview and Live Game Broadcasts.

## The Problem Page The problem page is ideal for presenting composed chess problems to your site's visitors. With this page, a set of chess problems are presented in a table of diagrams, much as they would appear in a chess magazine or book. The solution to each problem is hidden below each diagram. Visitors to your page guess the solution to each problem by clicking on a piece to move and then clicking on a square to move it to. By default, visitors have three guesses to find the solution move. After this the solution is simply revealed below the board. For more information on using the problem page, please see the section The Palview Problem Page.

## The Tactics Page The tactics page is ideal for presenting tactical exercises to your site's visitors. With this page, a set of tactical positions are presented, each in a table that contains a diagram on the left and the solution moves on the right, very much like the normal page. The solution to the exercise is hidden below the infobox on the right of the board. Visitors to your page guess the solution to each exercise by clicking on a piece to move and then clicking on a square to move it to. By default, visitors have three guesses to find the solution. After this the solution is simply revealed. While both the problem and tactics page are very similar, the tactics page is preferable for tactical exercises because of the extra space that is available for the solution. For many such exercises, you may wish to include a number of variations in the solution to point out how certain defensive moves are defeated. For more information on using the tactics page, please see the section The Palview Tactics Page.

## The Magazine Page The magazine page is probably the most exciting new feature of Palview. With previous versions of Palview, you passed a PGN file to the program and it would produce an Html file, usually with replayable games. As the webmaster, you then had to edit this Html file to add whatever content you required to dress up the page for your site. With the new magazine page, this creation process is reversed. With the magazine, you create an Html file first and then pass this on to Palview along with your PGN file. You provide instructions to Palview within your Html file on what you want the program to insert into the Html. These instructions are placed within Html comments that Palview reads and acts upon. This is really quite simple. For example, to insert a game into your magazine page, you can use the Palview command:
    <!-- palview game 5 -->
For all the games from an event, you can use:
    <!-- palview event "Candidates Match" -->
For a crosstable (linked to the games), you can use:
    <!-- palview cross "Candidates Match" -->
You can also get Palview to insert diagrams directly into the magazine that use the Palview piece images:
    <!-- palview diagram r3k2r/pp1n1pp1/2p1p2p/3q3n/3P4/5N2/PPPBQPP1/1K1R3R:
    Karpov - Seirawan<BR>White to play 17. ? -->
An index of the games in the magazine can be generated by Palview and inserted into the magazine with:
    <!-- palview gameindex -->
    <BR>
    <!-- palview openindex -->
The new magazine is fully integrated with the new Magazine Game Viewer so that all the replayable games share and reuse the same game viewer page created separately for the magazine. All the replayable games inserted into the magazine are inserted as links to the game viewer. Games can be linked from a list or from crosstables, overviews, as well as indices. For more information on using the new magazine page, please see the section The Magazine Page.

## The Magviewer Page The magviewer page is used to create the Magazine Game Viewer that your magazine page uses to display and replay the games that you inserted. This magviewer page is an Html file that is reused by the magazine. The magviewer is very similar to the iframe page. You absolutely must create a magviewer page to be used by any magazine page that you create, otherwise none of the inserted games will be replayable. For more information on using the magviewer page, please see the section Magazine Game Viewer.