head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2005.11.25.16.20.58;	author rse;	state dead;
branches;
next	1.1;
commitid	c9X5QxZIdGHCX9br;

1.1
date	2005.11.25.16.16.36;	author rse;	state Exp;
branches;
next	;
commitid	QD0QWcRaWs18W9br;


desc
@@


1.2
log
@rename files to be more pretty on the shell ;-)
@
text
@<script language="php">
##
##  Copyright (c) 2005 OpenPKG Foundation e.V. <http://openpkg.net/>
##  Copyright (c) 2005 Ralf S. Engelschall <http://engelschall.com/>
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##
##  canvas-navpath.php: canvas navigation path
##
</script>

<script language="php">
  divert("css");
</script>

SPAN.navpath {
	font-family:             sans-serif,helvetica,lucida,verdana,arial;
	font-size:               10pt;
	white-space:             nowrap;
    color:                   #bbbbbb;
}

<script language="php">
  $html = undivert("nav");
  $html = explode("\n", $html);
  $count = count($html);
  $list = Array();
  for ($i = 0; $i < $count; $i++) {
      if (preg_match("/<li id=\"(.+?)\">(<a[^>]+>.+?<\/a>)/", $html[$i], $match)) {
          $prefix = $match[1];
          if (preg_match("/^$prefix/", $path)) {
              array_push($list, "<span id=\"navpath.$prefix\">$match[2]</span>");
          }
      }
  }
  $html = implode(" &rarr; ", $list);
  $html = preg_replace("/(<span id=\"navpath.$path\")/s", "$1 class=\"active\"", $html);
  divert("canvas-nav");
  echo "<span class=\"navpath\" id=\"navpath\">\n";
  echo $html;
  echo "</span>\n";
</script>

@


1.1
log
@add navigation path (break crump style) implementation
@
text
@@

