MyBB Community Forums

Full Version: Adding "known" location
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,

I asked this when 1.1 was out, but didn't got the right solution (it didn't work for anyone). I ask it again, now, after the release of 1.2 Toungue How can I add a known location? So for example that the chat.php file is no longer recognized as an unknown location.

Thanks in advance.
Helloo.

This is tested and working.

Open ./online.php
Assume we have the file location.php


Find

case "nopermission":
			$user['activity'] = "nopermission";
			break;
		
below it add
case "location":
			$user['activity'] = "mynewlocation";
			break;

Now find
// sendthread.php functions
		case "sendthread":
			$locationname = $lang->sending_thread;
			break;
		
Below it add
case "mynewlocation":
			$locationname = "Viewing location.php";
			break;

regards
Thanks mate! Smile
Just to clarify:
case "location":
			$user['activity'] = "mynewlocation";
			break;
In the line >> case "location" << the "location" is the filename without the .php extension.

case "mynewlocation":
			$locationname = "Viewing location.php";
			break;
In the line >> case "mynewlocation" << the "mynewlocation" is the value of the $user['activity'] that was set in the previous change. The "mynewlocation" can be anything as long as in both changes the values have the same name.