Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 3 Years, 7 Months, 3 Weeks ago Who's Online Wrong Location
#1
Solved: 3 Years, 7 Months, 3 Weeks ago
I am stumped on why this is happening. Basically, when some guests or members are viewing my forum, they show as normal 'Viewing Index'. However, quite a lot of the time they are showing as 'Viewing Portal'. I tested this by making 3 test accounts, and when viewing the index, they all said 'Viewing Portal'. Does anybody know why this happens? You might ask, how do you know they have not viewed Portal? Well i don't but even my test accounts show as viewing Portal when I'm on the index.

I'll add that my forum has a sidebox and is pulling the latest threads/posts and who's online from the portal page (no plugin). Not sure if this would matter or not, however, I imagine it may have something to do with the latest posts from the portal?

Link: http://www.forumlair.com - I do usually fix things when I need to, but this has stumped me. If it's to do with the above, I can easily change the way I have latest posts on the index instead of pulling from the portal.


P.S - Other than the above, the who's online works as normal.
Reply
#2
Solved: 3 Years, 7 Months, 3 Weeks ago
(11-24-2015, 08:43 PM)J Greig Wrote: I'll add that my forum has a sidebox and is pulling the latest threads/posts and who's online from the portal page (no plugin). Not sure if this would matter or not, however, I imagine it may have something to do with the latest posts from the portal?

Indeed it does; the browser is making 3 additional requests to portal.php:
<script type="text/javascript">
jQuery(function(){
$(".latestthreads").load("portal.php .latestthreads_portal");
$(".whosonline").load("portal.php .whosonline");
$(".lateststats").load("portal.php .lateststats");
}); </script>
These requests are made after the index page is loaded, which sets the page they visited last to the portal.
Apart from the Who's Online issue, this might cause redundant use of server resources - it would be much better to use a plugin that would query the database for needed content only instead of running the whole MyBB script additionally 3 times Wink
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#3
Solved: 3 Years, 7 Months, 3 Weeks ago
It was a quick solution until I wrote my own plugins for them and seemed to worked fine, until I noticed this issue. But I'll take your advice and start the plugins now. Thanks for finally figuring this out for me because it did my head in.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)