From d3de2db642fcbe7b44b20ac6b65a28d9efe1d50f Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 10 Aug 2011 14:54:04 +0000 Subject: [PATCH] implemented news search svn path=/trunk/; revision=7 --- Home.page | 23 ++++++++++++++++++++++- Wiki.css | 20 -------------------- busy.css | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/Home.page b/Home.page index 5c44184..ba0fbe2 100644 --- a/Home.page +++ b/Home.page @@ -1,7 +1,28 @@ #!/bin/zsh +search="$(egrep -o '(^|&)(s=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?s=::;s:\+: :g;s:%:\\x:g')" +search="$(echo -e "${search}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)" -cat < +
+ +
+ +
+
+WikiEND +if [ -n "$search" ]; then + echo "

News search results for: $search

" + for each in $(grep -ile "$search" Home/<0000000000-9999999999>_<000-999>.news); do + id=$(sed -r 's:^.*/::;s:.news$::' <<<$each) + echo "' + done + echo '
' +fi + +cat <
diff --git a/Wiki.css b/Wiki.css index f519acc..5218667 100644 --- a/Wiki.css +++ b/Wiki.css @@ -14,26 +14,6 @@ /* You should have received a copy of the GNU Affero General Public License*/ /* along with Busy. If not, see .*/ -.search { - background-color: #FFF; - border-color: #AAF; - border-style: solid; - border-width: 1px; - margin: .6em 0em; - padding: .2em .5em .5em .5em; - border-radius: 8px; - -moz-border-radius: 8px; -} -.search h2{ - font: normal bold 1em sans-serif; - text-align: center; - color: #66F; - margin: 0em 0em .3em 0em; - border-style: none none solid none; - border-width: 1px; - border-color: #AAF; -} - .comment { background-color: #FFF; border-color: #AAF; diff --git a/busy.css b/busy.css index a980fc1..1abcc6f 100644 --- a/busy.css +++ b/busy.css @@ -115,6 +115,26 @@ div#LEFT h1{ margin: 0em 0em .5em 0em; } +.search { + background-color: #FFF; + border-color: #AAF; + border-style: solid; + border-width: 1px; + margin: .6em 0em; + padding: .2em .5em .5em .5em; + border-radius: 8px; + -moz-border-radius: 8px; +} +.search h2{ + font: normal bold 1em sans-serif; + text-align: center; + color: #66F; + margin: 0em 0em .3em 0em; + border-style: none none solid none; + border-width: 1px; + border-color: #AAF; +} + div#RIGHT { position: absolute; right: 0px; top: 7em; -- 2.39.2