Using GDL Publisher
Using GDL Publisher is a simple process. In most cases there is no need for any special preparation to publish GDL objects. Still, there can be a variety of reasons to perform additional tasks that will assure optimum operation of the published library:
- You may wish to prevent unauthorized usage of some or all of the objects. In this case, you need to encrypt them.
- The publication of objects calling other objects, as macros, requires the insertion of a list file: "gdllist.txt". This file can be edited manually, but it is more convenient to have the GDL Publisher generate it automatically.
- When one does not need sophisticated HTML pages would welcome an easy way to generate simple and effective pages automatically.
- Having files and folders with names containing characters others than those of the English alphabet, or special characters, such as a slash(/), may cause problems when publishing them on different web servers. File names over 32 characters long and having the file extension (e.g. gsm) missing from files created on the Macintosh are another source of problems. An automatic renaming tool would be helpful in effectively managing such issues.
Go to the section 'Authoring Template Files'.
- Folders
GDL Publisher displays the folder group in the top left corner of the user interface. In the fields in the dialog box, below, you can define the locations of the from and to folders.
- From:
GDL Publisher will process this and its sub-folders recursively. The original objects will be modified or overwritten, if the same location is specified in the From and To fields. In the text fields you can define the folder locations in relative or in absolute style.
Note: If the folder path has spaces in its name, enclose it in quotation marks.
- To:
This is the folder where the prepared and generated files are copied. GDL Publisher will place the renamed copies of the original files and the generated files here according to the options selected. The folder structure is preserved.
Note: Folder paths having spaces in their name, must be enclosed in quotation marks. Any existing folders and files will be overwritten.
- Template Files
Using template files an HTML environment can be created for any GDL library. When the location of custom template files are not set, Publisher generates its output using the built in templates. HTML file are not generated when the checkbox is unchecked.
- HTML:
The "index.html" file is the template file of the folders in the library. The output of the publishing process will generates index.html files to each folder in the library. These index files will contain previews of GDL objects in the folder. The look & feel of the page associated with the folders in your library is determined by this template.
- Contents:
The contents file will show the tree structure of the library. The content template file specifies the format which way the "contents.html" file is generated. If one wants to use its own content template file enter its location here.
- Foreach:
A web page will be generated for each object in the library based on this template file. To control the appearance of the HTML pages generated for all the objects, a template file can be specified for these pages.
- "Click here to export built-in templates":
Clicking this button saves the built-in template files onto the hard disk.
- Format - Page Layout
- Rows and Columns:
The number of preview pictures can be set for a row and a column on "index.html" pages. Default values are 3 rows and 3 columns.
- Options
These settings control file protection, compression, preview and frame file generation and info file creation.
- Encrypt:
This encrypts all the objects in the folders to prevent unauthorized use.use.
Note: Encrypted objects will not be recognized by other programs, except the GDL Web Control. There is no method to decrypt encrypted files. Original files will remain untouched.
- Compress:
This compresses the objects in the folders to shorten download time.
Note: Compressed files are not useable by other programs, therefore GDL Publisher creates an uncompressed folder, where the original files are copied. During drag & drop and save operations Web Control will download these uncompressed files onto the hard disk.
- Preview:
This creates separate preview GIF files along with published library parts. HTML files for thumbnails or previews can be created using these images, which can be displayed without Web Control.
- Frames:
This exports the built-in frames.html file with its corresponding pictures.
- Renaming
Only webconform characters can be used in order to successfully publish any library. Using non-webconform characters will trigger GDL Publisher to rename objects or libraries to webconform-compliant ones.
- Automatic:
- Manual:
Publisher will offer a correct name, which can be accepted or changed. Changing the name triggers GDL publisher to check the name entered again.
- Library Language
GDL Publisher has the ability to use library languages. See 'Writing template files' for more information. Use this feature to display object names correctly.
- Status Window
The publishing process is traced in this window. All information, including error and warning messages relevant to the publication process is displayed here.
- Tips
- Test any library in GDL Explorer before publishing. If objects appear satisfactory and there are no error messages when you browse objects, it means that the library can be published.
- If any error messages are displayed, check the Master.gdl file first. It must be in the root folder of the library and must contain all the default attributes.
- Authoring Template Files
Template files give maximum flexibility to the visual appearance of the published library. Three types of templates are used during publishing:
- Template Authoring Reference
- Sections
All template files contain sections, placed between special tags. A section can be anywhere in the template file, but one section cannot contain another section, and every section must have an opening and closing tag. If a section is missing from the template, Publisher will consider it empty.
An example header section:
The table below specifies the usage of tags:
| Tag |
Use |
| TEMPLATE_HEADER, TEMPLATE_FOOTER |
These sections can be used in all the three kinds of template files. Publisher will start with TEMPLATE_HEADER and will place TEMPLATE_FOOTER at the end of the file being published. |
| Index template section |
|
| INDEX_START |
This one will follow the TEMPLATE_HEADER section in each index page. This section has to be closed with the INDEX_END tag. |
| INDEX_END |
Prior to the TEMPLATE_FOOTER will be placed the INDEX_END section, containing the links to the next/previous index pages. |
| PREV_PAGE |
This section contains the template for the link to the previous index page. If this is the first index page, Publisher will use it as if it was empty. |
| NEXT_PAGE |
This section contains the template for the link to the next index page. If this is the last index page, Publisher will use it as if it was empty. |
| TABLE_HEADER |
The table of objects in the generated index page will start with this section... |
| TABLE_FOOTER |
...and will finish with this one. |
| TABLE_ROW_START |
Every row in the table will start with this section... |
| TABLE_ROW_END |
...and will finish with this one. |
| TABLE_ELEM |
This one can contain a cell with a preview image, object name and/or link to the object itself. |
| Contents template section |
|
| FOLDER_BEGIN |
When Publisher starts enumerating a subfolder,which contains library parts, it will put this section into the contents file. |
| FOLDER_END |
When the enumeration of the subfolder is finished, the program will place this section into the contents file. |
| FILE |
When the enumeration process finds an object in the library, this section will be placed into the contents file. |
| Foreach template section |
|
| FOREACH |
This template can contain only this special section. It can contain the template for individual objects. |
- Variables
Each section can contain specified variables. Before Publisher writes out a section it looks for known variables and replaces them with the value of the variables. This mechanism is the base of the publishing process. A variable name must be enclosed with a '$(' and a ')': $(VARIABLE_NAME)
If the stylesheet file has to be included in the index HTML file, an instance of the CSS file has to be placed into the root of the target folder. To make the HTML page use the style place this line in the section: Because Publisher changes the variable $(OFFSETTOROOT) to the offset path to the root, the HREF will point to the CSS file in the root.
The table below specifies the usage of each variables:
| Variable |
Use |
| $(OFFSETTOROOT) |
This variable will be changed to the relative offset path to the root. |
| $(CHARSET) |
This will be changed to the actual character code according to the Library language settings on Publisher's user interface. The table below shows the exact matches.
| Library language |
Generated charset |
| Japanese |
csShiftJIS |
| East European |
Windows-1250 |
| Greek |
Windows-1253 |
| Russian (Cyrillic) |
Windows-1251 |
| In any other case |
Windows-1252 |
|
| $(ID) |
Publisher generates unique id strings for each object and each folder in the library to uniquely identify an object or folder in HTML or JavaScript code. (See an example usage of this in the built-in contents template.) |
| $(NAME) |
Will be replaced with the real (sometimes unicode) name of the library part. |
| $(URL) |
This will be replaced with a link. The link will depend on the section where the variable is used. |
| $(PREVPAGE) |
This will be replaced with a generated HTML code, based on the PREV_PAGE section template. |
| $(NEXTPAGE) |
This will be replaced with a generated HTML code, based on the NEXT_PAGE section template. |
| $(PREVIEWURL) |
This will be replaced with a link to the preview image. |
| $(LEVEL) |
This will be replaced with the directory depth of the actual subfolder. |
The table below specifies which variable can be used in which section.
| Section |
Variables |
| TEMPLATE_HEADER, TEMPLATE_FOOTER |
$(CHARSET) $(OFFSETTOROOT) |
| INDEX_START |
$(NAME): Subfolder name related to the index file. |
| INDEX_END |
$(PREVPAGE) $(NEXTPAGE) |
| PREV_PAGE |
$(URL): link to the previous index page. |
| NEXT_PAGE |
$(URL): link to the next index page. |
| TABLE_HEADER |
|
| TABLE_FOOTER |
|
| TABLE_ROW_START |
|
| TABLE_ROW_END |
|
| TABLE_ELEM |
$(ID): unique id of the object file. $(NAME): name of the object file. $(URL): link to the generated foreach html of the object file. $(PREVIEWURL): link to the preview image exported from the library part by the publisher. |
| FOLDER_BEGIN |
$(ID): unique id of the folder. $(NAME): name of the folder. $(URL): link to the folder's index page. |
| FOLDER_END |
$(ID): unique id of the folder. $(NAME): name of the folder. $(URL): link to the folder's index page. |
| FILE |
$(ID): unique id of the object file. $(NAME): name of the object file. $(URL): link to the generated foreach html of the object file. |
| FOREACH |
$(ID): unique id of the object file. $(NAME): name of the object file. $(URL): link to the object file. $(OFFSETTOROOT) |