changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / edit / helptext.php
1 <?php
2 /*
3    If this plugin is loaded, it automatically fetches the contents of
4    "EditingHelp" and makes that display instead of the default editing
5    note.
6    
7    That page can contain one or two text snippets (then separated by
8    a horizontal line). Currently only works for English text.
9 */
10
11
12 $ewiki_plugins["edit_hook"][] = "ewiki_edit_helptext";
13 function ewiki_edit_helptext($id, &$data, &$hpost) {
14    global $ewiki_t;
15    if ($help = ewiki_db::GET("EditingHelp")) {
16       $help = ewiki_format( $help["content"] );
17       if ($l = strpos($help, "<hr")) {
18          $ewiki_t["en"]["EDIT_FORM_1"] = substr($help, 0, $l);
19          $l = strpos($help, ">", $l);
20          $help = substr($help, $l + 1);
21       }
22       $ewiki_t["en"]["EDIT_FORM_2"] = $help;
23    }
24 }
25
26 ?>