Revision history for BacklinksHandler


Revision [19306]

Last edited on 2008-01-28 00:14:45 by JavaWoman [Modified links pointing to docs server]

No Differences

Revision [17241]

Edited on 2007-07-08 02:17:17 by JavaWoman [added release info]
Additions:
<<This feature was implemented in the 1.1.6.2. release<<>>==See also:==
Documentation: BacklinksHandlerInfo.>>
This is the development page for the backlinks handler.
Deletions:
{{svn}}
>>==See also:==
Documentation: BacklinksHandlerInfo.>>This is the development page for the backlinks handler.::c::


Revision [17227]

Edited on 2007-07-07 15:51:48 by JavaWoman [updated Martin Burger link in **code**]
Additions:
* @author {@link http://www.wakkawiki.com/MartinBurger Martin Burger} - original idea and code.
Deletions:
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code.


Revision [11942]

Edited on 2005-11-22 22:14:41 by DarTar [adding svn link]
Additions:
{{svn}}


Revision [11941]

Edited on 2005-11-22 21:22:58 by DarTar [adding i18n strings]
Additions:
* @version 0.3
// User-interface: strings
define('PAGE_TITLE','Pages linking to %s');
define('ERROR_NO_BACKLINKS','There are no backlinks to this page.');
// build backlinks list
echo $this->Format('=== '.sprintf(PAGE_TITLE,'[['.$this->tag.']]').' === --- ---');
print ERROR_NO_BACKLINKS;
Deletions:
* @version 0.2
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
print("There are no backlinks to this page.");


Revision [8565]

Edited on 2005-05-28 10:52:54 by JavaWoman [move to subcategory]
Additions:
=====Backlinks Handler=====

>>==See also:==
Documentation: BacklinksHandlerInfo.>>This is the development page for the backlinks handler.::c::

Nothing more than a couple of minor modifications to the WakkaBacklinksHandler.
The handler shows a **list of pages linking to the current page**.
Given the strong page-dependence of this function, I think it makes more sense to have it work as a //handler// than an //action//.

To install it just save the code block below as ##handlers/page/backlinks.php##
Use it as any other handler, appending ##/backlinks## to the page URL.
__Note__: the backlinks handler is available for testing on this server.

%%(php)

<div class="page">
<?php
/**
* Displays a list of internal pages linking to the current page.
*
* Usage: append /backlinks to the URL of the page
*
* This handler retrieves a list of internal pages linking to the current page.
* It first checks if they exist and prints them on the screen.
*
* @package Handlers
* @subpackage
* @name backlinks
*
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code.
* @author {@link http://wikka.jsnx.com/DarTar Dario Taraborelli} - code rewritten, ExistsPage check added, removed links array.
* @version 0.2
* @since Wikka 1.1.6.X
*
* @todo
*
*/
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
if ($pages = $this->LoadPagesLinkingTo($this->tag)) {
foreach ($pages as $page) {
if ($this->ExistsPage($page['tag'])) {
print $this->Link($page['tag']).'<br />';
}
}
} else {
print("There are no backlinks to this page.");
}
?>
</div>

%%

----
CategoryDevelopmentHandlers
Deletions:
=====Backlinks Handler=====

>>==See also:==
Documentation: BacklinksHandlerInfo.>>This is the development page for the backlinks handler.::c::

Nothing more than a couple of minor modifications to the WakkaBacklinksHandler.
The handler shows a **list of pages linking to the current page**.
Given the strong page-dependence of this function, I think it makes more sense to have it work as a //handler// than an //action//.

To install it just save the code block below as ##handlers/page/backlinks.php##
Use it as any other handler, appending ##/backlinks## to the page URL.
__Note__: the backlinks handler is available for testing on this server.

%%(php)

<div class="page">
<?php
/**
* Displays a list of internal pages linking to the current page.
*
* Usage: append /backlinks to the URL of the page
*
* This handler retrieves a list of internal pages linking to the current page.
* It first checks if they exist and prints them on the screen.
*
* @package Handlers
* @subpackage
* @name backlinks
*
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code.
* @author {@link http://wikka.jsnx.com/DarTar Dario Taraborelli} - code rewritten, ExistsPage check added, removed links array.
* @version 0.2
* @since Wikka 1.1.6.X
*
* @todo
*
*/
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
if ($pages = $this->LoadPagesLinkingTo($this->tag)) {
foreach ($pages as $page) {
if ($this->ExistsPage($page['tag'])) {
print $this->Link($page['tag']).'<br />';
}
}
} else {
print("There are no backlinks to this page.");
}
?>
</div>

%%

----
CategoryDevelopment


Revision [5324]

Edited on 2005-01-28 12:02:42 by DarTar [added ExistsPage check to prevent fantom backlinks from showing up]
Additions:
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original idea and code.
* @author {@link http://wikka.jsnx.com/DarTar Dario Taraborelli} - code rewritten, ExistsPage check added, removed links array.
if ($pages = $this->LoadPagesLinkingTo($this->tag)) {
foreach ($pages as $page) {
if ($this->ExistsPage($page['tag'])) {
print $this->Link($page['tag']).'<br />';
} else {
print("There are no backlinks to this page.");
}
Deletions:
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original code.
* @author {@link http://wikka.jsnx.com/DarTar Dario Taraborelli} - minor modifications, ExistsPage check added.
if ($pages = $this->LoadPagesLinkingTo($this->getPageTag())) {
foreach ($pages as $page) {
if ($this->ExistsPage($page['tag'])) {
$links[] = $this->Link($page["tag"]);
}
print(implode("<br>\n", $links));
} else {
print("There are no backlinks to this page.");


Revision [5322]

Edited on 2005-01-28 11:52:14 by DarTar [added ExistsPage check to prevent fantom backlinks from showing up]
Additions:
__Note__: the backlinks handler is available for testing on this server.


Revision [5318]

Edited on 2005-01-28 11:47:42 by DarTar [added ExistsPage check to prevent fantom backlinks form showing up]
Additions:
/**
* Displays a list of internal pages linking to the current page.
*
* Usage: append /backlinks to the URL of the page
*
* This handler retrieves a list of internal pages linking to the current page.
* It first checks if they exist and prints them on the screen.
*
* @package Handlers
* @subpackage
* @name backlinks
*
* @author {@link http://wakkawiki.de/MartinBurger Martin Burger} - original code.
* @author {@link http://wikka.jsnx.com/DarTar Dario Taraborelli} - minor modifications, ExistsPage check added.
* @version 0.2
* @since Wikka 1.1.6.X
*
* @todo
*
*/
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
if ($pages = $this->LoadPagesLinkingTo($this->getPageTag())) {
foreach ($pages as $page) {
if ($this->ExistsPage($page['tag'])) {
$links[] = $this->Link($page["tag"]);
}
}
print(implode("<br>\n", $links));
} else {
print("There are no backlinks to this page.");
}
?>
Deletions:
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
if ($pages = $this->LoadPagesLinkingTo($this->getPageTag())) {
foreach ($pages as $page) {
$links[] = $this->Link($page["tag"]);
}
print(implode('<br>\n', $links));
} else {
echo 'There are no backlinks to this page';
}

?>


Revision [5314]

Edited on 2005-01-28 10:28:21 by DarTar [Simple backlinks handler]
Additions:
=====Backlinks Handler=====
Documentation: BacklinksHandlerInfo.>>This is the development page for the backlinks handler.::c::
Nothing more than a couple of minor modifications to the WakkaBacklinksHandler.
The handler shows a **list of pages linking to the current page**.
Given the strong page-dependence of this function, I think it makes more sense to have it work as a //handler// than an //action//.
To install it just save the code block below as ##handlers/page/backlinks.php##
Use it as any other handler, appending ##/backlinks## to the page URL.
%%(php)
<div class="page">
<?php
echo $this->Format('=== Pages linking to '.$this->tag.'=== --- ---');
if ($pages = $this->LoadPagesLinkingTo($this->getPageTag())) {
foreach ($pages as $page) {
$links[] = $this->Link($page["tag"]);
}
print(implode('<br>\n', $links));
} else {
echo 'There are no backlinks to this page';
}

?>
</div>
%%
Deletions:
=====xxxxx Handler=====
Documentation: xxxxxHandlerInfo.>>This is the development page for the xxxxx handler.::c::
//This page is a **template**. It belongs to CategoryTemplate (which contains more handy templates). To create a handler development page, [[http://wikka.jsnx.com/HandlerTemplate/clone clone this page]] to a page called **xxxxxHandler** (where xxxxx is the (capitalized) name of the handler), replace all occurrences of 'xxxxx' with the name of the handler and replace this paragraph with the actual content.//


Revision [5312]

The oldest known version of this page was created on 2005-01-28 10:19:46 by DarTar [Simple backlinks handler]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki