Exemple #1
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * Nexmo Data Provider
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\Nexmo
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'Nexmo', 'version' => '0.1', 'services' => array(Message_Type::SMS => TRUE, Message_Type::IVR => FALSE, Message_Type::EMAIL => FALSE, Message_Type::TWITTER => FALSE), 'options' => array('from' => array('label' => 'From', 'input' => 'text', 'description' => 'The from number', 'rules' => array('required')), 'secret' => array('label' => 'Secret', 'input' => 'text', 'description' => 'The secret value', 'rules' => array('required')), 'api_key' => array('label' => 'API Key', 'input' => 'text', 'description' => 'The API key', 'rules' => array('required')), 'api_secret' => array('label' => 'API secret', 'input' => 'text', 'description' => 'The API secret', 'rules' => array('required'))), 'links' => array('developer' => 'https://www.nexmo.com/', 'signup' => 'https://dashboard.nexmo.com/register'));
// Register the plugin
DataProvider::register_provider('nexmo', $plugin);
// Additional Routes
Route::set('nexmo_sms_callback_url', 'sms/nexmo(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'Nexmo'));
Exemple #2
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * SMSSync Data Providers
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\SMSSync
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'SMSSync', 'version' => '0.1', 'services' => array(Message_Type::SMS => TRUE, Message_Type::IVR => FALSE, Message_Type::EMAIL => FALSE, Message_Type::TWITTER => FALSE), 'options' => array('intro_step1' => array('label' => 'Step 1: Download the "SMSSync" app from the Android Market.', 'input' => 'read-only-text', 'description' => function () {
    return 'Scan this QR Code with your phone to download the app from the Android Market <img src="' . URL::site('/media/images/smssync.png', TRUE) . '" width="150"/>';
}), 'intro_step2' => array('label' => 'Step 2: Android App Settings', 'input' => 'read-only-text', 'description' => function () {
    return 'Turn on SMSSync and use the following link as the Sync URL: ' . URL::site('smssync', TRUE);
}), 'secret' => array('label' => 'Secret', 'input' => 'text', 'description' => 'Set a secret so that only authorized SMSSync devices can send/recieve message. You need to configure the same secret in the SMSSync App.', 'rules' => array('required'))), 'links' => array('developer' => 'http://smssync.ushahidi.com/', 'signup' => 'http://smssync.ushahidi.com/'));
// Register the plugin
DataProvider::register_provider('smssync', $plugin);
// Additional Routes
/**
 * SMS Callback url
 */
