Make a plugin with these options
Hook Location: forumhome_start
Title: API chat on forumhome(whatever you want to call this plugin it doesn't matter)
Execution order: 1
Plugin PHP Code:
PHP Code:
function getAPI($command) {
$er = error_reporting(0);
$result = file_get_contents("http://chathost:controlport/?api.".$command);
//Replace http://chathost:controlport with the link to the your api chat
error_reporting($er);
return $result;
}
$apichat['currentuserslocation'] = getAPI("whowhere");
Plugin is Active: Yes
Remember to replace
http://chathost:controlport with the link to the your api chat or this will not work. I suggest trying this on a test board before you put it on your main site to make sure it works. I suggest creating a new product by Plugins & Products -> Manage Product -> Add New Product. Then add the plugin to the product you created.
Then you can put $apichat[currentuserlocation] in your FORUMHOME template.