MyBB Community Forums

Full Version: Online List Integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A while back I posted a question regarding online list integration, for a custom-coded section of the website.

However, I have another question. I plan on changing the structure of this site, to MyBB's index page is /forums/index.php and the new homepage is simply /index.php

... Is there a way to differentiate the two different index.php scripts in online.php so I could have it as "Viewing Site Homepage" instead of "Viewing Forum Index"?
*bump*

Any suggestions?
Check inc/functions_online.php
		case "index":
		case '':
			$user_activity['activity'] = "index";
			break;

Ok, if I change this, viewing /index.php will be right, but viewing /forums/index.php will show as viewing site homepage.

How can I differentiate this?
Take a look at the:
function build_friendly_wol_location($user_activity)
Wink
		// index.php functions
		case "index":
			$location_name = $lang->sprintf($lang->viewing_index, $mybb->settings['bbname']);
			break;

... I must be missing something here, because this doesn't look like anything I could change to have /index.php and /forums/index.php be different. (/forums/index.php being MyBB's index.php script)
Sorry i didn't understand well your question.

Well, you'll have to include MyBB functions and then patch the function. Wink
I'm including global.php, but just how would I "patch" the function to differentiate the two index scripts? You know you can't redefine functions in PHP...
Did you study at least the function expecially the $location param.
			if($location == "index.php")
				$user_activity['activity'] = "home";
			else
				$user_activity['activity'] = "index";

Then edit accordingly
function build_friendly_wol_location($user_activity)
... Thank you so much. Big Grin