Realtime plugin: fix i18n, thumbnails, location display, OStatus server display, micro-apps display.

Switch from manual local formatting of notices (which lacks all the server-side goodness) to calling into the server-side with an AJAX variant of shownotice.
This commit is contained in:
Brion Vibber
2011-03-14 13:29:35 -07:00
parent c7e7cc79da
commit 90d35885ae
4 changed files with 22 additions and 96 deletions

View File

@@ -45,9 +45,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
class RealtimePlugin extends Plugin
{
protected $replyurl = null;
protected $favorurl = null;
protected $deleteurl = null;
protected $showurl = null;
/**
* When it's time to initialize the plugin, calculate and
@@ -56,11 +54,8 @@ class RealtimePlugin extends Plugin
function onInitializePlugin()
{
$this->replyurl = common_local_url('newnotice');
$this->favorurl = common_local_url('favor');
$this->repeaturl = common_local_url('repeat');
// FIXME: need to find a better way to pass this pattern in
$this->deleteurl = common_local_url('deletenotice',
$this->showurl = common_local_url('shownotice',
array('notice' => '0000000000'));
return true;
}
@@ -359,7 +354,7 @@ class RealtimePlugin extends Plugin
function _updateInitialize($timeline, $user_id)
{
return "RealtimeUpdate.init($user_id, \"$this->replyurl\", \"$this->favorurl\", \"$this->repeaturl\", \"$this->deleteurl\"); ";
return "RealtimeUpdate.init($user_id, \"$this->showurl\"); ";
}
function _connect()