projects
/
atutor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
cbad84926943c1ed44f5f517479242cff4d82c38
[atutor.git]
/
mods
/
wiki
/
fragments
/
blocks
/
printhint.php
1
<?php
2
/*
3
Loads the page named "UsageHints" and randomly selects a
4
paragraph to output.
5
*/
6
7
if (true) {
8
if ($data = ewiki_db::GET("UsageHints")) {
9
10
$hints = preg_split("/\n+(---+\s*)?\n+/", trim($data["content"]));
11
$n = rand(0, count($hints)-1);
12
$text = $hints[$n];
13
14
if ($text) {
15
echo ewiki_format($text);
16
}
17
}
18
}
19
20
?>