xfrocks
Well-known member
For thread not found, the $controllerName is still XenForo_ControllerPublicThread, $controllerAction is Index, $contentTemplate is empty.How?
DP suggested this: XenForo_ControllerResponse_Error
For thread not found, the $controllerName is still XenForo_ControllerPublicThread, $controllerAction is Index, $contentTemplate is empty.How?
DP suggested this: XenForo_ControllerResponse_Error
How can I use that on Widget Expression field?For thread not found, the $controllerName is still XenForo_ControllerPublicThread, $controllerAction is Index, $contentTemplate is empty.
Something likeHow can I use that on Widget Expression field?
$controllerName == 'XenForo_ControllerPublicThread' AND $controllerAction == 'Index' AND empty($contentTemplate)
I hope you'll support this kind of expression for the next update.Something like
PHP:$controllerName == 'XenForo_ControllerPublicThread' AND $controllerAction == 'Index' AND empty($contentTemplate)
For this kind of tricky task, I would recommend you to get someone who knows at least one programming language, preferable PHP of course.
Direct support for not found page will not be added in the near future because it's an edge case which not many people will use I think. The above should work if you really want to target those pages.I hope you'll support this kind of expression for the next update.
Better I will wait for your final expression for this.
Using widget for advertisement such as adsense, will use this expression or else they will be banned.Direct support for not found page will not be added in the near future because it's an edge case which not many people will use I think. The above should work if you really want to target those pages.
I tried but it's not workingSomething like
PHP:$controllerName == 'XenForo_ControllerPublicThread' AND $controllerAction == 'Index' AND empty($contentTemplate)
For this kind of tricky task, I would recommend you to get someone who knows at least one programming language, preferable PHP of course.
You meant using AdSense with 'all' position?Using widget for advertisement such as adsense, will use this expression or else they will be banned.
Not all position but similar, I'm using ad_below_contentYou meant using AdSense with 'all' position?
For that particular use case, you can use this expressionNot all position but similar, I'm using ad_below_content
So it will display in all pages.
!empty($contentTemplate)
It worksFor that particular use case, you can use this expression
PHP:!empty($contentTemplate)
The ads will show up in all normal templates but not for errors or messages.
<xen:hook name="ad_below_content" />
<xen:if is="
!in_array({$forum.node_id}, array(
23,26,68,69,70,71,72,74,75,76,77,78,79,
80,83,84,85,86,87,89,90,91,92,93,94,95,
98,106,108,160,161,162,198,200,210))
AND !in_array({$contentTemplate}, array(
'search_results','error','forum_list','thread_view','register_form','login',
'contact','error_with_login','search_form_profile_post','search_form_post','search_form'))
AND {$category.node_id} != 159
">
CONTENT HERE
</xen:if>
!in_array($viewName, array(
'XenForo_ViewPublic_Register_Form',
))
Any particular reason for not using "$_WidgetFramework_positionCode"?But not using this: !in_array($_WidgetFramework_positionCode, array(
I want to use the old style:
Using $viewName is just a temporary workaround. I recommend against using it because a slight change in your site configuration or add-on setup can prevent it from working. If the variable $_WidgetFramework_positionCode is not working for you, it's a bug and it should be fixed.It's not fully working on me, but using this code:
!in_array($viewName, array(
'XenForo_ViewPublic_Register_Form',
))
It's 100% working as I'm using it.
!in_array($forum['node_id'], array(
23,26,68,69,70,71,72,74,75,76,77,78,79,
80,83,84,85,86,87,89,90,91,92,93,94,95,
98,106,108,160,161,162,198,200,210))
AND !in_array($contentTemplate, array(
'search_results','error','forum_list','thread_view','register_form','login',
'contact','error_with_login','search_form_profile_post','search_form_post','search_form'))
AND $category['node_id'] != 159
AND
!in_array($forum['node_id'], array(
23,26,68,69,70,71,72,74,75,76,77,78,79,
80,83,84,85,86,87,89,90,91,92,93,94,95,
98,106,108,160,161,162,198,200,210))
AND
!in_array($contentTemplate, array(
'search_results','error','forum_list','thread_view','register_form','login',
'contact','error_with_login','search_form_profile_post','search_form_post','search_form'))
AND
$category['node_id'] != 159
AND
!empty($contentTemplate)
We use essential cookies to make this site work, and optional cookies to enhance your experience.