aboutsummaryrefslogtreecommitdiff
path: root/mod/twitterservice/start.php
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:01:31 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-15 12:01:31 +0000
commite463f5079c9eef80350184cdb8af968dc416e90e (patch)
tree09b763caa2b477a85cd78146b6c38ee6fc3488d2 /mod/twitterservice/start.php
parent67b6b75b0271228dbe0fd27656ec67c66001fc34 (diff)
downloadelgg-e463f5079c9eef80350184cdb8af968dc416e90e.tar.gz
elgg-e463f5079c9eef80350184cdb8af968dc416e90e.tar.bz2
Updates to Twitter and TwitterService UI.
git-svn-id: http://code.elgg.org/elgg/trunk@5398 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/twitterservice/start.php')
-rw-r--r--mod/twitterservice/start.php29
1 files changed, 9 insertions, 20 deletions
diff --git a/mod/twitterservice/start.php b/mod/twitterservice/start.php
index b387379f2..718db9ced 100644
--- a/mod/twitterservice/start.php
+++ b/mod/twitterservice/start.php
@@ -13,39 +13,28 @@
global $CONFIG;
require_once($CONFIG->pluginspath . "twitterservice/vendors/twitter/twitter.class.php");
- function twitterservice_init()
- {
+ 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)
- {
+ // 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)
- {
+ // 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')
- {
+ 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))
+ if (($twittername) && ($twitterpass)) {
twitterservice_send($twittername, $twitterpass, $object->description);
+ }
}
}
}