Route::set('smssync_sms_callback_url', 'sms/smssync(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'Smssync'));
/**
 * Legacy SMSSync Callback url
 */
Route::set('smssync_legacy_callback_url', 'smssync(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'Smssync'));
Exemple #3
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * FrontlineSMS Data Providers
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\FrontlineSMS
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'FrontlineSMS', 'version' => '0.1', 'services' => array(Message_Type::SMS => TRUE), 'options' => array('key' => array('label' => 'Key', 'input' => 'text', 'description' => 'The API key', 'rules' => array('required')), 'frontlinecloud_api_url' => array('label' => 'Frontlinecloud API URL', 'input' => 'text', 'description' => 'The API URL provided by Frontlinecloud', 'rules' => array('required'))), 'links' => array('overview' => 'http://www.frontlinesms.com/technologies/frontlinesms-overview/', 'download' => 'http://www.frontlinesms.com/technologies/download/'));
// Register the plugin
DataProvider::register_provider('frontlinesms', $plugin);
// Additional Routes
/**
 * SMS Callback url
 */
Route::set('frontlinesms_sms_callback_url', 'sms/frontlinesms(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'frontlinesms'));
/**
 * Legacy FrontlineSMS Callback url
 */
Route::set('frontlinesms_legacy_callback_url', 'frontlinesms(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'frontlinesms'));
Exemple #4
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * Email Data Provider
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\Email
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'Email', 'version' => '0.1', 'services' => array(Message_Type::SMS => FALSE, Message_Type::IVR => FALSE, Message_Type::EMAIL => TRUE, Message_Type::TWITTER => FALSE), 'options' => array('intro_text' => array('label' => '', 'input' => 'read-only-text', 'description' => 'In order to receive reports by email, please input your email account settings below'), 'incoming_type' => array('label' => 'Incoming Server Type', 'input' => 'radio', 'description' => '', 'options' => array('POP', 'IMAP'), 'rules' => array('required', 'number')), 'incoming_server' => array('label' => 'Incoming Server', 'input' => 'text', 'description' => '', 'description' => 'Examples: mail.yourwebsite.com, imap.gmail.com, pop.gmail.com', 'rules' => array('required')), 'incoming_port' => array('label' => 'Incoming Server Port', 'input' => 'text', 'description' => 'Common ports: 110 (POP3), 143 (IMAP), 995 (POP3 with SSL), 993 (IMAP with SSL)', 'rules' => array('required', 'number')), 'incoming_security' => array('label' => 'Incoming Server Security', 'input' => 'radio', 'description' => '', 'options' => array('None', 'SSL', 'TLS')), 'incoming_username' => array('label' => 'Incoming Username', 'input' => 'text', 'description' => '', 'placeholder' => 'Email account username', 'rules' => array('required')), 'incoming_password' => array('label' => 'Incoming Password', 'input' => 'text', 'description' => '', 'placeholder' => 'Email account password', 'rules' => array('required')), 'outgoing_type' => array('label' => 'Outgoing Server Type', 'input' => 'radio', 'description' => '', 'options' => array('SMTP', 'sendmail', 'Native')), 'outgoing_server' => array('label' => 'Outgoing Server', 'input' => 'text', 'description' => 'Examples: smtp.yourhost.com, smtp.gmail.com', 'rules' => array('required')), 'outgoing_port' => array('label' => 'Outgoing Server Port', 'input' => 'text', 'description' => 'Common ports: 25 (SMTP default), 465 (SMTP with SSL)', 'rules' => array('required', 'number')), 'outgoing_security' => array('label' => 'Outgoing Server Security', 'input' => 'radio', 'description' => '', 'options' => array('None', 'SSL', 'TLS')), 'outgoing_username' => array('label' => 'Outgoing Username', 'input' => 'text', 'description' => '', 'placeholder' => 'Email account username', 'rules' => array('required')), 'outgoing_password' => array('label' => 'Outgoing Password', 'input' => 'text', 'description' => '', 'placeholder' => 'Email account password', 'rules' => array('required')), 'from_name' => array('label' => 'Email Sender Name', 'input' => 'text', 'description' => 'Appears in the \'from:\' field on outgoing emails', 'rules' => array('required'))), 'links' => array());
// Register the plugin
DataProvider::register_provider('email', $plugin);
Exemple #5
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * Twilio Data Provider
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\Twilio
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'Twilio', 'version' => '0.1', 'services' => array(Message_Type::SMS => TRUE, Message_Type::IVR => TRUE, Message_Type::EMAIL => FALSE, Message_Type::TWITTER => FALSE), 'options' => array('from' => array('label' => 'Phone Number', 'input' => 'text', 'description' => 'The from phone number. A Twilio phone number enabled for the type of message you wish to send. ', 'rules' => array('required')), 'account_sid' => array('label' => 'Account SID', 'input' => 'text', 'description' => 'The unique id of the Account that sent this message.', 'rules' => array('required')), 'auth_token' => array('label' => 'Auth Token', 'input' => 'text', 'description' => '', 'rules' => array('required')), 'sms_auto_response' => array('label' => 'SMS Auto response', 'input' => 'text', 'description' => '', 'rules' => array('required'))), 'links' => array('developer' => 'https://www.twilio.com', 'signup' => 'https://www.twilio.com/try-twilio'));
// Register the plugin
DataProvider::register_provider('twilio', $plugin);
// Additional Routes
/**
 * SMS Callback url
 */
Route::set('twilio_sms_callback_url', 'sms/twilio(/<action>)')->defaults(array('directory' => 'Sms', 'controller' => 'Twilio'));
/**
 * Ivr Callback url
 */
Route::set('twilio_ivr_callback_url', 'ivr/twilio(/<action>)')->defaults(array('directory' => 'Ivr', 'controller' => 'Twilio'));
Exemple #6
0
<?php

defined('SYSPATH') or die('No direct script access.');
/**
 * Twitter Data Provider
 *
 * @author     Ushahidi Team <*****@*****.**>
 * @package    DataProvider\Twitter
 * @copyright  2013 Ushahidi
 * @license    http://www.gnu.org/copyleft/gpl.html GNU General Public License Version 3 (GPLv3)
 */
// Plugin Info
$plugin = array('name' => 'Twitter', 'version' => '0.1', 'services' => array(Message_Type::SMS => FALSE, Message_Type::IVR => FALSE, Message_Type::EMAIL => FALSE, Message_Type::TWITTER => TRUE), 'options' => array('intro_step1' => array('label' => 'Step 1: Create a new Twitter application', 'input' => 'read-only-text', 'description' => function () {
    return 'Create a <a href="https://apps.twitter.com/app/new">new twitter application</a>';
}), 'intro_step2' => array('label' => 'Step 2: Generate a consumer key and secret', 'input' => 'read-only-text', 'description' => function () {
    return 'Once you\'ve created the application click on "Keys and Access Tokens".<br /> Then click "Generate Consumer Key and Secret".<br /> Copy keys, tokens and secrets into the fields below.';
}), 'consumer_key' => array('label' => 'Consumer Key', 'input' => 'text', 'description' => 'Add the consumer key from your Twitter app. ', 'rules' => array('required')), 'consumer_secret' => array('label' => 'Consumer Secret', 'input' => 'text', 'description' => 'Add the consumer secret from your Twitter app.', 'rules' => array('required')), 'oauth_access_token' => array('label' => 'Access Token', 'input' => 'text', 'description' => 'Add the access token you generated for your Twitter app.', 'rules' => array('required')), 'oauth_access_token_secret' => array('label' => 'Access Token Secret', 'input' => 'text', 'description' => 'Add the access secret that you generated for your Twitter app.', 'rules' => array('required')), 'twitter_search_terms' => array('label' => 'Twitter search terms', 'input' => 'text', 'description' => 'Add search terms separated with commas', 'rules' => array('required'))), 'links' => array('developer' => 'https://apps.twitter.com/'));
// Register the plugin
DataProvider::register_provider('twitter', $plugin);