I prefer to have a simple link at the bottom of every page instead of inserting an action on every page.

It needs only two steps:

First, put the following code into the new file /handlers/page/backlink.php:

<div class="page">
<?php
    $title = "Backlinks:";
    print("<strong>$title</strong><br /><br />\n");

    if ($pages = $this->LoadPagesLinkingTo($this->getPageTag())) {
        foreach ($pages as $page) {
            $links[] = $this->Link($page["tag"]);
        }
        print(implode("<br>\n", $links));
    } else {
        print("There are no backlinks to this page.");
    }

?>
</div>


Second, change the lines 29 - 32 of file /actions/footer.php in this way:

?>
    <a href="<?php echo $this->href("referrers") ?>" title="Click to view a list of URLs referring to this page.">Referrers</a> ::
    <a href="<?php echo $this->href("backlinks") ?>" title="Click to view a list of backlinks to this page.">Backlinks</a><br/>
    <div style="text-align: right;">Search: <input name="phrase" size="15" style="border: none; border-bottom: 1px solid #CCCCAA; padding: 0px; margin: 0px;" /></div>
</div>


That's all...
MartinBurger


CategoryDevelopmentHandlers
Comments
Comment by 202.189.96.218
2005-01-27 09:46:36
I tried that. But then I got an error on the footer.php

The error that I got was

Parse error: parse error, unexpected $ in /home/.kalid/mysite/wiki/actions/footer.php on line 63
Comment by DarTar
2005-01-28 10:29:34
check this: http://wikka.jsnx.com/BacklinksHandler
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki