f314538cbfca1feb4a4e5b94c8abec208e400446
[atutor.git] / mods / wiki / plugins / aview / backlinks.php
1 <?php
2
3 #
4 #  this plugin prints the "pages linking to" below a page (the same
5 #  information the "links/" action does)
6 #
7 # altered to use ewiki_get_backlinks() by AndyFundinger.
8
9 $ewiki_plugins["view_append"][] = "ewiki_view_append_backlinks";
10
11 function ewiki_view_append_backlinks($id, $data, $action) {
12     $pages = ewiki_get_backlinks($id);
13     
14     $o="";
15     foreach ($pages as $id) {
16         $o .= ' <a href="'.ewiki_script("",$id).'">'.$id.'</a>';
17     }
18     ($o) && ($o = "<div class=\"wiki_backlinks\"><small>Backlinks:</small><br />$o</div>\n");
19     
20     return($o);
21 }
22
23
24 ?>