$[Pages that link to \$Group \$Name] $HTMLVSpace", 'markup:(:pagelist link=$FullName fmt=custom list=normal:)')); } else SDV($PageSearchFmt,array("

$[Search Results]

", 'markup:(:searchresults fmt=custom list=normal:)', 'wiki:$[PmWiki.SearchQuickReference]')); $FPLFunctions['custom'] = 'FPLCustom'; SDV($NoMatchesFmt,"
No matches.
"); $SearchTagFmt = (preg_match('/^search(insitu)?/',$action) || preg_match('/\.Search(Wiki)?$/',$pagename)) ? 'Searching Wiki' : "
". (($SearchInSitu) ? "" : "") . "$[Search Wiki]:
"; /* Markup('searchbox','>links','/\(:searchbox:\)/', FmtPageName("
", $pagename)); */ $SearchBoxFmt = "
"; SDV($ActDescription,'last modified'); if ($action=='search') { $ActDescription = 'search performed'; $text = stripmagic($_GET['q']); $jumpto=''; if (preg_match("/^$GroupPattern([\\/.])$NamePattern$/",$text)) $jumpto=$text; elseif (preg_match("/^$NamePattern$/",$text)) $jumpto = (isset($_GET['group'])) ? stripmagic($_GET['group']).".$text" : FmtPageName("\$Group.$text",$pagename); if ($jumpto && PageExists($jumpto)) Redirect($jumpto); } SDV($PublishSearch,false); SDV($PublishSearchChecked,false); SDV($CategoryGroup,'Category'); XLSDV('en',array( 'SearchFor' => (($action=='search' || isset($_GET['needle'])) ? 'Results of searching $Haystack for $Needle.' : 'Pages in the $Name $Group'), 'SearchFound' => '$MatchCount pages found out of $MatchSearched pages searched.')); if ($PublishSearch) { if (@$_GET['format']=='makepdf') { $QUERY_STRING = str_replace('format=makepdf','format=pdf',$_SERVER['QUERY_STRING']); Redirect($pagename,"\$ScriptUrl?$QUERY_STRING"); } else { $checked = ($PublishSearchChecked) ? "checked='checked'" : ''; $FPLByGroupStartFmt = "
"; $FPLByGroupEndFmt = "
$HTMLVSpace "; $FPLByGroupEndFmt .= (FmtPageName('$Group',$pagename)==$CategoryGroup) ? "" : " "; $FPLByGroupEndFmt .= "$PDFCheckboxFmt
"; $FPLByGroupGFmt = "
\$Group
"; $FPLByGroupIFmt = "
\$Title
"; } } function Needle($incl,$excl) { $n = str_replace('$LQ$RQ','','$LQ'.join('$RQ and $LQ',$incl).'$RQ'); foreach($excl as $w) { $n .= " not \$LQ$w\$RQ"; } if ($n) return str_replace('$LQ','‘', str_replace('$RQ','’',htmlspecialchars(trim($n)))); else return 'all'; } function FPLCustom($pagename,&$matches,$opt) { global $NoMatchesFmt,$FmtV,$FmtP; $FmtV['$Haystack'] = ($GLOBALS['SearchGroup']) ? '‘'.$GLOBALS['SearchGroup'].'’ group' : 'all groups'; $FmtV['$Needle'] = (@$opt['link']) ? '‘'.$opt['link'].'’ links' : Needle($GLOBALS['SearchIncl'],$GLOBALS['SearchExcl']); $r = FPLByGroup($pagename,$matches,$opt); return (count($matches)==0) ? $NoMatchesFmt : $r; } function HandleSearch($pagename, $level='read') { global $HandleSearchFmt,$PageStartFmt,$PageSearchFmt,$PageEndFmt,$FmtP; $FmtP['/\\$LastModified/e'] = '$GLOBALS[\'CurrentTime\']'; SDV($HandleSearchFmt,array(&$PageStartFmt, &$PageSearchFmt, &$PageEndFmt)); PrintFmt($pagename,$HandleSearchFmt); } ?>