diff options
author | Anika Henke <anika@selfthinker.org> | 2012-04-09 19:06:15 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2012-04-09 19:06:15 +0100 |
commit | 91b05b6bf9cb9fd3aeced777159422f4e8114a9c (patch) | |
tree | 1e5b8f838513352694486d381fda2c40e6cfad5f /inc | |
parent | d5acc30de20298eb6ed7545e70484599c4d95867 (diff) | |
download | rpg-91b05b6bf9cb9fd3aeced777159422f4e8114a9c.tar.gz rpg-91b05b6bf9cb9fd3aeced777159422f4e8114a9c.tar.bz2 |
improved HTML for search results
Attention: Template authors need to adjust their CSS!
Original structure:
div.search_result >
a.wikilink1 > span.search_cnt
br
div.search_snippet
New structure:
dl.search_results >
dt > a.wikilink1
dd
Diffstat (limited to 'inc')
-rw-r--r-- | inc/html.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/inc/html.php b/inc/html.php index 787f96caa..c3e345cb0 100644 --- a/inc/html.php +++ b/inc/html.php @@ -323,11 +323,11 @@ function html_search(){ flush(); //show progressbar - print '<div class="centeralign" id="dw__loading">'.NL; + print '<div id="dw__loading">'.NL; print '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'.NL; print 'showLoadBar();'.NL; print '//--><!]]></script>'.NL; - print '<br /></div>'.NL; + print '</div>'.NL; flush(); //do quick pagesearch @@ -363,20 +363,24 @@ function html_search(){ //do fulltext search $data = ft_pageSearch($QUERY,$regex); if(count($data)){ + print '<dl class="search_results">'; $num = 1; foreach($data as $id => $cnt){ - print '<div class="search_result">'; + print '<dt>'; print html_wikilink(':'.$id,useHeading('navigation')?null:$id,$regex); if($cnt !== 0){ - print ': <span class="search_cnt">'.$cnt.' '.$lang['hits'].'</span><br />'; + print ': '.$cnt.' '.$lang['hits'].''; + } + print '</dt>'; + if($cnt !== 0){ if($num < FT_SNIPPET_NUMBER){ // create snippets for the first number of matches only - print '<div class="search_snippet">'.ft_snippet($id,$regex).'</div>'; + print '<dd>'.ft_snippet($id,$regex).'</dd>'; } $num++; } - print '</div>'; flush(); } + print '</dl>'; }else{ print '<div class="nothing">'.$lang['nothingfound'].'</div>'; } |