[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: developer.kde.org
From: Adriaan de Groot <groot () kde ! org>
Date: 2005-08-25 18:38:14
Message-ID: 1124995094.850839.23652.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 453272 by adridg:
Allow 'negative' depths in webbrewery to mimic look of the rest of d.k.o better.
M +2 -0 documentation/library/api.content
M +11 -2 media/includes/classes/sitemapmenu.inc
--- trunk/developer.kde.org/documentation/library/api.content #453271:453272
@@ -1,3 +1,5 @@
+< / Developer Home
+< documentation/library/ Library Reference
documentation/library/libraryref API Manuals
> documentation/library/3.4-api/ KDE 3.4
> documentation/library/3.5-api KDE 3.5
--- trunk/developer.kde.org/media/includes/classes/sitemapmenu.inc #453271:453272
@@ -29,12 +29,14 @@
var $maplines;
var $loaded;
var $sitemap;
+ var $parents;
function SitemapMenu($ht = "",$file = "" )
{
global $site_root;
$this->maplines = array();
$this->loaded = false;
+ $this->parents = new UrlName;
if ($ht) {
$this->heretag = explode(";",$ht);
} else {
@@ -75,6 +77,10 @@
$this_parents = "";
while (!feof($map)) {
$line = fgets($map);
+ if (preg_match( "/^<\s*(-?)\s*([\w\/:~\.-][\w\/:~\.#-]*)\s+(.*)$/", $line, $matches)) {
+ $this->parents->push($matches[2],$matches[3]);
+ continue;
+ }
if (!preg_match( "/^\s*(>*)\s*(-?)\s*([\w\/:~\.-][\w\/:~\.#-]*)\s+(.*)$/", $line, $matches))
continue;
$item = new SitemapItem(strlen($matches[1]),$matches[2],$matches[3],$matches[4]);
@@ -244,6 +250,8 @@
{
$this->load_file();
$depth=0;
+ print 'Location: ';
+ $this->parents->show("/ ");
for ($i=0; ($i<count($this->maplines)) && ($depth<count($this->heretag)); $i++) {
if ($this->maplines[$i]->link == $this->heretag[$depth]) {
$page = $this->maplines[$i]->page;
@@ -363,6 +371,7 @@
{
$item = new Pair($url, $name);
array_push($this->items, $item);
+ print '<!-- Pair::push ' . $url . ' and ' . $name . ' -->';
}
function count()
@@ -377,7 +386,7 @@
for ($i=0; $i < $numitems; $i++)
{
$item = $this->items[$i];
- echo "<a href=\"$item->one\">$this->two</a>\n";
+ print '<a href="' . $item->one . '" >' . $item->two . "</a>\n";
if ($i < $numitems - 1)
echo " $sep ";
}
@@ -392,7 +401,7 @@
{
echo "<li>";
$item = $this->items[$i];
- echo "<a href=\"$item->one\">$this->two</a>\n";
+ echo "<a href=\"$item->one\">$item->two</a>\n";
echo "</li>\n";
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic