you can overwrite it and output whatever you want!!!??I wish the 'what is new' , 'no results found' error that's spit out is not just the default page with a phrase spit out, but a much more advanced setup where we can hook into.
public function getNoResultsResponse()
{
$this->responseView('', 'my_new_page');
}
I feel I am missing something .. continue in privmsg?you can overwrite it and output whatever you want!!!??
Just use a template and use this->reponseView instead of responseMessage in getNoResultsResponse
PHP:public function getNoResultsResponse() { $this->responseView('', 'my_new_page'); }
Can't you use the ad templates for that?show ads after the first message or in the first message...
Unfortunatelly no. I'm creating an Ads Manager by request and want to insert ads using hooks, not manually (by changing ad templates).Can't you use the ad templates for that?
<xen:if hascontent="true">
<div class="iconKey">
<xen:contentcheck>
<xen:hook name="thread_list_item_iconKey" params="{xen:array 'thread={$thread}'}">
<xen:if is="{$thread.isModerated}"><span class="moderated" title="{xen:phrase moderated}">{xen:phrase moderated}</span></xen:if>
<xen:if is="!{$thread.discussion_open}"><span class="locked" title="{xen:phrase locked}">{xen:phrase locked}</span></xen:if>
<xen:if is="{$thread.sticky}"><span class="sticky" title="{xen:phrase sticky}">{xen:phrase sticky}</span></xen:if>
<xen:if is="{$thread.isRedirect}"><span class="redirect" title="{xen:phrase redirect}">{xen:phrase redirect}</span></xen:if>
</xen:hook>
</xen:contentcheck>
</div>
</xen:if>
Each ad template has a hook inside it.Unfortunatelly no. I'm creating an Ads Manager by request and want to insert ads using hooks, not manually (by changing ad templates).
<xen:hook name="ad_thread_view_below_messages" />
switch ($templateHook) {
case 'ad_thread_view_below_messages':
// do stuff
break;
}
I know, that each template has a hook and I know, how to use them. I just need to pass some params to hook. For example, I need pass an array, containing post data to ad_message_below hook. Yes, I can manually change ad_message_below hook, but maybe this should be done by XF developers?Each ad template has a hook inside it.
Sorry, didn't understand your original question, now I do. I thought you could pass args to a hook to make that data available in the template? Been some time since I played with the XenForo system, though...I know, that each template has a hook and I know, how to use them. I just need to pass some params to hook. For example, I need pass an array, containing post data to ad_message_below hook. Yes, I can manually change ad_message_below hook, but maybe this should be done by XF developers?
<xen:hook name="thread_view_share_after" params="{xen:array 'thread={$thread}'}" />
<xen:hook name="forum_view_pagenav_after" params="{xen:array 'forum={$forum}'}" />
We use essential cookies to make this site work, and optional cookies to enhance your experience.