This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/contrib/news/main.php
2009-05-11 14:09:24 -07:00

25 lines
601 B
PHP

<?php
/**
* Name: News
* Author: Shish <webmaster@shishnet.org>
* License: GPLv2
* Description: Show a short amount of text in a block on the post list
* Documentation:
* Any HTML is allowed
*/
class News extends SimpleExtension {
public function onPostListBuilding($event) {
global $config, $page;
if(strlen($config->get_string("news_text")) > 0) {
$this->theme->display_news($page, $config->get_string("news_text"));
}
}
public function onSetupBuilding($event) {
$sb = new SetupBlock("News");
$sb->add_longtext_option("news_text");
$event->panel->add_block($sb);
}
}
?>