MyBB Community Forums

Full Version: Guests View Forums strange...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Its really strange, the guests can see all the "Importent Threads" but they can only see the other threads if they change the page. And then their are only like, 4 posts on one page. It looks fine for normal members, and the permissions allow guests to see the threads, because, they can. It just looks really strange.


I took some pictures, the first one is the guest view and the second one is the member view.

http://i49.tinypic.com/2wo93yv.png

http://i45.tinypic.com/1p80og.png


http://forums.penhacks.net if you guys need to see. I can make an account for you also.
There's something bloody weird going on here, you're not the first person to have this problem... in the Forum Display Options, what's the Threads Per Page option set to?? Can you make sure it's just a number and there's no spaces before or after it.
Nope, nothing before or after.

This always happens to me, I'm going to end up editing some file xP
Hmm. This is the code from ./forumdisplay.php:

$perpage = $mybb->settings['threadsperpage'];

if(intval($mybb->input['page']) > 0)
{
	$page = intval($mybb->input['page']);
	$start = ($page-1) * $perpage;
	$pages = $threadcount / $perpage;
	$pages = ceil($pages);
	if($page > $pages || $page <= 0)
	{
		$start = 0;
		$page = 1;
	}
}
else
{
	$start = 0;
	$page = 1;
}

And this is in the query to get the threads:

LIMIT $start, $perpage

So, $start would be 0 as there was no page in the URL, and $perpage would be whatever is in the setting, I assume it's 20... so why doesn't it select 20?? Undecided There's also:

WHERE t.fid='$fid' $tvisibleonly $datecutsql2

But those wouldn't stop how much shows on each page, and there's enough threads being selected for multiple pages.

Huh
Thing is, it works fine for members, its just screwy for guests. I'm not a PHP pro, less then a n00b but I don't see anything about guests in that code. I would assume it has something to do with a plugin interfering. And I would try and disable some around the time frame that this started to happen, but I didn't know it was going on. I just logged out to test a plugin that I had installed for guests, and I saw it was all strange. I disabled that plugin and it still doesn't work.
That's the weird thing, that's how it is for everyone, only affects guests. Can you try this for me, change the Threads Per Page option to 1, and see how many threads it shows for guests, and users. Then increase it to 2, and see what it's like for guests and users. Keep doing this until the number of threads guests can see stops increasing, i.e. it shows less than the settings says they're meant to see. Make sure that in your User CP Options, you have it set to use the default number of Threads Per Page.
Okie I will try that. I'll do guests first the members.
Okie, for members its fine.

But for guests.

When I do one, it shows one. When I do two, it shows one. When I do three, it shows two. When I do 4 it shows 3... it does that pretty much the whole way.

And I dunno why, but for some reason, when I set forum display options to 3 it only shows 3 PM's at a time also.
This thread needs to get bumped.

EDIT: yay it bumped.
What plugin did you install?
Like I said I dunno how long this is going on if I did then I would have checked around that time frame the plugins I installed. But the last one I installed was My Ad Manager, and I uninstalled that and the forums still looked strange so it wasn't that.
Pages: 1 2 3