From de3b6654ddc28fe0fc7d6e1fb615ddb4fd3e3e47 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 24 Jan 2011 02:02:46 +0000 Subject: welcome to the admin dashboard git-svn-id: http://code.elgg.org/elgg/trunk@7922 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/start.php | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'mod/thewire') diff --git a/mod/thewire/start.php b/mod/thewire/start.php index abb0cb019..6aba3aff6 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -1,5 +1,34 @@ subtype = 'thewire'; + $obj->owner_guid = $user->guid; + $obj->access_id = ACCESS_PUBLIC; + $obj->method = 'api'; + $obj->description = elgg_substr(strip_tags($text), 0, 140); + + $guid = $obj->save(); + + add_to_river('river/object/thewire/create', + 'create', + $user->guid, + $obj->guid + ); + + return 'success'; +} + + + + /** * Elgg wire plugin * The wire is simple twitter like plugin that allows users to post notes to the wire @@ -19,7 +48,17 @@ function thewire_init() { - // Set up menu for logged in users + expose_function('wire.post', + 'rest_wire_post', + array( 'username' => array ('type' => 'string'), + 'text' => array ('type' => 'string'), + ), + 'Post a status update to the wire', + 'POST', + false, + false); + +// Set up menu for logged in users $item = new ElggMenuItem('thewire', elgg_echo('thewire:title'), 'pg/thewire'); elgg_register_menu_item('site', $item); -- cgit v1.2.3