Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

Fix Unknown Location on Online Page

$
0
0
I have seen many forums that when you visit the online.php page you see 'Unknown Location' which is a nightmare.
So after some work and messing around I was finally able to get this sorted, requires a quick core edit which is also a pain.

There is a few things you need to take into consideration when making these changes too.
1. When you run a File Verification on the ACP it'll show up since it's a core edit.
2. If you update the files you will have to make these core edits once again.

Alright so now that these two parts have been covered lets get right into making these changes.

  • Access cPanel or Root folder and go to inc/functions_online.php - edit this file.
  • Now locate the following line of code. 
Code:
default:
$user_activity['activity'] = "unknown";
break;
  • Now after that code add the following code:
Code:
case "pagenamehere":
$user_activity['activity'] = "pagenamehere";
break;
  • Replace pagenamehere with the correct name of the page such as myawards
  • Now you'll want to locate the next set of code:
Code:
case "warnings":
$location_name = $lang->managing_warnings;
break;
  • Again after this code ad the following:
Code:
case "pagenamehere":
$location_name = 'Viewing <a href="pagenamehere.php">pagenamehere2</a>';
break;
  • Replace pagenamehere to the correct name like myawards.
  • Replace pagenamehere.php to match the page with extension (PHP).
  • Replace pagenamehere2 to be the displayed name on Online.php on forums.

Viewing all articles
Browse latest Browse all 690

Trending Articles