changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / linking / xfn.php
1 <?php
2 /*
3    The [http://gmpg.org/xfn/] XHTML Friends Network spec leverages HTML4
4    link syntax (the rel= attribute) to allow connecting persons (homepages)
5    by each other using relationship meta data notes. In Wiki you would
6    just prefix links from your to another ones user page, like for example
7    - friend:met:SomeOne
8    - co-resident:OtherPerson
9    
10    You should then also add following to yoursite, to denote the use of
11    XFN meta data:
12       <head profile="http://gmpg.org/xfn/1">
13
14    This plugin allows a few more technical (non-person-related) page meta
15    link flags, like "unlink" to defend against untruthful backlinks.
16 */
17
18
19 $ewiki_config["xhtml_rel"] = array(
20    "friend", "acquaintance",
21    "met",
22    "child", "parent", "sibling", "spouse",
23    "co-resident", "neighbor",
24    "co-worker", "colleague",
25    "muse", "crush", "date", "sweatheart",
26  #-- not XFN --
27    "unlink",                      // anti-link (against XFN spam)
28    "near", "contains", "partof",  // for things
29 );
30
31
32 $ewiki_plugins["interxhtml"][] = "ewiki_interxhtml_xfn";
33
34 function ewiki_interxhtml_xfn($prefix, &$page, &$s) {
35    global $ewiki_config;
36
37    if (in_array($ewiki_config["xhtml_rel"], $prefix)) {
38       $s["xhtml"]["rel"] = trim($s["xhtml"]["rel"] . " $prefix");
39    }
40 }
41
42
43 ?>