diff options
Diffstat (limited to 'mod/thewire')
-rw-r--r-- | mod/thewire/languages/en.php | 4 | ||||
-rw-r--r-- | mod/thewire/start.php | 17 | ||||
-rw-r--r-- | mod/thewire/views/default/js/thewire.php | 4 | ||||
-rw-r--r-- | mod/thewire/views/default/object/thewire.php | 2 | ||||
-rw-r--r-- | mod/thewire/views/default/thewire/reply.php | 7 |
5 files changed, 18 insertions, 16 deletions
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php index b55fb11d0..9b2b480ae 100644 --- a/mod/thewire/languages/en.php +++ b/mod/thewire/languages/en.php @@ -13,7 +13,7 @@ $english = array( 'thewire:user' => "%s's wire posts", 'thewire:friends' => "Friends' wire posts", 'thewire:reply' => "Reply", - 'thewire:replying' => "Replying to %s who wrote", + 'thewire:replying' => "Replying to %s (@%s) who wrote", 'thewire:thread' => "Thread", 'thewire:charleft' => "characters remaining", 'thewire:tags' => "Wire posts tagged with '%s'", @@ -43,7 +43,7 @@ $english = array( */ 'thewire:posted' => "Your message was successfully posted to the wire.", 'thewire:deleted' => "The wire post was successfully deleted.", - 'thewire:blank' => "Sorry, you need to enter come text before we can post this.", + 'thewire:blank' => "Sorry, you need to enter some text before we can post this.", 'thewire:notfound' => "Sorry, we could not find the specified wire post.", 'thewire:notdeleted' => "Sorry. We could not delete this wire post.", diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 770f8bce0..2d66c475c 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -12,7 +12,7 @@ * Nathan Koterba */ -register_elgg_event_handler('init', 'system', 'thewire_init'); +elgg_register_event_handler('init', 'system', 'thewire_init'); /** * The Wire initialization @@ -52,24 +52,23 @@ function thewire_init() { // Register a URL handler for thewire posts elgg_register_entity_url_handler('object', 'thewire', 'thewire_url'); - // Your thewire widget - add_widget_type('thewire', elgg_echo('thewire'), elgg_echo("thewire:widget:desc")); + elgg_register_widget_type('thewire', elgg_echo('thewire'), elgg_echo("thewire:widget:desc")); - // Register entity type + // Register for search elgg_register_entity_type('object', 'thewire'); // Register granular notification for this type register_notification_object('object', 'thewire', elgg_echo('thewire:notify:subject')); // Listen to notification events and supply a more useful message - register_plugin_hook('notify:entity:message', 'object', 'thewire_notify_message'); + elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'thewire_notify_message'); // Register actions $action_base = $CONFIG->pluginspath . 'thewire/actions'; - register_action("thewire/add", false, "$action_base/add.php"); - register_action("thewire/delete", false, "$action_base/delete.php"); + elgg_register_action("thewire/add", "$action_base/add.php"); + elgg_register_action("thewire/delete", "$action_base/delete.php"); - register_plugin_hook('unit_test', 'system', 'thewire_test'); + elgg_register_plugin_hook_handler('unit_test', 'system', 'thewire_test'); } /** @@ -402,7 +401,7 @@ function thewire_setup_entity_menu_items($hook, $type, $value, $params) { 'text' => elgg_echo('thewire:previous'), 'href' => "thewire/previous/$entity->guid", 'priority' => 160, - 'class' => 'thewire-previous', + 'link_class' => 'thewire-previous', 'title' => elgg_echo('thewire:previous:help'), ); $value[] = ElggMenuItem::factory($options); diff --git a/mod/thewire/views/default/js/thewire.php b/mod/thewire/views/default/js/thewire.php index 1eda90bee..d9bf6d10e 100644 --- a/mod/thewire/views/default/js/thewire.php +++ b/mod/thewire/views/default/js/thewire.php @@ -30,7 +30,7 @@ elgg.thewire.init = function() { */ elgg.thewire.textCounter = function(textarea, status, limit) { - var remaining_chars = limit - textarea.value.length; + var remaining_chars = limit - $(textarea).val().length; status.html(remaining_chars); if (remaining_chars < 0) { @@ -83,4 +83,4 @@ elgg.thewire.viewPrevious = function(event) { event.preventDefault(); } -elgg.register_hook_handler('init', 'system', elgg.thewire.init);
\ No newline at end of file +elgg.register_hook_handler('init', 'system', elgg.thewire.init); diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php index 7beb197ee..3ae347711 100644 --- a/mod/thewire/views/default/object/thewire.php +++ b/mod/thewire/views/default/object/thewire.php @@ -51,7 +51,7 @@ $params = array( 'content' => thewire_filter($post->description), 'tags' => false, ); -$list_body = elgg_view('page/components/summary', $params); +$list_body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $list_body); diff --git a/mod/thewire/views/default/thewire/reply.php b/mod/thewire/views/default/thewire/reply.php index 3794e1454..341b691b1 100644 --- a/mod/thewire/views/default/thewire/reply.php +++ b/mod/thewire/views/default/thewire/reply.php @@ -5,7 +5,10 @@ $post = $vars['post']; $poster = $post->getOwnerEntity(); - +$poster_details = array( + htmlspecialchars($poster->name, ENT_QUOTES, 'UTF-8'), + htmlspecialchars($poster->username, ENT_QUOTES, 'UTF-8'), +); ?> -<b><?php echo elgg_echo('thewire:replying', array($poster->name)); ?>: </b> +<b><?php echo elgg_echo('thewire:replying', $poster_details); ?>: </b> <?php echo $post->description;
\ No newline at end of file |