Resource icon

[bd] Widget Framework 2.6.6

No permission to download
How can I use that on Widget Expression field?
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.
 
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.
I hope you'll support this kind of expression for the next update.
Better I will wait for your final expression for this. :)
 
I hope you'll support this kind of expression for the next update.
Better I will wait for your final expression for this. :)
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.
 
  • Like
Reactions: rdn
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.
Using widget for advertisement such as adsense, will use this expression or else they will be banned.
 
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.
I tried but it's not working :(
 
Not all position but similar, I'm using ad_below_content
So it will display in all pages.
For 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.
 
  • Like
Reactions: rdn
For 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.
It works (y)

Can you please convert this to BD widget expression?

PHP:
<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>
 
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.
 
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.
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.

Anyway, your template markup can be converted without using $viewName or $_WidgetFramework_positionCode like this

PHP:
!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
 
If a you could show post in widgets that would be awesome, fx a new "renderer: post", and next type in ID of post to be shown. Possible?
 
This code works great:
PHP:
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)

Thanks @xfrocks
 
Guys i am using two blocks in the "all" position, meaning they display of each and every forum pages. However there are two (static) pages I wish to make an exception and show the forum in full width without any sidebar at all.

Is there an expression or a conditional to make this happen?

Thanks!
 
Top Bottom