Skip to content

Instantly share code, notes, and snippets.

@dkobia
Created June 6, 2011 22:56
Show Gist options
  • Save dkobia/1011300 to your computer and use it in GitHub Desktop.
Save dkobia/1011300 to your computer and use it in GitHub Desktop.
<?php defined('SYSPATH') or die('No direct script access.');
class hello_world {
public function __construct()
{
$block = array(
"classname" => "hello_world",
"name" => "Hello World",
"description" => "Ushahidi extensible content blocks"
);
// Register the block in the system so that its visible
blocks::register($block);
}
/**
* The block itself
*/
public function block()
{
blocks::open(); // Helper Function to open block
blocks::title("Hello World!"); // Helper function to add a block title
// The Blocks HTML
// You can echo it out, use HTML, and/or use Views
?>
<strong>Ushahidi extensible content blocks</strong>
<?php
blocks::close(); // Helper Function to close block
}
}
new hello_world;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment