summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-09-07 01:35:48 +0200
committerYorhel <git@yorhel.nl>2015-09-07 01:35:48 +0200
commit438d4df64d950f8905bd31bddc203d408f42f125 (patch)
treed2ebd6f9ea86238773cfdc35ac41033dcb9baffa /data
parent19ce5fcf536ed478ad34b6b1014bf6f44841d25d (diff)
Implement discussion board search function
Inspired by wakaranai's implementation at https://github.com/morkt/vndb/commit/b852c87ad145fdaaa09c79b6378dd819b46f7e87 This version is different in a number of aspects: - Separate search functions for title search and fulltext post search. Perhaps not the most convenient option, but the downside of a combined search is that if the query matches the threads' title, then all of the posts in that thread will show up in the results. This didn't seem very useful. - Sorting is based purely on post date. Rank-based sort is slow without a separate caching column, and in my opinion not all that useful. Implementation differences: - Integrated in the existing DB::Discussions functions, so less code to maintain and more code reuse. - No separate caching column for the tsvector, a functional index is used instead. This is a bit slower (index results need to be re-checked against the actual messages, hence the slowdown), but has the advantage of smaller database dumps and less complexity in updating the cache. Things to fix or look at: - Highlighting of the search query in message contents. - Allow or-style query matching
Diffstat (limited to 'data')
-rw-r--r--data/lang.txt113
-rw-r--r--data/style.css5
2 files changed, 117 insertions, 1 deletions
diff --git a/data/lang.txt b/data/lang.txt
index db3fba56..ea7677bf 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -4820,7 +4820,118 @@ uk : Головна сторінка форуму
it : Indice area messaggi
-# Thread list (on discussion board index and board browser)
+# Discussion board search
+
+:_dissearch_title
+en : Search the discussion board
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_query
+en : Query
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_titleonly
+en : Only search thread titles
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_boards
+en : Boars
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_noresults_title
+en : No results
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_noresults_msg
+en : No threads or messages found matching your criteria.
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_col_date
+en : Date
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_col_user
+en : User
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+:_dissearch_col_msg
+en : Message
+ru*:
+cs*:
+hu*:
+nl*:
+de*:
+es*:
+tr*:
+uk*:
+it*:
+
+
+# Thread list (on discussion board index, search and board browser)
:_threadlist_col_topic
en : Topic
diff --git a/data/style.css b/data/style.css
index ed489aa9..736fb910 100644
--- a/data/style.css
+++ b/data/style.css
@@ -275,6 +275,7 @@ p#searchtabs a:hover, p#searchtabs a.sel {
background: $secbg$ url($_boxbg$) repeat;
}
#q { width: 600px }
+#bq { width: 300px }
@@ -313,6 +314,10 @@ div.mainbox.discussions b.boards a { color: $grayedout$; }
div.discussions td.tc2 { width: 50px; }
div.discussions td.tc3 { width: 90px; }
div.discussions td.tc4 { width: 170px; }
+div.postsearch td.tc1_1 { width: 60px; padding-left: 0; padding-right: 0; text-align: right }
+div.postsearch td.tc1_2 { width: 25px; padding-left: 0 }
+div.postsearch td.tc2 { width: 65px; }
+div.postsearch td.tc3 { width: 90px; }
h1.boxtitle, h1.boxtitle a {
font-family: "Futura", "Century New Gothic", "Arial", Serif;
font-weight: bold;