HINT ALL THE TYPES. SIMPLE ALL THE EXTENSIONS.

This commit is contained in:
Shish
2012-02-08 11:24:25 +00:00
parent 9707c1f7ce
commit 4697e21fcd
43 changed files with 492 additions and 535 deletions

View File

@ -20,7 +20,7 @@
*/
class RandomImage extends SimpleExtension {
public function onPageRequest($event) {
public function onPageRequest(PageRequestEvent $event) {
global $config, $database, $page, $user;
if($event->page_matches("random_image")) {
if($event->count_args() == 1) {
@ -51,13 +51,13 @@ class RandomImage extends SimpleExtension {
}
}
public function onSetupBuilding($event) {
public function onSetupBuilding(SetupBuildingEvent $event) {
$sb = new SetupBlock("Random Image");
$sb->add_bool_option("show_random_block", "Show Random Block: ");
$event->panel->add_block($sb);
}
public function onPostListBuilding($event) {
public function onPostListBuilding(PostListBuildingEvent $event) {
global $config, $page;
if($config->get_bool("show_random_block")) {
$image = Image::by_random($event->search_terms);