MyBB Community Forums

Full Version: How Do I Hide a URL From Who's Online?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So how do I hide certain pages from appearing in Whos Online?
Like if I have a page I don't want the majority of people to know about and I want it to be hidden. How can I make it so it shows up as "Unknown location" but without it linking to the page?
By page, are you referring to a forum board/thread or an actual file (e.g. portal.php)?
It's an actual file that isn't a part of the MyBB system.
Add

define('NO_ONLINE', 1);

after

define("IN_MYBB", 1);

That should do the trick. Instead of displaying "unknown location," it will display "viewing forum index" instead.
What file do I put that in?
And will the link go to the index?
(2014-09-15, 07:12 PM)MI-6 Wrote: [ -> ]What file do I put that in?

Just modify the file you don't want to show up in the who is online list. For example, if you don't want somepage.php to show up in the list, modify somepage.php. It won't affect other pages on your forum.

(2014-09-15, 07:12 PM)MI-6 Wrote: [ -> ]And will the link go to the index?

Yep. It will look as though the user is really viewing your forum index.
I just tried this and it didn't work. It still shows it as "Unknown Location" and links to the file.
That's odd. I'm fairly certain it worked properly when I had tested it out. Are you sure you edited the correct file?
Yes, I added "define('NO_ONLINE', 1);" right below "define("IN_MYBB", 1);" to the correct file.
^ which file(s) / actions exactly you want to remove from the online
Pages: 1 2