summaryrefslogtreecommitdiff
path: root/plugins/Comet/CometPlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-01 08:00:37 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-05-01 08:00:37 -0700
commita86a0e91a5acb5ea894a3d066f9adf3b1ef305ae (patch)
tree6d662ae7b310a9d93d419a480a6cde452f185650 /plugins/Comet/CometPlugin.php
parente97223b2ba3f9f1818ba12b707c53c0ebdcab144 (diff)
add favor, reply, delete buttons for cometed notices
Diffstat (limited to 'plugins/Comet/CometPlugin.php')
-rw-r--r--plugins/Comet/CometPlugin.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/Comet/CometPlugin.php b/plugins/Comet/CometPlugin.php
index 2e0bb40a4..48ac9dcad 100644
--- a/plugins/Comet/CometPlugin.php
+++ b/plugins/Comet/CometPlugin.php
@@ -82,8 +82,22 @@ class CometPlugin extends Plugin
' ');
}
+ $user = common_current_user();
+
+ if (!empty($user->id)) {
+ $user_id = $user->id;
+ } else {
+ $user_id = 0;
+ }
+
+ $replyurl = common_local_url('newnotice');
+ $favorurl = common_local_url('favor');
+ // FIXME: need to find a better way to pass this pattern in
+ $deleteurl = common_local_url('deletenotice',
+ array('notice' => '0000000000'));
+
$action->elementStart('script', array('type' => 'text/javascript'));
- $action->raw("$(document).ready(function() { updater.init(\"$this->server\", \"$timeline\");});");
+ $action->raw("$(document).ready(function() { updater.init(\"$this->server\", \"$timeline\", $user_id, \"$replyurl\", \"$favorurl\", \"$deleteurl\"); });");
$action->elementEnd('script');
return true;