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

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

View File

@ -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
},

View File

@ -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 <b>alle Kommentare</b>. Sofern du nicht anonym bleiben möchtest, <a href=\"$1\">registriere dich bitte</a> oder <a href=\"$2\">melde dich an</a>.",
"comments-anon-message": "{{SITENAME}} freut sich über <b>alle Kommentare</b>. Sofern du nicht anonym bleiben möchtest, trage deinen Namen oder deine Email-Adresse ein oder <a href=\"$2\">melde dich an</a>. 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": "<a href=\"$1\">$2</a> am $3 <a href=\"$4\">(freigeben)</a>",

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' );

View File

@ -516,7 +516,16 @@ class CommentsPage extends ContextSource {
* @return string HTML
*/
function displayOrderForm() {
$output = '<div class="c-order">
// ##START## 27.09.2017 von Bernhard Linz
$output = '<div id="spy" class="c-spy">
<a href="javascript:void(0)">' .
wfMessage( 'comments-auto-refresher-enable' )->plain() .
'</a>
</div>
<div class="visualClear"></div>
<br />' . "\n";
/* $output = '<div class="c-order">
<div class="c-order-select">
<form name="ChangeOrder" action="">
<select name="TheOrder">
@ -537,6 +546,8 @@ class CommentsPage extends ContextSource {
<div class="visualClear"></div>
</div>
<br />' . "\n";
*/
// ##ENDE##
return $output;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB