Add direct links to article comment responses
authorMatthias Schmidt <gravatronics@live.com>
Tue, 27 Jun 2017 18:39:55 +0000 (20:39 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 27 Jun 2017 18:39:55 +0000 (20:39 +0200)
See #2223

wcfsetup/install/files/lib/system/user/activity/event/ArticleCommentResponseUserActivityEvent.class.php
wcfsetup/install/files/lib/system/user/activity/event/ArticleCommentUserActivityEvent.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 11b667a6be30ce21d1df3895d9d454598d42d774..5801321c62189ef1193b71513b1d774b0ffd6780 100644 (file)
@@ -85,6 +85,8 @@ class ArticleCommentResponseUserActivityEvent extends SingletonFactory implement
                                        // title
                                        $text = WCF::getLanguage()->getDynamicVariable('wcf.article.recentActivity.articleCommentResponse', [
                                                'commentAuthor' => $users[$comment->userID],
+                                               'commentID' => $comment->commentID,
+                                               'responseID' => $response->responseID,
                                                'article' => $article
                                        ]);
                                        $event->setTitle($text);
index 6fdf660d58178607f982c16940b9bb5855d7a7a5..f8cb03efd9215c27c8c32e4e1c3f1dcc29491071 100644 (file)
@@ -57,7 +57,10 @@ class ArticleCommentUserActivityEvent extends SingletonFactory implements IUserA
                                        $event->setIsAccessible();
                                        
                                        // add title
-                                       $text = WCF::getLanguage()->getDynamicVariable('wcf.article.recentActivity.articleComment', ['article' => $article]);
+                                       $text = WCF::getLanguage()->getDynamicVariable('wcf.article.recentActivity.articleComment', [
+                                               'article' => $article,
+                                               'commentID' => $comment->commentID
+                                       ]);
                                        $event->setTitle($text);
                                        
                                        // add text
index dbee2c5f8a96e3daf5dc3fce52be7fafc9019d2e..5cb93de53acd1db8f814f4193d88192d27bb17a2 100644 (file)
@@ -2135,8 +2135,8 @@ Benutzerkontos nun in vollem Umfang nutzen.]]></item>
                <item name="wcf.article.articleComments"><![CDATA[{#$article->comments} Kommentar{if $article->comments != 1}e{/if}]]></item>
                <item name="wcf.article.articleViews"><![CDATA[{#$article->views} Mal gelesen]]></item>
                <item name="wcf.article.recentActivity.likedArticle"><![CDATA[Mag den Artikel <a href="{$article->getLink()}">{$article->getTitle()}</a>.]]></item>
-               <item name="wcf.article.recentActivity.articleComment"><![CDATA[Hat einen Kommentar zum Artikel <a href="{$article->getLink()}#comments">{$article->getTitle()}</a> geschrieben.]]></item>
-               <item name="wcf.article.recentActivity.articleCommentResponse"><![CDATA[Hat auf einen Kommentar von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a> zum Artikel <a href="{$article->getLink()}#comments">{$article->getTitle()}</a> geantwortet.]]></item>
+               <item name="wcf.article.recentActivity.articleComment"><![CDATA[Hat einen Kommentar zum Artikel <a href="{$article->getLink()}#comment{$commentID}">{$article->getTitle()}</a> geschrieben.]]></item>
+               <item name="wcf.article.recentActivity.articleCommentResponse"><![CDATA[Hat auf einen Kommentar von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a> zum Artikel <a href="{$article->getLink()}#comment{@$commentID}/response{@$responseID}">{$article->getTitle()}</a> geantwortet.]]></item>
                <item name="wcf.article.search.categories"><![CDATA[Folgende Kategorien durchsuchen]]></item>
                <item name="wcf.article.articles"><![CDATA[Artikel]]></item>
                <item name="wcf.article.comment"><![CDATA[Artikel-Kommentar]]></item>
index 845a06d6064fa5728ea55522e767dbfeef5ef5cd..b30a12172ca15ca32a80eb1c45767bd2668118ea 100644 (file)
@@ -2069,8 +2069,8 @@ full extend.]]></item>
                <item name="wcf.article.articleComments"><![CDATA[{#$article->comments} Comment{if $article->comments != 1}s{/if}]]></item>
                <item name="wcf.article.articleViews"><![CDATA[{#$article->views} View{if $article->views != 1}s{/if}]]></item>
                <item name="wcf.article.recentActivity.likedArticle"><![CDATA[Liked the article <a href="{$article->getLink()}">{$article->getTitle()}</a>.]]></item>
-               <item name="wcf.article.recentActivity.articleComment"><![CDATA[Commented on article <a href="{$article->getLink()}">{$article->getTitle()}</a>.]]></item>
-               <item name="wcf.article.recentActivity.articleCommentResponse"><![CDATA[Replied to a comment by <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a> on article <a href="{$article->getLink()}">{$article->getTitle()}</a>.]]></item>
+               <item name="wcf.article.recentActivity.articleComment"><![CDATA[Commented on article <a href="{$article->getLink()}#comment{$commentID}">{$article->getTitle()}</a>.]]></item>
+               <item name="wcf.article.recentActivity.articleCommentResponse"><![CDATA[Replied to a comment by <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a> on article <a href="{$article->getLink()}#comment{@$commentID}/response{@$responseID}">{$article->getTitle()}</a>.]]></item>
                <item name="wcf.article.search.categories"><![CDATA[Search in Categories]]></item>
                <item name="wcf.article.articles"><![CDATA[Articles]]></item>
                <item name="wcf.article.comment"><![CDATA[Article Comment]]></item>