Revision history for WikiTrail


Revision [19449]

Last edited on 2008-01-28 00:16:02 by BrianKoontz [Modified links pointing to docs server]

No Differences

Revision [17843]

Edited on 2007-12-13 19:48:29 by BrianKoontz [Modified regexp]
Additions:
if ($param == 'list') {$list=htmlspecialchars($vars['list']);}
$pages = array();
//if we have a category as a list-page, get the pages belonging to the category
if (preg_match('/^Category/',$trailpage['tag']))
{
if ($this->CheckMySQLVersion(4,0,1))
{
$results = $this->FullCategoryTextSearch($trailpage['tag']);
}
else
{
$results = $this->FullTextSearch($trailpage['tag']);
}
foreach ($results as $cpage)
{
if (!preg_match('/^Category/', $cpage['tag']))
{
$pages[] = $cpage['tag'];
}
}
sort($pages);
}
else //search the page for a bulleted list containing Wikiwords
{
foreach(explode("\n",$trailpage['body']) as $x)
{
if (preg_match("/(~-|\\t-|~1\)|\\t1\)|~A\)|\\tA\)|~a\)|\\ta\)|~I\)|\\tI\)|~i\)|\\ti\))\\s?(\[\[)?([A-Za-z0-9ÄÖÜ]*)/",$x,$match))
{
$pages[] = $match[3];
}
}
}
//search the list of pages for this page and make the trail
for($i=0;$i<count($pages);$i++)
{
if (strtolower($pages[$i]) == strtolower($thispage))
{
$output .= '<span class="wikitrail">';
if ($i>0) $output .= $signleft.' '.$this->Link($pages[$i-1]).' '.$seperator.' ';
$output .= $this->Link($list);
if ($i+1<count($pages)) $output .= ' '.$seperator.' '.$this->Link($pages[$i+1]).' '.$signright;
$output .= '</span>';
}
}
Deletions:
if ($param == 'list') {$list=htmlspecialchars($vars['list']);}
$pages = array();
//if we have a category as a list-page, get the pages belonging to the category
if (preg_match('/^Category/',$trailpage['tag']))
{
if ($this->CheckMySQLVersion(4,0,1))
{
$results = $this->FullCategoryTextSearch($trailpage['tag']);
}
else
{
$results = $this->FullTextSearch($trailpage['tag']);
}
foreach ($results as $cpage)
{
if (!preg_match('/^Category/', $cpage['tag']))
{
$pages[] = $cpage['tag'];
}
}
sort($pages);
}
else //search the page for a bulleted list containing Wikiwords
{
foreach(explode("\n",$trailpage['body']) as $x)
{
if (preg_match("/(~-|\\t-|~1\)|\\t1\)|~A\)|\\tA\)|~a\)|\\ta\)|~I\)|\\tI\)|~i\)|\\ti\))\\s?(\[\[)?([A-Z,a-z,0-9,ÄÖÜ]*)\\s/",$x,$match))
{
$pages[] = $match[3];
}
}
}
//search the list of pages for this page and make the trail
for($i=0;$i<count($pages);$i++)
{
if (strtolower($pages[$i]) == strtolower($thispage))
{
$output .= '<span class="wikitrail">';
if ($i>0) $output .= $signleft.' '.$this->Link($pages[$i-1]).' '.$seperator.' ';
$output .= $this->Link($list);
if ($i+1<count($pages)) $output .= ' '.$seperator.' '.$this->Link($pages[$i+1]).' '.$signright;
$output .= '</span>';
}
}


Revision [6994]

Edited on 2005-03-29 14:29:23 by NilsLindenberg [layout]
Additions:
""<< previous page | trail-page | next page >>""
===Comments?===
Deletions:
"<< previous page | trail-page | next page >>"
==Comments?===


Revision [6993]

The oldest known version of this page was created on 2005-03-29 14:28:49 by NilsLindenberg [layout]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki