home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / FAQ / cgi-bin / discus4_00 / source / srchres1.tmpl < prev    next >
Text File  |  2009-11-06  |  4KB  |  118 lines

  1. # FILE: srchres1.tmpl
  2. # DESCRIPTION: Search Engine Results, keyword searching
  3. # Copyright (c) 2002, DiscusWare, LLC, all rights reserved
  4. # -------------------------------------------------------------------------------------------
  5.  
  6. <!--BEGIN-->
  7.  
  8. <html>
  9. <head>
  10. <title>$L{SEARCH_ENGINE_TITLE}</title>
  11. <style>
  12. <!--
  13. body { font-family: $color->{face}; line-spacing: 0 }
  14. td.nb { font: 10pt $color->{face} }
  15. td.b { font: 10pt $color->{face}; font-weight: bold; }
  16. -->
  17. </style>
  18. <#define $pagetitle = "$L{SEARCH_ENGINE_TITLE}"#>
  19. <#insert part () "dynamic_top"#>
  20. <#if $browser->{dhtml} == 0#><font face="$color->{face}" size="$color->{size}">
  21.  
  22. <#if $general->{matches} == 0#>
  23.     <#if $general->{too_general} == 1#>
  24.         $L{SEARCH_ENGINE_TOO_GENERAL}
  25.     <#else#>
  26.         $L{SEARCH_ENGINE_0_HITS}
  27.     <#endif#>
  28.     <#insert part () "dynamic_bottom"#>
  29.     <#exit#>
  30. <#endif#>
  31. <#if $general->{matches} == 1#>
  32.     $L{SEARCH_ENGINE_1_HIT}
  33. <#else#>
  34.     <#define $l = "$L{SEARCH_ENGINE_MATCHES}"#>
  35.     <#replace "%lower" with "$general->{lower}" in $l#>
  36.     <#replace "%upper" with "$general->{upper}" in $l#>
  37.     <#replace "%total" with "$general->{matches}" in $l#>
  38.     $l
  39. <#endif#>
  40.  
  41. <#foreach $result (@array)#>
  42.     <#if $result->{url} ne ""#>
  43.         <#define $baseurl = "$result->{url}"#>
  44.     <#else#>
  45.         <#if $result->{secure}#>
  46.             <#define $baseurl = "$DCONF->{authorize_reader}?file=/$result->{topic}/$result->{page}.$ext"#>
  47.         <#else#>
  48.             <#define $baseurl = "$DCONF->{message_url}/$result->{topic}/$result->{page}.$ext"#>
  49.         <#endif#>
  50.     <#endif#>
  51.     <p>
  52.     <b>$result->{number}.
  53.     <#reference array @parents from $result->{parents}#>
  54.     <#if $result->{target} ne ""#>
  55.         <a href="$baseurl" target="$result->{target}">\
  56.     <#else#>
  57.         <a href="$baseurl">\
  58.     <#endif#>
  59.     <#foreach $qpq (@parents)#>
  60.         $qpq->{name}\
  61.         <#if $qpq->{_is_last_element} == 0#>: <#endif#>\
  62.     <#endloop#>
  63.     </a></b><br>
  64.     <font size="1">
  65.     <#reference array @matches from $result->{matches}#>
  66.     <#foreach $match (@matches)#>
  67.         <#if $match->{_iteration} > 5#>
  68.             <#last#>
  69.         <#endif#>
  70.         <#repeated 5 " "#>• \
  71.         <#define $l = "$match->{text}"#>
  72.         <#replace "%open" with "<a href="$baseurl#POST$match->{postindex}"><b>" in $l#>
  73.         <#replace "%close" with "</b></a>" in $l#>
  74.         $l<br>
  75.     <#endloop#>
  76.     <#repeated 5 " "#>\
  77.         <#if $result->{matchnum} > 0#>
  78.             $L{SEARCH_ENGINE_MATCHING_POSTS} $result->{matchnum},
  79.         <#endif#>
  80.         <#if $result->{lastmod} > 0#>
  81.             $L{SEARCH_ENGINE_POSTS_THIS_PAGE} $result->{post_count}<br>
  82.             <#repeated 5 " "#>\
  83.             $L{SEARCH_ENGINE_LAST_MODIFIED} <#date $result->{lastmod} format "%day-%mon.-%year %24hour:%minute"#>,
  84.         <#endif#>
  85.         $L{SEARCH_ENGINE_SCORE} $result->{score}%
  86.     </font>
  87.     </p>
  88. <#endloop#>
  89.  
  90. <#if $general->{matches} > $general->{perpage}#>
  91.     <#define $j = "0"#>
  92.     <#define $url = "$script_url/search.$cgi_extension?cache=$general->{cache}&rpp=$general->{perpage}"#>
  93.     <#if $general->{prev} < $general->{start}#>
  94.         <a href="$url&start=$general->{prev}">$L{KEYWORD_RESULTS_PREV}</a>
  95.     <#else#>
  96.         $L{KEYWORD_RESULTS_PREV}
  97.     <#endif#>
  98.     <#for $i = 1 to $general->{matches} step $general->{perpage}#>
  99.         <#math: $j += 1#>
  100.         <#if $i == $general->{start}#>
  101.             <b>$j</b>
  102.         <#else#>
  103.             <a href="$url&start=$i">$j</a>
  104.         <#endif#>
  105.         <#if $GLOBAL_OPTIONS{search_link_limit} == 1 && $j >= $GLOBAL_OPTIONS{search_link_limit_value}#>
  106.             <#last#>
  107.         <#endif#>
  108.     <#endfor#>
  109.     <#if $general->{next} <= $general->{matches}#>
  110.         <a href="$url&start=$general->{next}">$L{KEYWORD_RESULTS_NEXT}</a>
  111.     <#else#>
  112.         $L{KEYWORD_RESULTS_NEXT}
  113.     <#endif#>
  114. <#endif#>
  115.  
  116. <#insert part () "dynamic_bottom"#>
  117. <!--END-->
  118.