Name wird auch angezeigt, BLinz eigenes Avatar Bild, keine externen links mehr

This commit is contained in:
root
2017-09-27 23:21:19 +02:00
parent f103b057aa
commit cb41f491e8
7 changed files with 35 additions and 7 deletions

View File

@@ -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 = '<b>' . $commentPoster . '</b>';
// ##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 = '<img src="' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
if ( $this->username == "BLinz" ) {
$avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . 'resources/images/bernhard2.gif' . '" alt="" border="0" />';
} else {
$avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
}
// $avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
// 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' );