MyBB Community Forums

Full Version: New Page question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently using this to make a MyBB-ran page on my site:
<?php
require "./global.php";
addnav("Welcome", "a.php");
eval("\$template = \"".$templates->get("testi")."\";");
outputpage($template);
?>
The only problem is, is when I view Who's Online it says Unknown Location. What would I have to enter into either that PHP above or on another file for it to say the file location?
Yeah, it's somewhere in the online.php page that you need to change some things.
Find:
		// default
		default:
			$locationname = sprintf($lang->unknown_location, $user['location']);
			break;
and above it add:
		case "testi":
			$locationname = "viewing testi page";
			break;

After that, find:
		default:
			$user['activity'] = "unknown";
			break;
and above add:
		case "testi":
			$user['activity'] = "testi";
			break;

Every testi should be replaced by your template's name.
Cheers Smethead Smile