#!/usr/bin/perl -w use CGI qw(:standard); my $image_generation_code_directory = "/research/mdewsnip/greenstone/image-generation"; my $images_directory = "/home/mdewsnip/public_html/greenstone/temp-images"; my $images_directory_url = "http://www.cs.waikato.ac.nz/~mdewsnip/greenstone/temp-images"; print "Content-Type: text/html; charset=utf-8\n\n"; print start_html("Greenstone classifier image generation"); print "
Greenstone classifier images with text \"" . $text_unicode_raw . "\":"; print "
\n"; print "These images should be put in the images/$image_directory folder of your Greenstone installation.\n"; print "
\n"; print "To get Greenstone to use the new images, some macros must be defined. Copy all the following text and paste it into the extra.dm file in Greenstone's \"macros\" directory:\n"; print "
\n";
print "\n";
# base.dm macros
print "# The following macros usually live in base.dm\n";
print "
package Global\n";
print "
\n";
print "
_" . $macro_name . "width_ $language_modifier {_widtht" . $image_name . "x_ }\n";
print "
_image" . $macro_name . "_ $language_modifier {_gsimage_(_httpbrowse" . $macro_name . "_,_httpicont" . $image_name . "of_,_httpicont" . $image_name . "on_,$text_unicode,_textimage" . $macro_name . "_)}\n";
print "
_icontab" . $macro_name . "green_ $language_modifier {<img src=\"_httpicont" . $image_name . "gr_\" width=_widtht" . $image_name . "x_ border=0>}\n";
print "
_icontab" . $macro_name . "green_ [$language_modifier_one" . "v=1] {_texticontab" . $macro_name . "green_ }\n";
print "
\n";
# document.dm macros
print "# The following macros usually live in document.dm\n";
print "
package document\n";
print "
\n";
print "
_text" . $macro_name . "page_ $language_modifier {_texticonh" . $image_name . "_}\n";
print "
_icon" . $macro_name . "page_ $language_modifier {<img src=\"_httpiconh" . $image_name . "_\" width=\"_widthh" . $image_name . "_\" height=\"_heighth" . $image_name . "_\">}\n";
print "
_icon" . $macro_name . "page_ [$language_modifier_one" . "v=1] {<h2>_texticonh" . $image_name . "_</h2>}\n";
print "
\n";
# Error: parameter not defined.";
}
print end_html();
package Global\n";
print "
\n";
print "
_textimage" . $macro_name . "_ $language_modifier {Browse by " . $text_unicode . "} $translate_this\n";
print "
_texticontab" . $macro_name . "green_ $language_modifier {\u$text_unicode}\n";
print "
\n";
print "
## \"$text_unicode\" ## nav_bar_button ## t" . $image_name . " ##\n";
print "
_httpicont" . $image_name . "gr_ $language_modifier {_httpimg_/$image_directory" . "t" . $image_name . "gr.gif}\n";
print "
_httpicont" . $image_name . "of_ $language_modifier {_httpimg_/$image_directory" . "t" . $image_name . "of.gif}\n";
print "
_httpicont" . $image_name . "on_ $language_modifier {_httpimg_/$image_directory" . "t" . $image_name . "on.gif}\n";
print "
_widtht" . $image_name . "x_ $language_modifier {$nav_bar_button_width}\n";
print "
\n";
print "
package document\n";
print "
\n";
print "
_texticonh" . $image_name . "_ $language_modifier {\u$text_unicode}\n";
print "
\n";
print "
## \"$text_unicode\" ## green_title ## h_" . $image_name . " ##\n";
print "
_httpiconh" . $image_name . "_ $language_modifier {_httpimg_/$image_directory" . "h_" . $image_name . ".gif}\n";
print "
_widthh" . $image_name . "_ $language_modifier {$green_title_width}\n";
print "
_heighth" . $image_name . "_ $language_modifier {57}\n";
print "
\n";
print "
package help\n";
print "
\n";
print "
_text" . $macro_name . "short_ $language_modifier {access publications by $text_unicode} $translate_this\n";
print "
_text" . $macro_name . "long_ $language_modifier {<p>You can <i>access publications by $text_unicode</i> by pressing the <i>" . $text_unicode . "</i> button. This brings up a list of " . $text_unicode . ". } $translate_this\n";
print "
\n";
print "\n";
}
else {
print "