\n");
SDV($FPLDictIndexEndFmt,'');
SDV($FPLDictIndexLFmt,"
▲ \$IndexLetter\n");
SDV($FPLDictIndexLEndFmt,"");
SDV($FPLDictIndexIFmt,"\$Title\n");
SDV($FPLDictIndexHeaderLink,"\n".'$IndexLetter');
$out = array();
$headerlinks= array();
if($Charset == 'UTF-8') {
$substrfn = 'mb_substr';
mb_internal_encoding('UTF-8');
}
else $substrfn = 'substr';
foreach($matches as $item) {
$pletter = $substrfn(@$item['=title'],0,1);
$FmtV['$IndexLetter'] = $pletter;
if (strcasecmp($pletter,@$lletter)!=0) {
if(@$lletter) { $out[] = FmtPageName($FPLDictIndexLEndFmt,@$item['pagename']); }
$out[] = FmtPageName($FPLDictIndexLFmt,@$item['pagename']);
$headerlinks[] = FmtPageName($FPLDictIndexHeaderLink,@$item['pagename']);
$lletter = $pletter;
}
$out[] = FmtPageName($FPLDictIndexIFmt,@$item['pagename']);
}
if(!empty($headerlinks)) { $out[] = FmtPageName($FPLDictIndexLEndFmt,@$item['pagename']); }
$FmtV['$IndexLinks']=implode(' • ',$headerlinks);
$show_letter_links = isset($opt['letterlinks']) ? $opt['letterlinks'] : $DictIndexShowLetterLinksByDefault;
return
FmtPageName(($show_letter_links ? "
" : ""),$pagename) .
FmtPageName($FPLDictIndexStartFmt,$pagename) .
implode('',$out) .
FmtPageName($FPLDictIndexEndFmt,$pagename);
}