Hello There!
I am not sure this is the right emailing list for this, but I don't
intend
to subscribe to all lists. Ok?
For html template files you can set up 1 file per option. We have 12
kilobytes
long header with divs+text menus, would be bad to repeat it in all
template
files (especially for changing). With my change you can use the same
header.html
file for all of search_results, syntax and nomatch files. See:
search_results_header: /home/httpd/html/www.tetrapak.hu/hun/header.html
\
/home/httpd/html/www.tetrapak.hu/templates/header-search.html
search_results_footer:
/home/httpd/html/www.tetrapak.hu/templates/footer-search.html \
/home/httpd/html/www.tetrapak.hu/hun/footer.html
nothing_found_file: /home/httpd/html/www.tetrapak.hu/hun/header.html \
/home/httpd/html/www.tetrapak.hu/templates/nomatch.html \
/home/httpd/html/www.tetrapak.hu/hun/footer.html
syntax_error_file: /home/httpd/html/www.tetrapak.hu/hun/header.html \
/home/httpd/html/www.tetrapak.hu/templates/syntax.html \
/home/httpd/html/www.tetrapak.hu/hun/footer.html
Cool, isn't it?
(In nomatch and syntax.html I just have a few lines. And the
headers/footers
are exactly the same as we use on the site with ssi.)
The modified functions are in htsearch/Display.cc and included down
here.
Maybe there could be a nicer way, changing displayParsedFile() but don't
understand c++ code clearly ;-)
If I knocked on the bad door, please tell me and sorry for the mail.
It would be good to have this kind of improvement in the upcoming
versions,
especially coz this kind of complex header/footer files! (changes are
nightmare, if you have 3-4-5 copies of the header!)
Thanks for the cool program. This is the first time I use it, and I like
it very much! Will put it on the production site in some days.
Ferenc Veres
Hungary
Modified functions are fully listed here. The original source was
VERSTION 3.2.0b3.
//*****************************************************************************
void
Display::displayHeader()
{
QuotedStringList files(config["search_results_header"], "
\t\r\n");
int i;
for (i = 0; i < files.Count(); i++) {
displayParsedFile(files[i]);
}
}
//*****************************************************************************
void
Display::displayFooter()
{
QuotedStringList files(config["search_results_footer"], "
\t\r\n");
int i;
for (i = 0; i < files.Count(); i++) {
displayParsedFile(files[i]);
}
}
//*****************************************************************************
void
Display::displayNomatch()
{
QuotedStringList files(config["nothing_found_file"], " \t\r\n");
int i;
for (i = 0; i < files.Count(); i++) {
displayParsedFile(files[i]);
}
}
//*****************************************************************************
void
Display::displaySyntaxError(const String& message)
{
if( config.Boolean("nph") ) cout << "HTTP/1.0 200 OK\r\n";
cout << "Content-type: text/html\r\n\r\n";
setVariables(0, 0);
vars.Add("SYNTAXERROR", new String(message));
QuotedStringList files(config["syntax_error_file"], " \t\r\n");
int i;
for (i = 0; i < files.Count(); i++) {
displayParsedFile(files[i]);
}
}
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html