diff --git a/extension.json b/extension.json index 2e426ec..e2f67b2 100644 --- a/extension.json +++ b/extension.json @@ -120,7 +120,7 @@ ] }, "config": { - "CommentsDefaultAvatar": "http://www.shoutwiki.com/w/extensions/SocialProfile/avatars/default_ml.gif", + "CommentsDefaultAvatar": "resources/images/default_ml.gif", "CommentsSortDescending": false, "CommentsInRecentChanges": false }, diff --git a/i18n/de.json b/i18n/de.json index 5d7dc54..6d247b0 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -38,7 +38,7 @@ "comments-permalink": "Permanentlink", "comments-delete-link": "Kommentar löschen", "comments-anon-name": "Anonymer Benutzer", - "comments-anon-message": "{{SITENAME}} freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, registriere dich bitte oder melde dich an.", + "comments-anon-message": "{{SITENAME}} freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, trage deinen Namen oder deine Email-Adresse ein oder melde dich an. Du kannst das Feld auch einfach leer lassen.", "comments-links-are-forbidden": "Weblinks sind in Kommentaren verboten!", "comments-is-spam": "Der eingegebene Kommentartext wurde als Spam interpretiert.", "comments-ignore-item": "$2 am $3 (freigeben)", diff --git a/includes/Comment.class.php b/includes/Comment.class.php index f56d93e..40c7ca2 100644 --- a/includes/Comment.class.php +++ b/includes/Comment.class.php @@ -637,9 +637,13 @@ class Comment extends ContextSource { $commentIcon = ''; } } else { - $commentPoster_Display = wfMessage( 'comments-anon-name' )->plain(); - $commentPoster = wfMessage( 'comments-anon-name' )->plain(); + // ##START## 27.09.2017 von Bernhard Linz + $commentPoster_Display = $this->username; + $commentPoster = $this->username; +// $commentPoster_Display = wfMessage( 'comments-anon-name' )->plain(); +// $commentPoster = wfMessage( 'comments-anon-name' )->plain(); $commentIcon = 'default_s.gif'; + // ##ENDE## } $avatarHTML = ''; @@ -736,10 +740,18 @@ class Comment extends ContextSource { $user = User::newFromId( $this->userID ); $CommentReplyToGender = $user->getOption( 'gender', 'unknown' ); } else { + // ##START## 27.09.2017 von Bernhard Linz $anonMsg = $this->msg( 'comments-anon-name' )->inContentLanguage()->plain(); - $commentPoster = $anonMsg . ' #' . $anonList[$this->username]; + //$commentPoster = $anonMsg . ' #' . $anonList[$this->username]; + $commentPoster = $this->username; + if ( filter_var($commentPoster, FILTER_VALIDATE_IP) !== false ){ + // Wert ist eine IP-Adresse + $commentPoster = $anonMsg . ' #' . $anonList[$this->username]; + } $CommentReplyTo = $anonMsg; $CommentReplyToGender = 'unknown'; // Undisclosed gender as anon user + $commentPoster = '' . $commentPoster . ''; + // ##ENDE## } // Comment delete button for privileged users @@ -790,7 +802,12 @@ class Comment extends ContextSource { // Default avatar image, if SocialProfile extension isn't enabled global $wgCommentsDefaultAvatar; - $avatarImg = ''; + if ( $this->username == "BLinz" ) { + $avatarImg = ''; + } else { + $avatarImg = ''; + } +// $avatarImg = ''; // If SocialProfile *is* enabled, then use its wAvatar class to get the avatars for each commenter if ( class_exists( 'wAvatar' ) ) { $avatar = new wAvatar( $this->userID, 'ml' ); diff --git a/includes/CommentsPage.class.php b/includes/CommentsPage.class.php index 756f1f3..2aaf6dc 100644 --- a/includes/CommentsPage.class.php +++ b/includes/CommentsPage.class.php @@ -516,7 +516,16 @@ class CommentsPage extends ContextSource { * @return string HTML */ function displayOrderForm() { - $output = '
+ // ##START## 27.09.2017 von Bernhard Linz + $output = '
+ ' . + wfMessage( 'comments-auto-refresher-enable' )->plain() . + ' +
+
+
' . "\n"; + +/* $output = '