Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add twilio plugin

  • Loading branch information...
commit 6355b2227f5989fb3b2a2fbe4c79e9e8ad08837e 1 parent d3c40e1
@joetric joetric authored
Showing with 23 additions and 34 deletions.
  1. +23 −34 plugins/twilio/hooks/twilio.php
View
57 plugins/twilio/hooks/twilio.php
@@ -1,36 +1,25 @@
-<?php defined('SYSPATH') or die('No direct script access.');
-/**
- * Twilio Hook
- *
- * PHP version 5
- * LICENSE: This source file is subject to LGPL license
- * that is available through the world-wide-web at the following URI:
- * http://www.gnu.org/copyleft/lesser.html
- * @author Joe Tricarico <jtricarico@azavea.com>
- * @package Ushahidi - http://source.ushahididev.com
- * @copyright Ushahidi - http://www.ushahidi.com
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License (LGPL)
- */
-
+<?php
class twilio {
-
- /**
- * Registers the main event add method
- */
- public function __construct()
- {
- // Hook into routing
- Event::add('system.pre_controller', array($this, 'add'));
- }
-
- /**
- * Adds all the events to the main Ushahidi application
- */
- public function add()
- {
- // SMS Provider
- plugin::add_sms_provider("twilio");
- }
+ public function __construct()
+ {
+ // Hook into routing
+ Event::add('system.pre_controller', array($this, 'add'));
+ }
+
+ public function add()
+ {
+ // Hook into main_sidebar event and call the twilio method
+ Event::add('ushahidi_action.main_sidebar', array($this, 'twilio'));
+ }
+
+ public function twilio()
+ {
+ // Print the words 'Hello World' in the front page side bar
+ #echo "Hello World!!!";
+ View::factory('twilio/myhtml')->render(TRUE);
+ }
+
}
-
-new frontlinesms;
+
+//instatiation of hook
+new twilio;
Please sign in to comment.
Something went wrong with that request. Please try again.