4 enabling this will filter all BannedLinks through a page rank
5 killer (google.com itself or "fragments/zero_pagerank.php")
6 - you could use "plugins/edit/spam_deface" alternatively
7 - the advantage of _this_ plugin however is, that it always can
8 filter banned urls, while the plugins/edit/ version only works
9 at edit time (and if the URL was already listed on BannedLinks)
12 // define("ZERO_PAGERANK", "http://erfurtwiki.sourceforge.net/fragments/zero_pagerank.php?url=");
13 define("ZERO_PAGERANK", "http://www.google.com/url?sa=D&q=");
14 define("EWIKI_PAGE_BANNED", "BannedLinks");
15 $ewiki_config["info_refs_once"] = 1;
18 $ewiki_plugins["link_url"][] = "ewiki_link_url_zero_pagerank";
19 function ewiki_link_url_zero_pagerank(&$href, &$title) {
20 if (ewiki_banned_link($href)) {
21 $href = ZERO_PAGERANK . urlencode($href);
26 function ewiki_banned_link($href) {
29 #-- buffer list of banned urls
30 if (!isset($ewiki_config["banned"])) {
31 $data = ewiki_db::GET(EWIKI_PAGE_BANNED);
32 $ewiki_config["banned"] = trim(strtolower($data["refs"]));
36 if ($b = &$ewiki_config["banned"]) {
37 $href = strtolower(urldecode($href));
38 if (strpos($b, $href) !== false) {
41 foreach (explode("\n", $b) as $bad) {
42 if (strpos($href, $bad) !== false) {
49 if ($pf_a = $ewiki_plugins["ban_lookup"]) {
50 foreach ($pf_a as $pf) {