diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-24 02:02:46 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-24 02:02:46 +0000 |
commit | de3b6654ddc28fe0fc7d6e1fb615ddb4fd3e3e47 (patch) | |
tree | ca658f3be6585f6a64a56693000bc46d7796289c /mod | |
parent | 1cf47c89b8ca9f5c42f5e247c3cba939f9676564 (diff) | |
download | elgg-de3b6654ddc28fe0fc7d6e1fb615ddb4fd3e3e47.tar.gz elgg-de3b6654ddc28fe0fc7d6e1fb615ddb4fd3e3e47.tar.bz2 |
welcome to the admin dashboard
git-svn-id: http://code.elgg.org/elgg/trunk@7922 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/developers/languages/en.php | 9 | ||||
-rw-r--r-- | mod/developers/start.php | 4 | ||||
-rw-r--r-- | mod/thewire/start.php | 41 |
3 files changed, 52 insertions, 2 deletions
diff --git a/mod/developers/languages/en.php b/mod/developers/languages/en.php index 644acfb5f..bd16a8c61 100644 --- a/mod/developers/languages/en.php +++ b/mod/developers/languages/en.php @@ -9,6 +9,15 @@ $english = array( 'admin:developers' => 'Developers', 'admin:developers:settings' => 'Settings', 'admin:developers:preview' => 'CSS Preview', + + // settings + 'developers:label:simple_cache' => '', + 'developers:help:simple_cache' => '', + 'developers:label:views_cache' => '', + 'developers:help:views_cache' => '', + 'developers:label:' => '', + 'developers:help:' => '', + ); add_translation('en', $english); diff --git a/mod/developers/start.php b/mod/developers/start.php index ba84c3234..04c83bdde 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -6,8 +6,10 @@ elgg_register_event_handler('init', 'system', 'developers_init'); function developers_init() { - elgg_register_event_handler('pagesetup', 'system', 'developers_setup_menu'); + + $action_base = elgg_get_plugin_path() . 'developers/actions/developers'; + elgg_register_action('developers/settings', "$action_base/settings.php", 'admin'); } function developers_setup_menu() { 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 @@ <?php +function rest_wire_post($username, $text) { + login(get_user(2)); + + $user = get_user_by_username($username); + if (!$user) { + throw new InvalidParameterException('Bad username'); + } + + $obj = new ElggObject(); + $obj->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); |