get( 'title_length', 20 );
$preview_height = $params->get( 'preview_height', 90 );
$preview_width = $params->get( 'preview_width', 140 );
$show_preview = $params->get( 'show_preview', 0 );
// Read files from template directory
$template_path = "$mosConfig_absolute_path/templates";
$templatefolder = @dir( $template_path );
$darray = array();
if ($templatefolder) {
while ($templatefile = $templatefolder->read()) {
if ($templatefile != "." && $templatefile != ".." && $templatefile != ".svn" && $templatefile != "css" && is_dir( "$template_path/$templatefile" ) ) {
if(strlen($templatefile) > $titlelength) {
$templatename = substr( $templatefile, 0, $titlelength-3 );
$templatename .= "...";
} else {
$templatename = $templatefile;
}
$darray[] = mosHTML::makeOption( $templatefile, $templatename );
}
}
$templatefolder->close();
}
sort( $darray );
// Show the preview image
// Set up JavaScript for instant preview
$onchange = "";
if ($show_preview) {
$onchange = "showimage()";
?>
" name="preview" border="1" width="" height="" alt="" />