Wiki source for WakkaBacklinksHandler

Show raw source

=====Link for backlinks on all pages=====
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">
$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.");


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>

That's all...

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki