Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Hide posts from guests {Show first post only]
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #10
RE: Hide posts from guests {Show first post only]
This works in normal view. Keep in mind, you can still reading all answers in archive mode. To fix this open archive/index.php
Find:

PHP Code:
// Finally show the post
			echo "<div class=\"post\">\n<div class=\"header\">\n<div class=\"author\"><h2>{$post['username']}</h2></div>";
			echo "<div class=\"dateline\">{$post['date']}</div>\n</div>\n<div class=\"message\">{$post['message']}</div>\n</div>\n";

replace with:

PHP Code:
1
2
3
4
5
6
7
8
			if ($mybb->user['uid'] == 0 && ($post['pid'] != $GLOBALS['thread']['firstpost'])) {
			echo "<div>Your Message to register or login.</div>";
			} else {

			// Finally show the post
			echo "<div class=\"post\">\n<div class=\"header\">\n<div class=\"author\"><h2>{$post['username']}</h2></div>";
			echo "<div class=\"dateline\">{$post['date']}</div>\n</div>\n<div class=\"message\">{$post['message']}</div>\n</div>\n";
			}


Dont know is there is a better solution. Unfortunately there are no templates for archive mode.

11-20-2010 03:30 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Hide posts from guests {Show first post only] - TriTop - 11-20-2010 03:30 AM

 Standard Tools
Forum Jump: