Previous Next Table of Contents

5. Legacy library code used by the WWW based template editor

5.1 lib/mktemp-authority.pl - Template editor authority file lookups

NAME

lib/mktemp-authority.pl - Template editor authority file lookups

SYNOPSIS

require "$ROADS::Lib/mktemp-authority.pl";
&AuthorityLookup($cluster,$tt,$type,$instance);

DESCRIPTION

This package implements a routine which returns an HTML rendered version of the authority file for a given template type and element.

METHODS

AuthorityLookup( type )

This function renders a page of HTML to STDOUT containing the authority file choices for the given template type and attribute. If it contains one or more colon ":" characters, the type parameter is expanded to :-

FILES

config/authority/* - default location for the authority files. There are subdirectories for each template type and a separate file for each attribute. The files themselves consist of a line for each possible value of the attribute being controlled by the authority file.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.2 lib/mktemp-capture.pl - capture attributes and values from a template edit

NAME

lib/mktemp-capture.pl - capture attributes and values from a template edit

SYNOPSIS

require "$ROADS::Lib/mktemp-authority.pl";
&DoField($line, $BaseName);

DESCRIPTION

This package defines a function to capture the attributes and their values that are present in a submitted mktemp.pl editing form and also in a template outline for the selected template.

METHODS

DoField( line, BaseName )

This function takes the template attributes and values from the form which is currently being edited and writes them to what will in most cases be a temporary file for use in the next step of the template editing process - e.g. emailing, saving for batch update, and so on.

FILES

config/outlines/* - outline (schema) definitions of the available template types.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.3 lib/mktemp-editform.pl - return the main template editor form

NAME

lib/mktemp-editform.pl - return the main template editor form

SYNOPSIS

require "$ROADS::Lib/mktemp-editform.pl";
&editform;

DESCRIPTION

This package implements a routine which returns the main ROADS template editor form.

METHODS

editform

This function returns the main ROADS template editor form, rendering only those template fields which have been chosen in the CGI view variable, and including such context sensitive help, default values, pick lists and authority files as have been defined.

The user has the option of adding additional clusters (of each type represented in the template) and variants, or removing the last variant of cluster of each type which has been entered. In addition, one can include a whole template as a cluster within another template, or search for a template to include.

FILES

config/authority/* - authority files, if applicable.

config/multilingual/*/mktemp/editformhead.html - the beginning of the HTML form.

config/multilingual/*/mktemp/editformtail.html - the end of the HTML form.

config/multilingual/*/mktemp-notes/* - per template type/attribute context sensitive help, if applicable. Notes can be specific to a particular template type and attribute combination by creating a file say document-Keywords, or applied to all instances of a particular attribute name by creating a file (say) all-Keywords

BUGS

The HTML produced by the editor is practically hard coded. It would be highly desirable to be able to control the rendering style used for individual attributes. This may be possible without too much pain using CSS.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.4 lib/mktemp-forms.pl - return miscellaneous template editor HTML forms.

NAME

lib/mktemp-forms.pl - return miscellaneous template editor HTML forms.

SYNOPSIS

require "$ROADS::Lib/mktemp-forms.pl";
&SendIntroForm;
&sendsizeform;  

DESCRIPTION

This package implements routines for sending back miscellaneous HTML forms to the end user.

METHODS

SendIntroForm

This function returns the form introform in the program call mktemp.

sendsizeform

This function returns a form which is generated partly from the customisable HTML in the mktemp messages collection, with additional HTML dynamically generated if necessary. If the template being edited already exists, and it is possible to add additional clusters and/or variant elements, the HTML form returned will include fields asking the user to choose how many (if any) additional clusters of each type and/or variants they would like to add.

If the template is being created, the user will be prompted (if applicable) for the number of clusters of each type and variants they would like to include in it.

FILES

config/multilingual/*/mktemp/introform.html - introductory form.

config/multilingual/*/mktemp/notemplateoutline.html - returned when no outline (schema) definition could be found for the template type being edited could be found.

config/multilingual/*/mktemp/clusterhead.html - the beginning of the HTML document created when the template being edited contains clusters.

