aboutsummaryrefslogtreecommitdiff
path: root/mod/twitterservice/start.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-08 19:47:44 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-08 19:47:44 +0000
commit6d63838c2e56938e88cc59d1e0a62b651ed74f96 (patch)
tree575a9f042fd1d5ac3ff700fadecdfa9a55b0792b /mod/twitterservice/start.php
parent368f73b6df02f2e45d2d7c0cc57a50b6dbf6eb20 (diff)
downloadelgg-6d63838c2e56938e88cc59d1e0a62b651ed74f96.tar.gz
elgg-6d63838c2e56938e88cc59d1e0a62b651ed74f96.tar.bz2
Moving Twitter Service plugin from core into the plugins directory.
git-svn-id: http://code.elgg.org/elgg/trunk@5670 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/twitterservice/start.php')
-rw-r--r--mod/twitterservice/start.php43
1 files changed, 0 insertions, 43 deletions
diff --git a/mod/twitterservice/start.php b/mod/twitterservice/start.php
deleted file mode 100644
index 718db9ced..000000000
--- a/mod/twitterservice/start.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
- /**
- * Elgg Twitter Service.
- * This plugin provides a wrapper around David Grudl's twitter library and exposes some basic functionality.
- *
- * @package ElggSMS
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
-
- global $CONFIG;
- require_once($CONFIG->pluginspath . "twitterservice/vendors/twitter/twitter.class.php");
-
- function twitterservice_init() {
- // Listen for wire create event
- register_elgg_event_handler('create','object','twitterservice_wire_listener');
- }
-
- // Post a message to a twitter feed.
- function twitterservice_send($twittername, $twitterpass, $twittermessage) {
- $twitter = new Twitter($twittername, $twitterpass);
- return $twitter->send($twittermessage);
- }
-
- // Listen for thewire and push messages accordingly.
- function twitterservice_wire_listener($event, $object_type, $object) {
-
- if (($object) && ($object->subtype == get_subtype_id('object', 'thewire')) ) {
- if (get_plugin_usersetting('sendtowire', $object->owner_guid, 'twitterservice')=='yes') {
- $twittername = get_plugin_usersetting('twittername', $object->owner_guid, 'twitterservice');
- $twitterpass = get_plugin_usersetting('twitterpass', $object->owner_guid, 'twitterservice');
-
- if (($twittername) && ($twitterpass)) {
- twitterservice_send($twittername, $twitterpass, $object->description);
- }
- }
- }
- }
-
- register_elgg_event_handler('init','system','twitterservice_init');
-?> \ No newline at end of file