Browse Source

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

master
root 2 years ago
parent
commit
cb41f491e8

+ 1
- 1
extension.json View File

@@ -120,7 +120,7 @@
120 120
 		]
121 121
 	},
122 122
 	"config": {
123
-		"CommentsDefaultAvatar": "http://www.shoutwiki.com/w/extensions/SocialProfile/avatars/default_ml.gif",
123
+		"CommentsDefaultAvatar": "resources/images/default_ml.gif",
124 124
 		"CommentsSortDescending": false,
125 125
 		"CommentsInRecentChanges": false
126 126
 	},

+ 1
- 1
i18n/de.json View File

@@ -38,7 +38,7 @@
38 38
 	"comments-permalink": "Permanentlink",
39 39
 	"comments-delete-link": "Kommentar löschen",
40 40
 	"comments-anon-name": "Anonymer Benutzer",
41
-	"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>.",
41
+	"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.",
42 42
 	"comments-links-are-forbidden": "Weblinks sind in Kommentaren verboten!",
43 43
 	"comments-is-spam": "Der eingegebene Kommentartext wurde als Spam interpretiert.",
44 44
 	"comments-ignore-item": "<a href=\"$1\">$2</a> am $3 <a href=\"$4\">(freigeben)</a>",

+ 21
- 4
includes/Comment.class.php View File

@@ -637,9 +637,13 @@ class Comment extends ContextSource {
637 637
 				$commentIcon = '';
638 638
 			}
639 639
 		} else {
640
-			$commentPoster_Display = wfMessage( 'comments-anon-name' )->plain();
641
-			$commentPoster = wfMessage( 'comments-anon-name' )->plain();
640
+		    // ##START## 27.09.2017 von Bernhard Linz
641
+			$commentPoster_Display = $this->username;
642
+			$commentPoster = $this->username;
643
+//			$commentPoster_Display = wfMessage( 'comments-anon-name' )->plain();
644
+//			$commentPoster = wfMessage( 'comments-anon-name' )->plain();
642 645
 			$commentIcon = 'default_s.gif';
646
+            // ##ENDE##
643 647
 		}
644 648
 
645 649
 		$avatarHTML = '';
@@ -736,10 +740,18 @@ class Comment extends ContextSource {
736 740
 			$user = User::newFromId( $this->userID );
737 741
 			$CommentReplyToGender = $user->getOption( 'gender', 'unknown' );
738 742
 		} else {
743
+		    // ##START## 27.09.2017 von Bernhard Linz
739 744
 			$anonMsg = $this->msg( 'comments-anon-name' )->inContentLanguage()->plain();
740
-			$commentPoster = $anonMsg . ' #' . $anonList[$this->username];
745
+			//$commentPoster = $anonMsg . ' #' . $anonList[$this->username];
746
+            $commentPoster = $this->username;
747
+            if ( filter_var($commentPoster, FILTER_VALIDATE_IP) !== false ){
748
+                // Wert ist eine IP-Adresse
749
+                $commentPoster = $anonMsg . ' #' . $anonList[$this->username];
750
+            }
741 751
 			$CommentReplyTo = $anonMsg;
742 752
 			$CommentReplyToGender = 'unknown'; // Undisclosed gender as anon user
753
+            $commentPoster = '<b>' . $commentPoster . '</b>';
754
+            // ##ENDE##
743 755
 		}
744 756
 
745 757
 		// Comment delete button for privileged users
@@ -790,7 +802,12 @@ class Comment extends ContextSource {
790 802
 
791 803
 		// Default avatar image, if SocialProfile extension isn't enabled
792 804
 		global $wgCommentsDefaultAvatar;
793
-		$avatarImg = '<img src="' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
805
+        if ( $this->username == "BLinz" ) {
806
+            $avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . 'resources/images/bernhard2.gif' . '" alt="" border="0" />';
807
+        } else {
808
+            $avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
809
+        }
810
+//		$avatarImg = '<img src="' . $wgExtensionAssetsPath . '/Comments/' . $wgCommentsDefaultAvatar . '" alt="" border="0" />';
794 811
 		// If SocialProfile *is* enabled, then use its wAvatar class to get the avatars for each commenter
795 812
 		if ( class_exists( 'wAvatar' ) ) {
796 813
 			$avatar = new wAvatar( $this->userID, 'ml' );

+ 12
- 1
includes/CommentsPage.class.php View File

@@ -516,7 +516,16 @@ class CommentsPage extends ContextSource {
516 516
 	 * @return string HTML
517 517
 	 */
518 518
 	function displayOrderForm() {
519
-		$output = '<div class="c-order">
519
+	    // ##START## 27.09.2017 von Bernhard Linz
520
+   		$output = '<div id="spy" class="c-spy">
521
+				<a href="javascript:void(0)">' .
522
+			wfMessage( 'comments-auto-refresher-enable' )->plain() .
523
+			'</a>
524
+			</div>
525
+			<div class="visualClear"></div>
526
+		<br />' . "\n";
527
+
528
+/*		$output = '<div class="c-order">
520 529
 			<div class="c-order-select">
521 530
 				<form name="ChangeOrder" action="">
522 531
 					<select name="TheOrder">
@@ -537,6 +546,8 @@ class CommentsPage extends ContextSource {
537 546
 			<div class="visualClear"></div>
538 547
 		</div>
539 548
 		<br />' . "\n";
549
+*/
550
+        // ##ENDE##
540 551
 
541 552
 		return $output;
542 553
 	}

BIN
resources/images/bernhard1.gif View File


BIN
resources/images/bernhard2.gif View File


BIN
resources/images/default_ml.gif View File


Loading…
Cancel
Save