Subversion Repositories Applications.papyrus

Rev

Rev 831 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
831 florian 1
<?php
2
 
3
// This module demonstrates the use of settings for a Phorum module.
4
// This module will display a configurable string for a configurable
5
// number of times, right after the page header (how useful is that? :-).
6
 
7
if(!defined("PHORUM")) return;
8
 
9
function phorum_mod_example_settings_after_header () {
10
    $PHORUM = $GLOBALS["PHORUM"];
11
 
12
    // Apply default values for the settings.
13
    if (empty($PHORUM["mod_example_settings"]["displaytext"]))
14
        $PHORUM["mod_example_settings"]["displaytext"] = "Hello, world!";
15
    if (!isset($PHORUM["mod_example_settings"]["displaycount"]))
16
        $PHORUM["mod_example_settings"]["displaytext"] = 1;
17
 
18
    for ($i = 0; $i < $PHORUM["mod_example_settings"]["displaycount"]; $i++) {
19
        print $PHORUM["mod_example_settings"]["displaytext"] . " ";
20
    }
21
}
22
 
23
?>