Created
June 6, 2011 22:56
-
-
Save dkobia/1011300 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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