Matthew Hawley
Well-known member
Okay lets see what I'm doing.
So this the Listener.php
This is the template mumble_viewer_sidebar:
And this is what I put into the form for creating a Code Event Listener
Now when I save everything shows up like its supposed to, except this happens. (You may have to look closely, theres a gray space above the moderator bar.
When I put "templateHook" into the Event Hint the problem in the image above goes way, but the template that goes in "ad_sidebar_bottom goes away aswell. I suspect there might be a new way of doing this in 1.2 or something. Anyone know the problem?
Thanks in advance!
So this the Listener.php
Code:
<?php
class MumbleViewer_Listener
{
public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
{
if ($hookName == 'ad_sidebar_bottom')
{
$contents .= $template->create('mumble_viewer_sidebar', $template->getParams());
}
}
}
This is the template mumble_viewer_sidebar:
Code:
<div class="section">
<div class="secondaryContent">
<h3>{xen:phrase mumble_viewer_sidebar_title}</h3>
<iframe src="http://cache.www.gametracker.com/components/html0/?host=193.218.154.228:64738&bgColor=1F2642&fontColor=8790AE&titleBgColor=11172D&titleColor=FFFFFF&borderColor=333333&linkColor=FF9900&borderLinkColor=999999&showMap=0¤tPlayersHeight=160&showCurrPlayers=1&showTopPlayers=0&showBlogs=0&width=240" frameborder="0" scrolling="no" width="240" height="348"></iframe>
</div>
</div>
And this is what I put into the form for creating a Code Event Listener
Now when I save everything shows up like its supposed to, except this happens. (You may have to look closely, theres a gray space above the moderator bar.
When I put "templateHook" into the Event Hint the problem in the image above goes way, but the template that goes in "ad_sidebar_bottom goes away aswell. I suspect there might be a new way of doing this in 1.2 or something. Anyone know the problem?
Thanks in advance!