config/multilingual/*/mktemp/variantsizeonly.html - HTML returned when the template being edited contains variants but not clusters.

config/multilingual/*/mktemp/clustervariantsize.html - HTML returned when the template being edited contains both clusters and variants.

config/multilingual/*/mktemp/clusteronlybottom.html - HTML returned when the template being edited contains clusters but not variants.

config/outlines/* - outline (schema) definitions of the available templates.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.5 lib/mktemp-lookupcluster.pl - returns the template editor cluster search form

NAME

lib/mktemp-lookupcluster.pl - returns the template editor cluster search form

SYNOPSIS

require "$ROADS::Lib/mktemp-lookupcluster.pl";
&LookupCluster($type);

DESCRIPTION

This package implements a function which returns a cluster search form.

METHODS

LookupCluster( type )

This function creates a new HTML form which lets the template editor end user search for a cluster to include in a template being edited/created. The attribute/value pairs from the in-progress template are included as hidden fields so as to pass on state from the previous stages in the editing process.

FILES

config/multilingual/*/mktemp/lookupclusterhead.html - the beginning of the HTML form which is returned.

config/multilingual/*/mktemp/lookupclusterform..html - the end of the HTML form returned.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.6 lib/mktemp-selectview.pl - return available template editor views

NAME

lib/mktemp-selectview.pl - return available template editor views

SYNOPSIS

require "$ROADS::Lib/mktemp-selectview.pl";
&SelectEditingView;

DESCRIPTION

This package defines a function which returns a list of the available template editing views for this particular template type.

METHODS

SelectEditingView

This function uses the CGI variables originalhandle and templatetype to determine the views which are available in addition to the default "ALL" view which includes all attributes in the template.

The list of views is stored in a global hash array views, and a page of HTML which may have these interpolated by variable substitution.

FILES

config/mktemp-views/* - the available views, see the mktemp.pl manual page for more information on the file format.

config/multilingual/*/mktemp/selectview.html - the HTML form which lets the template editor user select the editing view to use.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.7 lib/mktemp-size.pl - work out the size of clusters and variants in a template

NAME

lib/mktemp-size.pl - work out the size of clusters and variants in a template

SYNOPSIS

require "$ROADS::Lib/mktemp-size.pl";
&WorkOutSize;

DESCRIPTION

This package defines a function which tries to work out the number of clusters and variants in a template being edited using the CGI variables passed on to it by the main body of the template editor program mktemp.pl.

METHODS

WorkOutSize

This function sets the CGI variables variantsize and clusterclustername (e.g. clusterAuthor) with the number of clusters of each type and variants in a template. These are determined by examining the original template being edited and factoring in the existing values of these CGI variables.

BUGS

Working largely with global variables, including an open filehandle for the original template. It would be better if this was done in a less dangerous way.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>

5.8 lib/mktemp-validedit.pl - Given a template handle, check the template exists

NAME

lib/mktemp-validedit.pl - Given a template handle, check the template exists

SYNOPSIS

require "$ROADS::Lib/mktemp-validedit.pl";
&CheckValidTemplate;

DESCRIPTION

This package defines a function CheckValidTemplate which, given a template handle, tries to find out whether it exists in the ROADS database.

METHODS

CheckValidTemplate

This function examines the CGI variable originalhandle and tries to open an existing template with this handle. If unsuccessful it returns a page of HTML to explain what went wrong.

FILES

config/multilingual/*/mktemp/notemplates.html - HTML returned if no template mappings file (alltemps) could be found.

config/multilingual/*/mktemp/nonexistent.html - HTML returned if the template file itself couldn't be opened.

guts/alltemps - default location of template handle to filename mappings.

BUGS

We shouldn't be reading alltemps directly - should use the ROADS::ReadTemplate abstractions instead. Should also simply return an error code if the template couldn't be found rather than bombing out.

SEE ALSO

the manual page for admin-cgi/mktemp.pl

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

It was developed by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>


Previous Next Table of Contents