📄 swedish.cf
字号:
# $Id: swedish.cf, v1.0 2002/12/16 by Anders Wandahl <aw@kib.ki.se> translated from# german.cf,v 1.01 2002/09/05 by Harald Weinreich <harald@weinreichs.de>## Swedish language modifications for modern.cf output definition file.## A hash (#) in the first column denotes a comment and is not processed# even inside a definition. Hashes not in the first column are left as-is.## Variable substitution occurs on these definitions. If you want# a dollar-sign ($) to occur in the output, escape it with backslash (\).# Other metacharacters (quotes, asterisks, etc) probably don't need to be# escaped. Printf-like special characters are allowed: \n \t \r etc.## The ending newline is chopped off from each definiton. So## <FooBar># abcxyz# </FooBar>## becomes "abcxyz". You may have blank lines in between the beginning# and ending tags, or use the newline character \n.### CGI defaults are set in modern.cf<Default>charset : ISO-8859-1</Default>############################################################################### RESULT SECTION## The output of '{nph-}search.cgi' consists of the following tags:## ResultHeader - modified# CreateNavBars# ResultSetBegin# ( Errors from 'broker' )# foreach object {# PrintObject# }# ResultSetEnd# EndBrokerResults# ( TruncateWarning )# ResultTrailer################################################################################# First output for the HTML containing the results. Should probably include# <TITLE> tag and the user query.#<ResultHeader><HEAD><TITLE>Sökresultat för: $html_query</TITLE><style><!--dt { margin-left:1px; }dd { margin-left:40px; }// --></style></HEAD><BODY bgcolor=white><H2>Sökresultat för: <font color="#800000">$html_query</font></H2>$filterhint</ResultHeader># Calculations to obtain $navigationBar# Original code by Javier Masa Marin <masa@rediris.es>#<CreateNavBars>if ($totalPages > 0){ # elements before and after current page in navigation bar local($navPart) = 5; $prevPage = ""; $prevPage = "\n\n<a href=\"".&create_link($page-1)."\"><= Föregående</a> ·" if ($page > 1); $nextPage = ""; $nextPage = "· <a class=\"navBar\" href=\"".&create_link($page+1)."\">Nästa =></a>" if ($page < $totalPages); $pageList = ""; local($startP) = ($page <= $navPart) ? 1 : $page - $navPart; for ($i = $startP; $i < $page; $i++) { $pageList .= "<a href=\"".&create_link($i)."\">$i</a>\n"; } $pageList .= "<b><font color=\"#800000\" size=+1>$page</font></b>\n"; local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart; for ($i = $page+1; $i <= $endP; $i++) { $pageList .= "\n<a href=\"".&create_link($i)."\">$i</a>\n"; } $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1);}</CreateNavBars># Output just before beginning the loop over objects returned by the broker.#<ResultSetBegin><form method="GET" action="/Harvest/cgi-bin/search.cgi">\n<table border="0" cellspacing=0 cellpadding=4 width="100%"><tr bgcolor="#E0E0E0"> <td align=left width="20%" nowrap> $totnumber objekt funna </td> <td align=center width="60%"> $navigationBar </td> <td align=right width="20%"> Sida: $page/$totalPages </td></tr><tr><td align=middle colspan=3> <input type=hidden name=broker value="$broker"> <input type=hidden name=hp_url value="$hp_url"> <input type=hidden name=caseflag value="$RQ{'caseflag'}"> <input type=hidden name=wordflag value="$RQ{'wordflag'}"># <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}"># <input type=hidden name=descflag value="$RQ{'descflag'}"># <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}"># <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}"># <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}"> <input type=hidden name=weightflag value="$RQ{'weightflag'}"> <input type=hidden name=attribute value="@atts"> <input type=hidden name=brokerqueryconfig value="$RQ{'brokerqueryconfig'}"><a href="$hp_url">Ny sökning:</a> <input type=text name=query value='$RQ{'query'}'> <input type=submit value="Skicka"></td></tr></form></table><DL>\n</ResultSetBegin># output just after ending the loop over objects returned by the broker#<ResultSetEnd></DL><form method="GET" action="/Harvest/cgi-bin/search.cgi"><table border="0" width="100%" bgcolor="#E0E0E0"><tr> <td align="left" width="20%" nowrap> <input type=hidden name=broker value="$broker"> <input type=hidden name=hp_url value="$hp_url"> <input type=hidden name=caseflag value="$RQ{'caseflag'}"> <input type=hidden name=wordflag value="$RQ{'wordflag'}"># <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}"># <input type=hidden name=descflag value="$RQ{'descflag'}"># <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}"># <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}"># <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}"> <input type=hidden name=weightflag value="$RQ{'weightflag'}"> <input type=hidden name=attribute value="@atts"> <input type=hidden name=brokerqueryconfig value="$RQ{'brokerqueryconfig'}"> <a href="$hp_url">Ny sökning:</a> <input type=text name=query size=15 value='$RQ{'query'}'> <input type=submit value="Skicka"> </td> <td align="center" width="60%"> $navigationBar </td> <td align="right" width="20%"><a href="$CFG{'HarvestUrl'}"><img alt="Powered by Harvest" border="0" src="$harvestIcon"></a></td></table></form></ResultSetEnd># PER-OBJECT DEFINITIONS# ======================## VARIABLES:## $url Object url: http://www.cia.gov:3333/Spies/KGB/secret.html# $A URL Access: http# $H URL Host : www.cia.gov:3333# $P URL Path : /Spies/KGB/secret.html# $D URL Dir : /Spies/KGB/# $F URL File : secret.html# $cs_url URL to the SOIF object in the broker databse# $cs_[ahp] elements of $cs_url as above with $url# $desc Description attribute of the matched object# $opaque A matched line (or all matched lines in obj-at-a-time mode)# $usermsg A user message# $attributes Requested attributes# $objectType Type of object if not HTML# $objectSize Size of object# $objectDate Last modification date of object## PerObjectFunction is eval'd before every object is printed out.#<PerObjectFunction># init output variables$objectType="";$objectSize="";$objectUpdate="";$objectWeight = "";$opaquePerObjectCount = 1;$lastOpaqueObject = "";# create description$description = "<I>Datum:</I> $F";$description = $desc if (length($desc) > 5);# highlight search words.for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/<b>$1<\/b>/ig;}# Create the HTML code to print the weight ballsif ($maxWeight > 0 && $weightflag){ $nWeight = int($weight * 5 / $maxWeight); for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++) { $objectWeight .= "<img alt=\"*\" src=\"$weightIcon\">"; }# $objectWeight = "<font size=-1 color=#606060>".int($weight * 100 / $maxWeight)."%</font>";}# format matched linesif ($opaque ne '') { $opaque = "<strong>Träffar:</strong> $opaque..."}</PerObjectFunction># PerAttributeFunction is eval'd before the Attributes are printed out.#<PerAttributeFunction># Remove all empty lines$val =~ s/^(\s*)//mg;# Now prepare the object's type and size to display at the description.if ($att eq "type") { ## show file type $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/); $att=""; # avoid <FormatAttribute>} elsif ($att eq "file-size") { ## calculate file size $val = int($val/1024); $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte $val = int($val/10.24); $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg $att="";} elsif ($att eq "last-modification-time") { ## calculate last modification date local(@date,@months,$month,$minute,$year); @date = localtime($val); @months = ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'); $month = $months[$date[4]]; $minute = $date[1]; $minute = "0$minute" if $minute < 10; $year = $date[5]+1900; $objectUpdate = "$date[3]. $month $year"; # $date[2]:$minute"; $att="";} else { ## other attributes # insert commas to separate headings $val =~ s/\n(.)/, $1/mg; # If more than 120 Characters, display only the first 120 plus "..." $val =~ s/^((.|\n){120})(.|\n)*/$1.../; #highlight search words. for ($i=0; $i<=$#searchwords; $i++) { $val =~ s/(\b$searchwords[$i]\b)/<font color=#800000>$1<\/font>/ig; } $att =~ s/headings/Rubriker/;}</PerAttributeFunction># ======================================================================# ERROR, STATUS and WARNING functions# ======================================================================# A warning message printed only when the broker might have truncated# the result set. Only printed if the number of matched lines equals# the 'maxresultflag' or the number of returned objects equals the# 'maxobjflag' value of the query.html form.#<TruncateWarning><P><STRONG>VARNING: Sökresultatet avbröts vid $nopaquelinesmatchade rader och $nreturned funna objekt.</STRONG><P>\n</TruncateWarning># A warning message printed only when the broker returned 0 results.#<EmptySetWarning><H2>Din fråga <font color="#800000">$html_query</font> resulterade inte i några träffar.</H2><P>Försök formulera om frågan.<P>Förslag:<UL><LI>Kontrollera att alla ord är <B>rätt stavade</B>.<LI>Gör om sökningen med andra, färre eller <B>allmännare sökbegrepp</B>.<LI>Välj <B>sök del av ord</B> på söksidan för att även söka inom ord.<LI>Välj att<B> tillåta stavfel</B> på söksidan.</UL><BR>Se vidare den <A HREF="/Harvest/brokers/queryhelp.html"> engelskspråkiga hjälpen </A> till hur man formulerar frågor.<P>\n</EmptySetWarning># Error Message returned if there is no query string sent.#<NoQuery><H2>Du har inte angivit någon sökfråga.</H2>Skriv in minst ett ord.<BR><BR>\n</NoQuery># Error message if broker is not available.#<BrokerDown>#<BrokerDown>#</pre><P><H2>Sökmaskinen $host, port $port är för närvarande inte tillgänglig.</H2>Var god försök senare.<P></BrokerDown># Message returned if the broker sends back a# 111 - Broker is too heavily loaded# reply.#<BrokerLoad><H2>Sö:kmaskinen är överbelastad.</H2>Vi beklagar, men sökmasminen <STRONG>$host, port $port</STRONG>är för närvarande överbelastad. Fösök senare.<P></BrokerLoad># Message returned if the broker sends back a# 111 - PARSE ERROR# reply.#<ParseError><H2>Din sökfråga <font color="#800000">$html_query</font> har inte rätt syntax.</H2><P>Den <A HREF="/Harvest/brokers/queryhelp.html">engelska hjälpen</A> visar hur en sökfråga med korrekt syntax skall formuleras.<P><P>Problem vid sökningar har oftast föjande orsaker:<UL><LI><STRONG>Anföringstecken (citationstecken) har inte använts vid sökning på fraser eller reguljära uttryck.</STRONG><BR>T. ex. skall frasen:<BR><CODE>resistent mot antibiotika</CODE> anges som<BR><CODE>"resistent mot antibiotika"</CODE>.<LI>Det <em>reguljära uttrycket</em>:<BR><CODE>resist.* mot antibio.*</CODE> skall anges som<BR><CODE>"resist.* mot antibio.*"</CODE><LI>Notera att en <em>punkt</em>i ett sökbegrepp alltid måste omges av anföringstecken (t. ex. <CODE>"3.14"</CODE>).<BR><BR></UL><UL><LI><STRONG>Felaktig formulering vid sökning på attribut.</STRONG>.<BR>Strukturerade frågor sker med kolon (:), t. ex.<BR><CODE>Author: Berglund</CODE></UL>\n</ParseError>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -