Wikka Mod 016

Type: Feature Addition

Credit:

ErusUmbrae
WakkaIndex3 @ WakkaWiki


This is not the exact code that Umbrae contributed. It's a modified version of pageindex from 0.1.3-dev with a small bit inserted:
if ($page['owner'] != '')
{                      
    if ($this->UserName() == $page['owner'])
        print(" . . . . one of your pages.");
    else
        print(" . . . . Owner: ".$this->Format($page['owner']));
}
print("<br />\n");  



Here is the whole file.
actions/pageindex.php
<?php

if ($pages = $this->LoadAllPages())
{
    foreach ($pages as $page)
    {
        if (!preg_match("/^Comment/", $page["tag"])) {
            $firstChar = strtoupper($page["tag"][0]);
            if (!preg_match("/[A-Z,a-z]/", $firstChar)) {
                $firstChar = "#";
            }

            if ($firstChar != $curChar) {
                if ($curChar) print("<br />\n");
                print("<strong>$firstChar</strong><br />\n");
                $curChar = $firstChar;
            }

            print($this->Link($page["tag"]));
                if ($page['owner'] != '')
                {                      
                if ($this->UserName() == $page['owner'])
                    print(" . . . . <i>one of your pages.</i>");
                    else
                        print(" . . . . <i>Owner: ".$this->Format($page['owner'])."</i>");
                }

                print("<br />\n")
        }
    }
}
else
{
    print("<em>No pages found.</em>");
}

?>
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki