From: moodler Date: Sat, 29 Jan 2005 03:48:45 +0000 (+0000) Subject: Added Jon's html block from contrib! Thanks, Jon! X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=86db09ef85af22f499e5005ea5b6f8b057453bce;p=moodle.git Added Jon's html block from contrib! Thanks, Jon! --- diff --git a/blocks/html/block_html.php b/blocks/html/block_html.php new file mode 100755 index 0000000000..20b4c56805 --- /dev/null +++ b/blocks/html/block_html.php @@ -0,0 +1,36 @@ +title = get_string('html', 'block_html'); + $this->content_type = BLOCK_TYPE_TEXT; + $this->version = 2004123000; + } + + function specialization() { + // Does not check if $this->config or $this->config->title + // are empty because if they are then the user wishes the title + // of the block to be hidden anyway + $this->title = $this->config->title; + } + + function instance_allow_multiple() { + return true; + } + + function get_content() { + global $CFG; + require_once($CFG->dirroot .'/lib/weblib.php'); + if ($this->content !== NULL) { + return $this->content; + } + + $this->content = new stdClass; + $this->content->text = $this->config->text; + $this->content->footer = ''; + + return $this->content; + } +} +?> diff --git a/blocks/html/config_instance.html b/blocks/html/config_instance.html new file mode 100755 index 0000000000..965b5a2fc9 --- /dev/null +++ b/blocks/html/config_instance.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + +

:

()

:

config->text); ?>
+
+ \ No newline at end of file diff --git a/lang/en/block_html.php b/lang/en/block_html.php new file mode 100755 index 0000000000..35ec4c9717 --- /dev/null +++ b/lang/en/block_html.php @@ -0,0 +1,8 @@ + \ No newline at end of file