-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
3.0.7-PL1
-
None
I noticed that when hooking a function into template->display like this:
$phpbb_hook->register(array('template','display'), 'my_hook');
The function/hook is executed during the compilation of the template as expected, but if you are viewing a topic that has Attachments in the post, then the function/hook is repeated at every attachment as well.
For example, I made a hook that would simply echo "hello world" and this phrase appeared in the viewtopic page wherever there was an attachment, after the <dd> tag, like this:
<dl class="attachbox">
<dt>Attachments</dt>
<dd>hello world
<dl class="thumbnail">
Obviously this means more complex functions that are hooked in to the template->display will be executed multiple times when there are attachments!