|
Revision 2062, 0.8 kB
(checked in by bchoate, 19 months ago)
|
|
Updates to blog-side javascript regarding user state and permissions. BugId:79077,69644,67754,69814,79258,62643. Fixed declarations for conditional tags. BugId:79476. Display auth'd user nickname rather than name from comment object. BugId:79475
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | # Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd. |
|---|
| 3 | # This program is distributed under the terms of the |
|---|
| 4 | # GNU General Public License, version 2. |
|---|
| 5 | # |
|---|
| 6 | # $Id$ |
|---|
| 7 | |
|---|
| 8 | function smarty_function_mtcommentreplylink($args, &$ctx) { |
|---|
| 9 | $comment = $ctx->stash('comment'); |
|---|
| 10 | if (!$comment) return ''; |
|---|
| 11 | |
|---|
| 12 | global $mt; |
|---|
| 13 | $label = $args['label']; |
|---|
| 14 | $label or $label = $args['text']; |
|---|
| 15 | $label or $label = $mt->translate("Reply"); |
|---|
| 16 | |
|---|
| 17 | $onclick = $args['onclick']; |
|---|
| 18 | $onclick or $onclick = 'mtCommentReplyOnClick'; |
|---|
| 19 | |
|---|
| 20 | $comment_author = $comment['comment_author']; |
|---|
| 21 | require_once("MTUtil.php"); |
|---|
| 22 | $comment_author = encode_js($comment_author); |
|---|
| 23 | |
|---|
| 24 | return sprintf("<a title\"%s\" href=\"javascript:void(0);\" onclick=\"$onclick(%d, '%s')\">%s</a>", |
|---|
| 25 | $label, $comment['comment_id'], $comment_author, $label); |
|---|
| 26 | } |
|---|
| 27 | ?> |
|---|