Yes that was what was supposed to happen.. I also got it to work now on my forum:
check it out at
http://ecig-forum.dk
I found out why it wasnt working.. The contents of the template didnt install when I imported the xml. I think it may be because of 2 whitespaces after the templatetag.. After removing those tags it worked perfectly.
Thanks for your guidance.
--------------- Added [DATE]1263762518[/DATE] at [TIME]1263762518[/TIME] ---------------
By the way.. If anybody is interrested, its an integration of
http://tinychat.com API.. So I can tell who is online at the video chat there.. Its defenately not finished, but the php code is like this now:
Code:
<![CDATA[if ($vbulletin->options['videochat_stat_active']){
$video_chat_stat = '';
$url = $vbulletin->options['videochat_stat_url'];
$contents = file_get_contents($url);
$contents = utf8_encode($contents);
$arr = json_decode($contents, True);
foreach ($arr as $key => $value) {
if($key == 'topic'){
$topic = $value;
}else if($key == 'broadcaster_count'){
$broadcaster_count = $value;
}else if($key == 'total_count'){
$total_count = $value;
}else if(is_array($value) && $key == 'names'){
foreach ($value as $key2 => $value2) {
$users_online .= $value2.', ';
}
}
}
$video_chat_stat .= 'Antal online ialt: '.$total_count.'<br>';
$video_chat_stat .= 'Antal online med video: '.$broadcaster_count.'<br>';
$video_chat_stat .= 'Brugere online: '.$users_online.'<br>';
$templater = vB_Template::create('forumhome_videochat_stat');
$templater->register('video_chat_stat', $video_chat_stat);
$template_hook[forumhome_wgo_pos2] .= $templater->render();
}]]>