creator greenstone@cs.waikato.ac.nz maintainer greenstone@cs.waikato.ac.nz public true buildtype mgpp infodbtype gdbm indexes text dls.Title,ex.Title dls.Subject dls.Organization dls.Keyword levels section document plugin GreenstoneXMLPlugin plugin HTMLPlugin -description_tags plugin MetadataXMLPlugin plugin ArchivesInfPlugin plugin DirectoryPlugin classify List -metadata dls.Title -partition_type_within_level constant_size classify Hierarchy -metadata dls.Subject -sort dls.Title classify List -sort_leaf_nodes_using dls.Title -metadata dls.Organization -bookshelf_type always -partition_type_within_level constant_size classify List -metadata dls.Keyword -partition_type_within_level constant_size -buttonname Howto format CL4VList "[link][icon][/link][link][dls.Keyword][/link]" format SearchVList "[link][/link]{If}{[parent(All\': \'):Title],[parent(All\': \'):Title]:}[link][Title][/link]" format VList "[link][icon][/link][highlight]{Or}{[Title],Untitled}[/highlight]{If}{[Date],
_textdate_[Date]}{If}{[NumPages],
_textnumpages_[NumPages]}{If}{[Source],
_textsource_[dmsafe:Source]}" format DocumentText "

[Title]

\\n\\n

[Text]

