projects
/
atutor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
changed git call from https to git readonly
[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
?>