Hi all!
If it's interesting to you - this is some small additions
for "stylability" - to improve designing abilities.
Patch was created with: diff -Naur
Features:
1. Possibility to customize "hilighting" inside excertps
(for those who don't like only bold text;)) Added 2 configuration
options:
start_hilight
default: <strong>
end_hilight
default: </strong>
Example:
start_hilight: <b><font color="#cc6600">
end_hilight: </font></b>
2. Possibility to customize pagelist. Added configuration option:
page_number_separator
default: " "
Example:
page_number_separator: " | "
Note: In order to include spaces, I used stringlist in code. So inclose
your separator in quotes! My first aim was to use this for text-only
pagelist.
Regards,
Serg
--------------------start-----------------------------
--- htcommon/defaults.cc Wed Sep 22 20:18:39 1999
+++ ../mypatch/defaults.cc Wed Oct 27 20:24:34 1999
@@ -48,6 +48,7 @@
{"doc_index", "${database_base}.docs.index"},
{"doc_list", "${database_base}.docs"},
{"end_ellipses", "<b><tt> ...</tt></b>"},
+ {"end_hilight", "</strong>"},
{"endings_affix_file", "${common_dir}/english.aff"},
{"endings_dictionary", "${common_dir}/english.0"},
{"endings_root2word_db", "${common_dir}/root2word.db"},
@@ -107,6 +108,7 @@
{"no_title_text", "filename"},
{"nothing_found_file", "${common_dir}/nomatch.html"},
{"page_list_header", "<hr noshade
size=2>Pages:<br>"},
+ {"page_number_separator", "\" \""},
{"prefix_match_character", "*"},
{"prev_page_text", "[prev]"},
{"remove_bad_urls", "true"},
@@ -126,6 +128,7 @@
{"star_image", "${image_url_prefix}/star.gif"},
{"star_patterns", ""},
{"start_ellipses", "<b><tt>... </tt></b>"},
+ {"start_hilight", "<strong>"},
{"start_url", "http://www.htdig.org/"},
{"substring_max_words", "25"},
{"synonym_db", "${common_dir}/synonyms.db"},
--- htsearch/Display.cc Wed Sep 22 20:18:44 1999
+++ ../mypatch/Display.cc Wed Oct 27 20:21:14 1999
@@ -498,6 +498,7 @@
char *p;
QuotedStringList pnt(config["page_number_text"], "
\t\r\n");
QuotedStringList npnt(config["no_page_number_text"], "
\t\r\n");
+ QuotedStringList sep(config["page_number_separator"], "
\t\r\n");
if (nPages > config.Value("maximum_pages", 10))
nPages = config.Value("maximum_pages");
for (i = 1; i <= nPages; i++)
@@ -507,7 +508,10 @@
p = npnt[i - 1];
if (!p)
p = form("%d", i);
- *str << p << ' ';
+ //*str << p << ' ';
+ *str << p;
+ if (i != nPages)
+ *str << sep[0];
}
else
{
@@ -517,7 +521,10 @@
*str << "<a href=\"";
tmp = 0;
createURL(tmp, i);
- *str << tmp << "\">" << p << "</a> ";
+ //*str << tmp << "\">" << p << "</a> ";
+ *str << tmp << "\">" << p << "</a>";
+ if (i != nPages)
+ *str << sep[0];
}
}
vars.Add("PAGELIST", str);
@@ -1069,13 +1076,15 @@
{
result.append(str, pos);
ww = (WeightWord *) (*searchWords)[which];
- result << "<strong>";
+ //result << "<strong>";
+ result << config["start_hilight"];
if (first && fanchor)
result << "<a href=\"" << urlanchor << "\">";
result.append(str + pos, length);
if (first && fanchor)
result << "</a>";
- result << "</strong>";
+ //result << "</strong>";
+ result << config["end_hilight"];
str += pos + length;
first = 0;
}
---------------------end-----------------------------
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.