" format DocumentImages true format DocumentButtons "Expand Text|Expand Contents|Highlight|Detach|Print" format DocumentSearchResultLinks true format HList "[link][highlight][Title][/highlight][/link]" format DocumentHeading "{Or}{[parent(Top):Title],[Title],untitled}
" format SearchTypes "plain,form" # strings that use macros # these don't need translating unless you want something different from the # default collectionmeta .text [l=en] "_labeltext_" collectionmeta .dls.Title,Title [l=en] "_labelTitle_" collectionmeta .dls.Subject [l=en] "_labelSubject_" collectionmeta .dls.Organization [l=en] "_labelOrganization_" collectionmeta .dls.Keyword [l=en] "_labelHowto_" collectionmeta .document [l=en] "_textbook_" collectionmeta .section [l=en] "_textchapter_" # -- English strings ---------------- collectionmeta collectionname [l=en] "Garish version of demo collection" collectionmeta depositormetadata [l=en] "{\"name\":\"dls.Title\",\"label\":\"Title\",\"tooltip\":\"dls.Title: The title of this resource.\",\"type\":\"text\"}, {\"name\":\"dls.Organization\",\"label\":\"Organization\",\"tooltip\":\"dls.Organization: The organization responsible for producing this resource.\",\"type\":\"text\"}, {\"name\":\"dls.Subject\",\"label\":\"Subject\",\"tooltip\":\"dls.Subject: The subject of this resource.\",\"type\":\"text\"}, {\"name\":\"dls.Keyword\",\"label\":\"Keyword\",\"tooltip\":\"dls.Keyword: A more specific indication of what the resource can be used for.\",\"type\":\"text\"}, {\"name\":\"dls.Language\",\"label\":\"Language\",\"tooltip\":\"dls.Language: The language of this resource.\",\"type\":\"text\"}" # -- French strings ---------------- collectionmeta collectionname [l=fr] "Version Garish de la collection de démonstration" # -- Spanish strings ---------------- collectionmeta collectionname [l=es] "Versión colorida de la colección de muestra" # -- Russian strings ---------------- collectionmeta collectionname [l=ru] "Резкая версия демонстрацион-ной коллекции" # -- Simplified Chinese strings ---------------- collectionmeta collectionname [l=zh] "Garish版本的演示馆藏" # -- English text ---------------- collectionmeta collectionextra [l=en] "This demonstration collection contains the same material as the original Greenstone demo collection, but its appearance has been altered to look garish.\n

How the collection works

\n

The appearance of Greenstone collections is defined by \"macro files\" in the greenstone/macros directory, and can be completely altered by changing the contents of these files. Editing them will change the appearance of all collections. To change the appearance of just one collection, place appropriately modified macros in a file called extra.dm in the collection\'s macros directory. For example, this collection uses the file greenstone/collect/_cgiargc_/macros/extra.dm. \n

To separate presentation details from the macro files, Greenstone uses Cascading Style Sheets (see http://www.w3.org/Style/CSS/ for more information), which allow you to specify fonts, colours, spacings, and other elements for HTML pages. The standard Greenstone stylesheet is located in greenstone/web/style/style.css. This collection specifies an auxiliary stylesheet, greenstone/collect/_cgiargc_/style/style.css, to be used in addition to the default ones. It includes some comments for those unfamiliar with cascading style sheets. Some of the macros in extra.dm reference images that have been placed in greenstone/collect/_cgiargc_/images.\n

The extra.dm macro file overrides some of the macros that Greenstone uses by default. In macro files, the \"\#\" character signals a comment line (extra.dm is commented to help explain what it does). Macros themselves are signalled by underscores, and they can reference other macros. This means that the content of a page can be split into many small chunks, and it can be difficult to work through the chain of which macro calls what. Fortunately, changes in macros (like changes in format strings) take effect immediately unless you are using the Greenstone local library server, in which case the server needs to be restarted. This makes it easy to experiment by editing the macro files.\n

Macros are grouped into \"packages\". But each package does not necessarily reside in a single file. The Global package, most of which is in file base.dm (parts of it are also in the language-specific macro files such as english.dm and french.dm), contains default macros that can be overridden by macros in other packages. Here is the part of extra.dm that redefines global macros.

##########################################################################\n
package Global\n
##########################################################################\n
\n
_starthighlight_ {<b>}\n
_endhighlight_ {</b>}\n
\n
_navbarspacer_ { \n
<br/>\n
<img src=\"_httpcimages_/horzline.gif\" width=\"87\" height=\"17\">\n
<br/>\n
}\n
\n The values of starthighlight and endhighlight are used to highlight query terms when displaying a document. The default is to set the background to yellow. The first specification above places query terms in bold instead.\n

Next, the navbarspacer macro is what separates the search button and classifier buttons in the navigation bar. It is normally Greenstone\'s familiar horizontal green bar. The following definition has the effect of stacking the buttons vertically, one above the other.

_navbarspacer_ {<br\/>}
\n The definition of navbarspacer given earlier uses the image horzline.gif as a separator (this image appears in the images directory of the collection). The effect can be seen at the top of this page.\n

To arrange the buttons horizontally, still using horzline.gif instead of the green bar as separator, remove the br tags and define the body of the macro (the part in curly brackets) to be:

<img src=\"_httpcimages_\/horzline.gif\"\n
width=\"_widthtspace_\" height=\"17\">
\n The widthtspace variable gives the width of the gap between the buttons, which Greenstone calculates.\n

The part of extra.dm reproduced below redefines macros in the Style package, which is responsible for creating the header and footer of every page, and defining common style information:

##########################################################################\n
package Style\n
##########################################################################\n
\n

_collectionspecificstyle_ {\n
<link rel=\"stylesheet\" href=\"_httpcstyle_/style.css\" type=\"text/css\" \n
title=\"Greenstone Style\" charset=\"UTF-8\">\n
<style>\n
body.bgimage \\\{ background-image: none; \\\}\n
a.navlink:hover \\\{ background-image: url(\"_httpcimages_/bg_blue.gif\"); \\\}\n
</style>\n
}\n
\n
_pagebanner_ {\n
<div class=\"pageinfo\"> \n
<p class=\"bannerlinks\">_homelink_</p>\n
</div>\n
}\n
\n Greenstone\'s page header macro, which is called header in style.dm, prints the collection\'s name or logo, and links to the home, help, and preferences pages. It calls the macro htmlhead which outputs the beginning of an HTML file. This calls the macro cssheader which outputs style information for the page. This macro includes the collectionspecificstyle macro which allows a collection to add some style elements to the default.

To use an entirely new style for the collection, specify the cssheader macro in extra.dm. To just add just a few style declarations to the default style, specify collectionspecificstyle in extra.dm. That is what this collection has done. The above collectionspecificstyle macro includes the collection\'s own stylesheet, and also overrides a couple of the image declarations, getting rid of the green swirly bar background, and changing the hover background for navigation bar buttons to blue.

The page header macro also calls pagebanner to include the collection\'s logo, home/help/preferences buttons, and the image at the top left that identifies the page (about page, search page, etc). The code above redefines the banner to suppress all these images except for the home page button -- as you can see, they don\'t appear at the top of this page.\n

The next part of extra.dm redefines macros in the about package (contained in about.dm), which generates the \"About this collection\" page that you are looking at now:

##########################################################################\n
package about\n
##########################################################################\n
\n
_content_ {\n
_navigationbar_\n
\n
_textabout_\n
\n
<h3>_help:textsimplehelpheading_</h3>\n
_help:simplehelp_\n
}
\n The macro content for the About page normally contains the navigation bar (with links to Search and any classifiers), followed by \"About this collection\" and \"how to find information\" text. Because it changes from one collection to another, the navigationbar macro is defined internally by Greenstone, and uses the navbarspacer macro discussed above. The content macro for the About page, given above, differs from the regular one (such as the one for the demo collection here) in that the navigation bar is not centered, and there is no search box.\n

The next part of extra.dm redefines macros in the query package (in query.dm), which is used to generate the search page:

##############################################################################\n
package query\n
##############################################################################\n

_content_ {\n
_navigationbar_\n
\n
<center>\n
_If_(_cgiargct_,_selectqueryform_,_queryform_)\n
</center>\n
_If_(_searchhistorylist_,<center>_iconsearchhistorybar_</center><br>\n
<center>\n
_searchhistorylist_\n
</center>)\n
_If_(_cgiargq_,<small>_freqmsg_ _textpostprocess_</small><br>_resultline_,)\n
<br>\n
}\n
\n The definition of content in the standard query package is similar to the version given above, except that it centers the navigationbar macro, whereas the above version does not, and it includes an additional green bar. Compare this and this.\n

The file extra.dm also redefines macros in the document package, which is used to display documents (see document.dm). In fact, pages generated by classifiers (e.g. lists of titles) are also governed by these macros.

##########################################################################\n
package document\n
##########################################################################\n
\n
_textheader_ {\n
_cgihead_\n
_htmlhead_(class=\"bgimage\")_startspacer__pagebanner_ \n
}\n
\n
_content_ {\n
_navigationbar_\n
\n
_If_(_phindclassifier__collageclassifier_,\n
<p style=\"text-align: center;\">\n
_phindclassifier_\n
_collageclassifier_\n
</p>\n
)\n
\n
_If_(\"_cgiargcl_\" eq \"search\",\n
<ul id=\"searchresults\">\n
_prevsearchresult_\n
_nextsearchresult_\n
</ul>)\n
\n
<div class=\"document\">\n
}\n
\n Greenstone overrides the header macro if a document (and not a classifier) is being displayed. Suppose we don\'t want it to. The code above redefines the textheader macro (normally defined in document.dm) to be the content of the original header macro. The definition of content above overrides the default so that the navigation bar is not centered. " # -- French text ---------------- collectionmeta collectionextra [l=fr] " Cette collection de démonstration contient le même matériel que la collection de démontration originale de Greenstone, mais son apparence a été altéré pour avoir une allure criarde.

Comment la collection marche

L\'apparence des collections Greenstone est définie par des \"fichiers de macros\" dans le répertoire greenstone/macros et elle peut être complètement modifiée en changeant le contenu de ces fichiers. L\' édition de ceux-ci changera l\' apparence de toutes les collections.Pour changer l\' apparence d\' une seule collection, il faut placer correctement les macros modifiés dans un fichier appelé extra.dm dans le répertoirede la collection macros. Par exemple, cette collection utilise le fichier greenstone/collect/_cgiargc_/macros/extra.dm. \n

Pour séparer certains détails de présentation des fichiers de macros, Greenstone utilise Cascading Style Sheets(voir http://www.w3.org/Style/CSS/ pour plus d\' information), ce qui vous permet de spécifier la police, les couleurs, les espaces, et autres éléments pour les pages HTML. Le \'stylesheet\' de Greenstone standardisé est alloqué dans greenstone/web/style/style.css. Cette collection spécifie un \'stylesheet\' auxiliaire, greenstone/collect/_cgiargc_/style/style.css, à être utilisé à part ceux du défaut. Ceci inclus quelques commentaires qui ont été placés dans greenstone/collect/_cgiargc_/images.\n

Le fichier de macros extra.dm l\'emporte sur certaines des macros que Greenstone utilise par défaut. Dans des fichiers de macros, le caractère \"\#\" signale une ligne de commentaire(extra.dm est commenté pour expliquer ce qu\'il fait). Les macros elles-mêmes sont signalées par des caractères \"souligné\" (\"_\") et elles peuvent référencer d\'autres macros. Ceci signifie que le contenu d\'une page peut être éclaté en plusieurs petits morceaux et il peut être difficile de retrouver dans la chaîne et de savoir quelle macro appelle quoi. Heureusement, des modifications dans des macros (comme des modifications dans les chaînes de format) prennent effet immédiatement, à moins que vous n\'utilisiez le serveur de bibliothèque locale de Greenstone; dans ce cas, le serveur doit être redémarré. Ceci rend facile l\'expérimentation en éditant les fichiers de macros.

Les macros sont regroupées en \"paquetages\". Mais chaque paquetage ne réside pas forcément dans un fichier unique. Le paquetage Global, dont la majeure partie réside dans le fichier base.dm (d\'autres parties se trouvent aussi dans les fichiers de macros spécifiques aux langues, comme english.dm et french.dm), contient des macros par défaut qui peuvent être écrasées par des macros d\'autres paquetages. Voici la partie de extra.dm qui redéfinit des macros globales.

##########################################################################\n
package Global\n
##########################################################################\n
\n
_starthighlight_ {<b>}\n
_endhighlight_ {</b>}\n
\n
_navbarspacer_ { \n
<br/>\n
<img src=\"_httpcimages_/horzline.gif\" width=\"87\" height=\"17\">\n
<br/>\n
}\n
\n Les valeurs de starthighlight et endhighlight sont utilisées pour mettre en valeur des termes de requête au moment de l\'affichage d\'un document. Le défaut est de mettre l\'arrière-plan en jaune. La première des spécifications ci-dessus place les termes de requête en gras.

Ensuite, la macro navbarspacer est ce qui sépare le bouton de recherche des bouton de classificateurs dans la barre de navigation. C\'est normalement la horizontale verte familière de Greenstone. La définition suivante a l\' effet d\' entasser les boutons verticalement, un sur l\' autre.

_navbarspacer_ {<br\/> }
\n La définition de navbarspace donnée auparavant utilise l\' image horzline.gif comme un séparateur (cette image apparaît dans le répertoire images de la collection). L\' effet peut être visualisé dans la partie suppérieure de cette page. \n

Pour ranger les boutons horizontalement, utilisez toujours horzline.gif comme séparateur au lieu de la barre verte, supprimez les étiquettes br et définissez le corps de la macro (la partie entre parenthèses) comme ceci:

<img src=\"_httpcimages_\/horzline.gif\"\n
width=\"_widthtspace_\" height=\"17\">
\n La variable widthtspace donne la largeur de l\'espace entre les boutons que Greenstone calcule.

La partie de extra.dm reproduite ci-dessous redéfinit des macros dans le paquetage Style, qui est responsable de la création de l\'en-tête et du pied de chaque page, et définissant information de style commun:

##########################################################################\n
package Style\n
##########################################################################\n
\n

_collectionspecificstyle_ {\n
<link rel=\"stylesheet\" href=\"_httpcstyle_/style.css\" type=\"text/css\" \n
title=\"Greenstone Style\" charset=\"UTF-8\">\n
<style>\n
body.bgimage \\\{ background-image: none; \\\}\n
a.navlink:hover \\\{ background-image: url(\"_httpcimages_/bg_blue.gif\"); \\\}\n
</style>\n
}\n
\n
_pagebanner_ {\n
<div class=\"pageinfo\"> \n
<p class=\"bannerlinks\">_homelink_</p>\n
</div>\n
}\n
\n La macro de l\'en-tête de la page de Greenstone, appelée header dans style.dm, affiche le nom ou le logo de la collection, et crée un lien vers la page d\'accueil, l\'aide, et les pages des préférences. Elle appelle la macro htmlhead qui affiche le début d\'une page HTML. Ceci appelle le macro cssheader qui output le style d\' information pour cette page. Ce macro comprend le macro collectionspecificstyle qui permet la collection d\' additionner quelques éléments-style au défaut.

Pour utiliser entièrement un nouveau style pour la collection, spécifiez le macro cssheader dans extra.dm. Pour ajouter seulement quelques déclarations de style, spécifiez le collectionspecificstyle dans extra.dm. C\' est ceci ce que la collection a fait. Le macro ci-dessus collectionspecificstyle comprend la feuillestyle de la propre collection, et annule aussi quelques une des déclarations images, enlevant la barre verte curvée du fond d\' écran, et en changeant le fond hover pour les boutons de la barre de navigation en bleu. \n

La macro d\'entête de page appelle aussi pagebanner pour inclure le logo de la collection, des boutons /accueil/aide/préférences, et l\'image en haut à gauche qui identifie la page (page \"à propos\", page de recherche, etc). Le code ci-dessus redéfinit la bannière pour supprimer ces images à l\' exception du bouton de la page d\' entrée -- comme vous pouvez le voir, elles n\'apparaissent pas en haut de cette page. \n

La partie suivante de extra.dm redéfinit des macros dans la paquetage about (\"à propos\") (contenu dans about.dm), qui génère la page \"About this collection\" que vous voyez actuellement:

##########################################################################\n
package about\n
##########################################################################\n
\n
_content_ {\n
_navigationbar_\n
\n
_textabout_\n
\n
<h3>_help:textsimplehelpheading_</h3>\n
_help:simplehelp_\n
}
\n La macro content pour la page About (\"A propos\") contient normallement la barre de navigation (avec des liens vers Search et tous classificateurs), suivie du texte \"About this collection\" (\"A propos de cette collection\") et \"how to find information\" (\"comment trouver de l\'information\"). Parce qu\'elle change d\'une collection à l\'autre, la macro de la barre de navigation est définie en interne par Greenstone, et utilise la macro navbarspacer traitéé ci-dessus. La macro content (\"contenu\") pour la page About (\"A propos\"), donnée ci-dessus, diffère de la macro habituelle (comme celle pour la collection Demo ici) en ce sens que la barre de navigation n\'est pas centrée et qu\'il n\'y a pas de boîte de recherche.

La partie suivante de extra.dm redéfinit des macros dans le paquetage query (\"requête\") (dans query.dm), qui est utilisé pour générer la page de recherche:

##############################################################################\n
package query\n
##############################################################################\n

_content_ {\n
_navigationbar_\n
\n
<center>\n
_If_(_cgiargct_,_selectqueryform_,_queryform_)\n
</center>\n
_If_(_searchhistorylist_,<center>_iconsearchhistorybar_</center><br>\n
<center>\n
_searchhistorylist_\n
</center>)\n
_If_(_cgiargq_,<small>_freqmsg_ _textpostprocess_</small><br>_resultline_,)\n
<br>\n
}\n
\n La définition de content dans le paquetage de requête standard est similaire à la version donnée ci-dessus, excepté le fait qu\'elle centre la macro barre de navigation, alors que la version ci-dessu ne le fait pas, et qu\'elle inclut une barre verte supplémentaire. Comparez ceci à ceci.

Le fichier extra.dm redéfinit aussi des macros dans le paquetage document qui est utilisé pour afficher des documents (voir document.dm). En fait, les pages générées par des classificateurs (par xemple listes de titres) sont aussi contrôlées par ces macros.

##########################################################################\n
package document\n
##########################################################################\n
\n
_textheader_ {\n
_cgihead_\n
_htmlhead_(class=\"bgimage\")_startspacer__pagebanner_ \n
}\n
\n
_content_ {\n
_navigationbar_\n
\n
_If_(_phindclassifier__collageclassifier_,\n
<p style=\"text-align: center;\">\n
_phindclassifier_\n
_collageclassifier_\n
</p>\n
)\n
\n
_If_(\"_cgiargcl_\" eq \"search\",\n
<ul id=\"searchresults\">\n
_prevsearchresult_\n
_nextsearchresult_\n
</ul>)\n
\n
<div class=\"document\">\n
}\n
\n Greenstone neutralise le macro header si un document (et non un classificateur) est en-train d\' être visualisé. Supposons qu\' on ne veut pas ceci. Le code ci-dessus redéfinit le macro textheader (normalement définit dans document.dm,/i>) pour être le contenu du macro header originel. La définition de content ci-dessus neutralise le défault pour que la barre de navigation ne soit pas sentrée. " # -- Spanish text ---------------- collectionmeta collectionextra [l=es] " Esta colección de muestra contiene el mismo material que la colección de muestra Greenstone original, pero su apariencia ha sido modificada para hacerla más llamativa.

Cómo trabaja esta colección

La apariencia de las colecciones Greenstone se define por medio de los \"archivos de macros\" que se encuentran en el directorio de greenstone/macros y puede ser modificada completamente cambiando el contenido de estos archivos. Editando estos cambiará la apariencia de todas las colecciones. Para cambiar la apariencia de unicamente una colección, coloque apropiadamente las macros modificadas en un archivo llamado extra.dm en el directorio macros de la colección. Por ejemplo, este directorio utiliza un archivo llamado greenstone/collect/_cgiargc_/macros/extra.dm. \n

Para separar ciertos detalles de la presentación de los archivos de macros, Greenstone utiliza Cascading Style Sheets(ver http://www.w3.org/Style/CSS/ para mas información), que le permite especificar la fuente, los colores, espacios, y otros elementos para las páginas HTML. La hoja de estilos Greenstone estándar está guardada en greenstone/web/style/style.css. Esta colección especifica una hoja de estilo auxiliar, greenstone/collect/_cgiargc_/style/style.css, a ser usada en adición a la default. Esto incluye algunos comentarios para aquellos que no están familiarizados con hojas de estilo. Algunas de las macros en extra.dm refieren a imágenes que han sido colocadas en greenstone/collect/_cgiargc_/images.\n

El archivo extra.dm sustituye algunas de las macros que Greenstone utiliza por omisión. En los archivos de macros el carácter \"\#\" indica una línea de comentario (extra.dm incluye comentarios que explican lo que hace). Las macros se indican por medio de \"_\" y pueden hacer referencia a otras macros. Esto significa que el contenido de una página puede dividirse en muchas cadenas más pequeñas, ya que puede resultar difícil trabajar a través de la cadena a la cual la macro hace referencia. Afortunadamente los cambios en las macros (al igual que los cambios en las cadenas de formato) tienen efecto inmediatamente a menos que se esté usando el servidor local Greenstone, en cuyo caso el servidor necesita reiniciarse. Esto hace que sea fácil experimentar editando archivos de macros.

Las macros se agrupan en \"paquetes\". Pero cada paquete no reside necesariamente en un solo archivo. El paquete Global, cuya mayor parte se encuentra en el archivo base.dm (partes de él también están en los archivos de macros específicas de cada idioma como english.dm y french.dm) contiene macros por omisión que se pueden sustituir por macros de otros paquetes. Esta es la parte de extra.dm que redefine las macros globales:

##########################################################################\n
package Global\n
##########################################################################\n
\n
_starthighlight_ {<b>}\n
_endhighlight_ {</b>}\n
\n
_navbarspacer_ { \n
<br/>\n
<img src=\"_httpcimages_/horzline.gif\" width=\"87\" height=\"17\">\n
<br/>\n
}\n
\n

Los valores de starthighlight y endhighlight se utilizan para resaltar los términos de la consulta cuando aparece en pantalla un documento. El valor por omisión es poner el fondo en amarillo. En vez de eso la primera especificación que aparece arriba pone los términos de la consulta en negritas.

A continuación la macro navbarspacer es la que separa el botón de búsqueda y los botones de los clasificadores en la barra de navegación. Por lo general es la familiar barra verde horizontal de Greenstone. La siguiente definición tiene el efecto de amontonar los botones verticalmente, uno sobre el otro.

_navbarspacer_ {<br\/>} \n
\n

La definición de navbarspacer dada anteriormente usa la imagen horzline.gif como un separador (esta imagen aparece en el directorio de la colección images). El efecto puede ser visto en la parte superior de esta página. \n

Para ordenar los botones horizontalmente y seguir usando horzline.gif en vez de la barra verde como separador, quite las etiquetas br y defina el cuerpo de la macro (la parte entre llaves {} ) de la siguiente manera:

<img src=\"_httpcimages_\/horzline.gif\"\n
width=\"_widthtspace_\" height=\"17\">
\n

La variable widthtspace da el ancho del espacio entre los botones, lo cual es calculado por Greenstone.

La parte de extra.dm que se reproduce a continuación redefine las macros que se encuentran en el paquete de Estilo, el cual es responsable de crear el encabezado y pie de cada página, y define información de estilo común:

##########################################################################\n
package Style\n
##########################################################################\n
\n

_collectionspecificstyle_ {\n
<link rel=\"stylesheet\" href=\"_httpcstyle_/style.css\" type=\"text/css\" \n
title=\"Greenstone Style\" charset=\"UTF-8\">\n
<style>\n
body.bgimage \\\{ background-image: none; \\\}\n
a.navlink:hover \\\{ background-image: url(\"_httpcimages_/bg_blue.gif\"); \\\}\n
</style>\n
}\n
\n
_pagebanner_ {\n
<div class=\"pageinfo\"> \n
<p class=\"bannerlinks\">_homelink_</p>\n
</div>\n
}\n
\n

La macro de encabezado de página de Greenstone, llamada header en style.dm, imprime el nombre o el logotipo de la colección y establece vínculos con las páginas principal, de ayuda y de preferencias. También remite a la macro htmlhead, que muestra el inicio de un archivo HTML. Esta llama a la macro cssheader la cual le imprime el formato a la página. Esta macro incluye a collectionspecificstyle la cual permite a la colección sumar algunos elementos de estilo al default.

Para utilizar enteramente el nuevo estilo para la colección, especifique la macro cssheader en extra.dm. Para simplemente agregar un par de declaraciones de estilos al estilo por defecto, especifique collectionspecificstyle en extra.dm. Eso es lo que la colección ha hecho. La macro mencionada arriba, collectionspecificstyle incluye el \'stylesheet\' propio de la colección, y a la vez anula un par de declaraciones de imagen, deshaciendose del fondo de pantalla de la barra verde curva, y cambiando a azul el fondo planeado para los botones de la barra de navegación.

La macro de encabezado de la página también remite a pagebanner para incluir el logotipo de la colección, los botones principal/ayuda/preferencias y la imagen en la parte superior izquierda que identifica la página (acerca de esta página, buscar página, etc.). Este código redefine el banner con el fin de suprimir estas imágenes, a excepción del botón de la página de inicio-- como se puede ver aquí, no aparecen en la parte superior de esta página.

La siguiente parte de extra.dm redefine las macros del paquete acerca de (que se encuentra en about.dm), el cual genera la página \"Acerca de esta colección\" que usted está viendo en este momento.

##########################################################################\n
package about\n
##########################################################################\n
\n
_content_ {\n
_navigationbar_\n
\n
_textabout_\n
\n
<h3>_help:textsimplehelpheading_</h3>\n
_help:simplehelp_\n
}
\n

La macro content para la página Acerca de normalmente contiene la barra de navegación (con vínculos hacia Búsqueda y cualquier clasificador) seguida por el texto \"Acerca de esta colección\" y \"cómo encontrar información\". Debido a que ésta cambia de una colección a otra, la macro navigationbar es definida internamente por Greenstone y utiliza la macro navbarspacer descripta arriba. La macro de contenido para la página Acerca de que se menciona arriba difiere de la normal (como la de la colección Demo que se puede ver aquí) en que la barra de navegación no está centrada y no hay cuadro de búsqueda.

La siguiente parte de extra.dm redefine las macros del paquete query (que se encuentra en query.dm), el cual se utiliza para generar la página de búsqueda.

##############################################################################\n
package query\n
##############################################################################\n

_content_ {\n
_navigationbar_\n
\n
<center>\n
_If_(_cgiargct_,_selectqueryform_,_queryform_)\n
</center>\n
_If_(_searchhistorylist_,<center>_iconsearchhistorybar_</center><br>\n
<center>\n
_searchhistorylist_\n
</center>)\n
_If_(_cgiargq_,<small>_freqmsg_ _textpostprocess_</small><br>_resultline_,)\n
<br>\n
}\n
\n

La definición de content en el paquete de query estándar es similar a la versión dada arriba, excepto que centra la macro navigationbar, mientras que la versión de arriba no lo hace, e incluye una barra verde adicional. Compárese ésta con ésta.

El archivo extra.dm también redefine las macros del paquete document, el cual se utiliza para mostrar los documentos en pantalla (véase document.dm). De hecho, las páginas generadas por medio de clasificadores (p. ej. las listas de títulos) también se rigen por estas macros.

##########################################################################\n
package document\n
##########################################################################\n
\n
_textheader_ {\n
_cgihead_\n
_htmlhead_(class=\"bgimage\")_startspacer__pagebanner_ \n
}\n
\n
_content_ {\n
_navigationbar_\n
\n
_If_(_phindclassifier__collageclassifier_,\n
<p style=\"text-align: center;\">\n
_phindclassifier_\n
_collageclassifier_\n
</p>\n
)\n
\n
_If_(\"_cgiargcl_\" eq \"search\",\n
<ul id=\"searchresults\">\n
_prevsearchresult_\n
_nextsearchresult_\n
</ul>)\n
\n
<div class=\"document\">\n
}\n
\n

Greenstone anula la macro header si el documento (y no un clasificador) está siendo mostrado. Supongamos que no queremos que esto suceda. El código aqui arriba redefine la macro textheader (normalmente definida en document.dm) para ser el contenido del macro original header. La definición de content aqui arriba anula la omisión para que la barra de navegación no esté centrada. " # -- Russian text ---------------- collectionmeta collectionextra [l=ru] " Эта демонстрационная коллекция содержит тот же материал, что и оригинальная демонстрационная коллекция Greenstone, но её вид был изменен., чтобы улучшить резкость.

Как работает коллекция

Вид коллекций Гринстоун задается «макрофайлами» в директории макроса (greenstone/macros>) и может быть полностью изменено с помощью модификаций в файлах макросов. Эти модификации изменят вид всех коллекций. Чтобы изменить вид всего лишь одной коллекции, поместите соответствующий модифицированный макрос в файл названный extra.dm в папке macros этой коллекции. Например, эта коллекция использует файл greenstone/collect/_cgiargc_/macros/extra.dm.\n

Для отделения некоторых деталей презентации от макрофайлов Гринстоун использует Cascading Style Sheets (см. дополнительную информация на http://www.w3.org/Style/CSS/), которые позволяют Вам устанавливать шрифты, цвета, интервалы и другие элементы для страниц HTML. Файл со стандартным набором стилей в Гринстоун помещен здесь: greenstone/web/style/style.css (он помещен в директории images, потому что макро файлы могут содержать удобные ссылки к этой директории.) Эта коллекция имеет вспомогательный стилевой файл, greenstone/collect/_cgiargc_/style/style.css, который содержит несколько комментариев для тех, кто не разбирается с CSS. Некоторые макросы в extra.dm имеют ссылки к изображениям помещенным в greenstone/collect/_cgiargc_/images.\n

Макрофайл extra.dm отвергает часть макросов, которые используются в Greenstone по умолчанию. В макрофайлах \"\#\" оповещает о строке комментариев (extra.dm содержит комментарии, чтобы помочь объяснить, что он делает). Сами макросы сообщаются путем подчеркивания, и они могут обращаться к другим макросам. Это означает, что содержание страницы может быть разбито на многие маленькие куски, и могут возникать трудности при работе по цепи, которую макрос вызывает. К счастью, изменения в макросах, подобно изменениям в форматных строках, вступают в силу немедленно, если Вы не используете сервер локальной библиотеки Greenstone, в случае чего сервер нуждается в перезагрузке. Это облегчает экспериментирование путем редактирования макрофайлов.

Макросы сгруппированы в «пакеты». Но каждый пакет не обязательно размещается в отдельном файле. Глобальный пакет, большая часть которого находится в файле base.dm (часть его находится также в специфических языковых макрофайлах типа english.dm и french.dm), содержит макросы по умолчанию, которые могут быть отвергнутыми макросами в других пакетах. Здесь имеется часть extra.dm.

##########################################################################\n
package Global\n
##########################################################################\n
\n
_starthighlight_ {<b>}\n
_endhighlight_ {</b>}\n
\n
_navbarspacer_ { \n
<br/>\n
<img src=\"_httpcimages_/horzline.gif\" width=\"87\" height=\"17\">\n
<br/>\n
}\n
\n которая определяет глобальные макросы, значения starthighlight и endhighlight используются для подсвечивания терминов запроса при представлении документа. По умолчанию должен быть установлен желтый фон. Первая спецификация вместо этого выделяет запрос полужирным шрифтом.

Следующий макрос navbarspacer служит для того, чтобы отделить кнопку поиска и кнопки классификаторов в навигационной линейке. Обычно это хорошо знакомая в Greenstone горизонтальная зеленая линейка. Следущее определение имеет эффект вертикального расположения кнопок, одна над другой.

_navbarspacer_ {<br\/>}
\n

Определение navbarspacer, данное ранее использует рисунок horzline.gif в качестве разделителя (этот рисунок содержится в папке коллекции под названием images). Эффект виден в начале этой страницы.\n

Размещение кнопок горизонтально, все ещё используя horzline.gif, вместо зеленой линейки как разделителя, удаляя тэги br и определяет тело макроса (часть в фигурных скобках), как:

<img src=\"_httpcimages_\/horzline.gif\"\n
width=\"_widthtspace_\" height=\"17\">
\n

Переменная widthtspace задаёт ширину промежутка между кнопками, которую вычисляет Greenstone.

Часть extra.dm, воспроизведенная ниже, переопределяет макросы в пакете Style, который отвечает за создание заголовка и нижней сноски на каждой странице:\n

##########################################################################\n
package Style\n
##########################################################################\n
\n

_collectionspecificstyle_ {\n
<link rel=\"stylesheet\" href=\"_httpcstyle_/style.css\" type=\"text/css\" \n
title=\"Greenstone Style\" charset=\"UTF-8\">\n
<style>\n
body.bgimage \\\{ background-image: none; \\\}\n
a.navlink:hover \\\{ background-image: url(\"_httpcimages_/bg_blue.gif\"); \\\}\n
</style>\n
}\n
\n
_pagebanner_ {\n
<div class=\"pageinfo\"> \n
<p class=\"bannerlinks\">_homelink_</p>\n
</div>\n
}\n
\n

макрос заголовка страницы Greenstone, который называется header в style.dm, печатает наименование коллекции и её эмблему и связывает её с домашней страницей, помощью и страницами предпочтений. Он вызывает макрос htmlhead, который определяет начало файла HTML. Это вызывает макро cssheader, который показывает информацию о стиле страницы. Этот макро включает макро collectionspecificstyle, который позволяет добавить к коллекции стилистические элементы к набору по умолчанию.

Чтобы использовать совершенно другой стиль в коллекции, выберите макро cssheader в extra.dm. Чтобы всего лишь добавить несколько новых стилевых определений к стилю по умолчанию, выберите collectionspecificstyle в extra.dm. Это было сделано в этой коллекции. Вышеуказаный макро collectionspecificstyle содержит таблицу стилей коллекции, и переопределяет пару стилей для изображений: Зеленая фоновая планка с завитками исчезла, а фон навигационной панели теперь синий.\n

Макрос заголовки страницы также вызывает pagebanner, чтобы включить эмблему коллекции, кнопки home/help/preferences и изображение слева вверху, которое идентифицирует страницу (о странице, поисковая страница и т.д.). Программа, указанная выше, определяет баннер, чтобы подавить эти изображения. Как Вы можете видеть, они не появляются наверху этой страницы.\n

Следующая часть extra.dm переопределяет макрос для описания О пакете, содержащийся в about.dm, который генерирует страницу «Об этой коллекции», которую Вы видите сейчас.

##########################################################################\n
package about\n
##########################################################################\n
\n
_content_ {\n
_navigationbar_\n
\n
_textabout_\n
\n
<h3>_help:textsimplehelpheading_</h3>\n
_help:simplehelp_\n
}
\n Макросодержание для текста О странице обычно содержит навигационную линейку (со ссылками к Поиску и любым классификаторам), сопровождаемую описанием «Об этой коллекции» и текстом «Как найти информацию». Поскольку они изменяются от одной коллекции к другой, макроc navigationbar определен внутри Greenstone и использует макрос navbarspacer, который был обсужден выше. Макрос content для описания О странице, представленный выше, отличается от обычного (такого, как коллекции Demo) тем, что навигационная линейка не отцентрирована и здесь нет никакого поля поиска.

Следующая часть extra.dm переопределяет макрос в пакете запроса (query) в query.dm), который используется для генерации поисковой страницы.

##############################################################################\n
package query\n
##############################################################################\n

_content_ {\n
_navigationbar_\n
\n
<center>\n
_If_(_cgiargct_,_selectqueryform_,_queryform_)\n
</center>\n
_If_(_searchhistorylist_,<center>_iconsearchhistorybar_</center><br>\n
<center>\n
_searchhistorylist_\n
</center>)\n
_If_(_cgiargq_,<small>_freqmsg_ _textpostprocess_</small><br>_resultline_,)\n
<br>\n
}\n
\n Определение содержания в стандартном пакете запроса подобно версии, данной выше, за исключением того, что оно помещает в центре макрос navigationbar, тогда как вышеупомянутая версия не делает этого и включает дополнительную зеленую линейку. Сравните то и это.

Файл extra.dm также переопределяет макрос в пакете документ (document), который используется для того, чтобы показать документы (см. document.dm). Фактически страницы, генерируемые классификаторами (например, списком наименований) также управляются и этими макросами.

##########################################################################\n
package document\n
##########################################################################\n
\n
_textheader_ {\n
_cgihead_\n
_htmlhead_(class=\"bgimage\")_startspacer__pagebanner_ \n
}\n
\n
_content_ {\n
_navigationbar_\n
\n
_If_(_phindclassifier__collageclassifier_,\n
<p style=\"text-align: center;\">\n
_phindclassifier_\n
_collageclassifier_\n
</p>\n
)\n
\n
_If_(\"_cgiargcl_\" eq \"search\",\n
<ul id=\"searchresults\">\n
_prevsearchresult_\n
_nextsearchresult_\n
</ul>)\n
\n
<div class=\"document\">\n
}
\n Гринстоун аннулирует макро header, если изображен документ (а не классификатор). Предположим, мы не хотим этого. Вышестоящий код переопределяет макро textheader (обычно определенном в document.dm) в качестве первоначального содержания макро header. Вышестоящее определение content аннулирует значение по-умолчанию, так что навигационное меню не центрируется. " # -- Simplified Chinese text ---------------- collectionmeta collectionextra [l=zh] " 本馆藏所包含的文档与Greenstone演示馆藏中的一样,但其外观被更改为garish风格。\n

本馆藏如何工作

\n

Greenstone馆藏的外观由greenstone/macros目录下的\"宏文件\"定义,修改这些文件的内容将更改所有馆藏的外观。 如果只修改一个馆藏的外观,将修改后的宏放入该馆藏macros目录下的extra.dm文件中。例如,这个馆藏使用这个文件 greenstone/collect/_cgiargc_/macros/extra.dm。\n

为了将呈现细节从宏文件中分离出来,Greenstone使用层级样式表(更多信息请参见 http://www.w3.org/Style/CSS/),这允许指定HTML页面的字体、颜色、间隔以及其他元素。标准的Greenstone样式表位于 greenstone/web/style/style.css。本馆藏使用一个附属的样式表, greenstone/collect/_cgiargc_/style/style.css,与缺省样式表一起使用。该样式表包括一些注释信息以 便不熟悉层级样式表的人理解。extra.dm文件中的一些宏引用了位于greenstone/collect/_cgiargc_/images中的图片。\n

extra.dm宏文件将覆写Greenstone的缺省宏。在宏文件中, \"\#\"符号表示一个注释行(extra.dm中已添加注释以便说明其功能)。宏本身由下划线开始,而且可以引用其他宏。这意味着一个页面的内容 可以被分割成很多小块,而且很难察看整个引用链来弄清楚哪个宏调用了哪个宏。幸运的是,宏当中的更改(如同格式参数中的更改)能立即见效,除非当 前使用的是Greenstone本地服务器模式,在这种情况下需要重启服务器。这使得调试宏文件变得很容易。

这些宏按\"packages\"(包)分组。但是并不每个包都不需要一个单独的文件。Global(全局)包,大部分存在于 base.dm文件中,(也有一部分保存在语言相关的宏文件中,比如 english.dmfrench.dm), 包含了缺省的宏且可被其他包中的宏覆写。这里是extra.dm文件中重定义了全局宏变量的部分。

##########################################################################\n
package Global\n
##########################################################################\n
\n
_starthighlight_ {<b>}\n
_endhighlight_   {</b>}\n
\n
_navbarspacer_ { \n
<br/>\n
<img src=\"_httpcimages_/horzline.gif\" width=\"87\" height=\"17\">\n
<br/>\n
}\n
\n starthighlightendhighlight的值被用于在显示文档时高亮显示查询词。缺省情况时将背景设置成黄色。上面的第一个设置即将查询词的高亮设置为黑体。\n

接下来,navbarspacer宏负责将浏览条中的搜索按钮与分类按钮分开。通常情况下Greenstone有一个水平的绿色的浏览条。接下来的定义将垂直罗列这些按钮, 一个在另一个之上。

_navbarspacer_ {<br\/>}
\n 前面给出的navbarspacer定义用到了horzline.gif图片作为分隔符(这个图片在馆藏的images目录中)。在这个页面的顶端即可看到效果。\n

若要按水平方式排列这些按钮,并仍使用horzline.gif而不是绿色条作为分隔符,删除br标记并定义宏的主体(在大括号中的部分)为:

<img src=\"_httpcimages_\/horzline.gif\"\n
   width=\"_widthtspace_\" height=\"17\">
\n widthtspace变量定义了按钮间的宽度,Greenstone将计算这个宽度。\n

下面所列的extra.dm部分重定义了Style包中的宏,这个宏将负责创建每个页面的页头和页尾,并定义常用的样式信息:

##########################################################################\n
package Style\n
##########################################################################\n
\n

_collectionspecificstyle_ {\n
<link rel=\"stylesheet\" href=\"_httpcstyle_/style.css\" type=\"text/css\" \n
   title=\"Greenstone Style\" charset=\"UTF-8\">\n
<style>\n
body.bgimage \\\{ background-image: none; \\\}\n
a.navlink:hover \\\{ background-image: url(\"_httpcimages_/bg_blue.gif\"); \\\}\n
</style>\n
}\n
\n
_pagebanner_ {\n
<div class=\"pageinfo\"> \n
<p class=\"bannerlinks\">_homelink_</p>\n
</div>\n
}\n
\n Greenstone的片头宏,即style.dm中的header,将显示该馆藏的名称或者标志, 并链接到主页、帮助页面与偏好页面。它将调用htmlhead宏,这个宏将显示HTML文件的开头部分。这里调用cssheader宏, 这个宏显示页面的样式信息。这里包括了collectionspecificstyle宏,这个宏允许馆藏在缺省样式的基础上添加其他样式元素。

若要在该馆藏中使用全新的样式,在extra.dm中定义cssheader宏。若只是在缺省样式中添加几个样式定义,在extra.dm中定义 collectionspecificstyle。这就是馆藏的形成方式。上面的collectionspecificstyle宏包含了该馆藏自己的样式表,同时也覆写了一些图片的定义, 去掉了绿色旋转条纹的背景图片,并将浏览条的悬停背景变为蓝色。

页面头宏也调用pagebanner来包含该馆藏的标志,主页/帮助/偏好按钮,以及左上方指示当前页面的图片(说明页面,搜索页面等等)。上面的代码重 定义的标志除去了所有图片,除了主页按钮之外——这些图片没有出现在这个页面的顶端。\n

extra.dm接下来的一部分重新定义了about包中的宏(包含在about.dm中), 这个宏将产生\"关于本馆藏\"页面,如下所示:

##########################################################################\n
package about\n
##########################################################################\n
\n
_content_ {\n
_navigationbar_\n
\n
_textabout_\n
\n
<h3>_help:textsimplehelpheading_</h3>\n
_help:simplehelp_\n
}
\n About页面的content宏通常包含了浏览条(链接到搜索与任意一个分类器),接下来是\"关于本馆藏\"与\"如何找到相关信息\"的文本。因为这个 宏是随馆藏的不同而不同,navigationbar宏是由Greenstone内部定义的,而且使用前面定义的navbarspacer宏。关于页面的content宏, 如上面所示,不同于常规的宏(比如演示馆藏的宏,见这里),不同之处在于浏览条并不是居中显示的, 而且没有搜索框。\n

extra.dm的下一部分重新定义了query包中的宏(如query.dm中所示),这个宏 用于生成搜索页

##############################################################################\n
package query\n
##############################################################################\n

_content_ {\n
_navigationbar_\n
\n
<center>\n
_If_(_cgiargct_,_selectqueryform_,_queryform_)\n
</center>\n
_If_(_searchhistorylist_,<center>_iconsearchhistorybar_</center><br>\n
<center>\n
_searchhistorylist_\n
</center>)\n
_If_(_cgiargq_,<small>_freqmsg_ _textpostprocess_</small><br>_resultline_,)\n
<br>\n
}\n
\n 标准query中定义的content宏与上述定义类似,除了标准定义会居中显示navigationbar宏,而上述定义不居中显示,而且它还额外包含了一个绿色条。 比较这个这个.\n

extra.dm文件也重新定义了document包中的宏,这些宏被用于显示文档(参见 document.dm)。事实上,分类器所创建的页面(例如题名列表)也是被这些宏所定义。 ##########################################################################\n package document\n ##########################################################################\n \n _textheader_ {\n _cgihead_\n _htmlhead_(class=\"bgimage\")_startspacer__pagebanner_ \n }\n \n _content_ {\n _navigationbar_\n \n _If_(_phindclassifier__collageclassifier_,\n <p style=\"text-align: center;\">\n _phindclassifier_\n _collageclassifier_\n </p>\n )\n \n _If_(\"_cgiargcl_\" eq \"search\",\n <ul id=\"searchresults\">\n _prevsearchresult_\n _nextsearchresult_\n </ul>)\n \n <div class=\"document\">\n }\n \n 如果显示的是文档(而不是分类器),Greenstone将覆写header宏。假设我们不想让Greenstone覆写这个宏,则上面的代码将重新定义textheader宏 (通常在document.dm中定义),并作为原始的header宏的内容。上述content的定义覆写了缺省的值,因此浏览条也不会居中显示。 "