MyBB Community Forums

Full Version: Adding a new user activity in online.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I created a new custom page called ladder.php which uses all the forum templates and stuff and is located inside the /forum directory. If you go to online.php (Who's Online -> Complete List) it says unknown location for anyone viewing ladder.php (my custom page). How do I add ladder.php as a valid location so that it will say "Viewing Ladder" instead of "Unknown Location"?

I looked in online.php and it seems to know where the user is browing based on this -> $user['activity'] but I'm not sure where I'm supposed to set the user activity. My guess is I have to set something in ladder.php.

Any help would be greatly appreciated! Smile
I just had a look in some of the forum files, but I can't see where $user['activity'] gets set, but near the top of ladder.php, you could try doing something like
$user['activity'] = 'Viewing Ladder';
not sure if it will work, but it's worth a try.
More something like this then Smile
Go to Online.php, find ->
case "index":

Add under:
		case "ladder":
			$locationname = "Viewing Ladder";
			break;
I haven't tried it. sorry if it's not working.
unfortunately neither of those worked =/ Thank you for the help so far though.
Been trying to figure this out myself, but... no go. Sad
Anyone been able to figure this out yet? I still don't know what to do Sad
hey

but guys you have missed the lang files! dont they make difference !??


for example in online.lang
online.lan Wrote:$l['replying_thread2'] = "Replying to Thread <a href=\"showthread.php?tid={1}\">{2}</a>";
regards