Have you tried replacing $forum['node_id'] with $category['node_id'] ?
have you tried turning it off and on again?That is like asking me if I tried restarting my computer for a tech issue .. lol yes I have tried that.
Your requirement is a bit complicated so the expression will be quite complicated, like this:Looking for a quick solution on getting an expression ( hook:ad_above_content ) to work within a CATEGORY vs. FORUM. What I am currently doing with certain forums is displaying a banner with the expression above and
$visitor['user_id'] != 0
AND
in_array($forum['node_id'], array(205,206,207))
My problem is that I would like to use this within a Category buy can't seem to find the right " in_array" or expression that works congruently with displaying within a Category.
$visitor['user_id'] != 0
AND
in_array($contentTemplate, array('forum_view', 'category_view'))
AND
preg_match('/^node(205|206|207)($|\s)/', $bodyClasses)
That should work. Are you on stable or beta version?Does anyone know how to have an array for contentemplate for templates NOT in the list?
!in_array($contentTemplate, array('thread_view', 'account_wrapper'))
Doesn't seem to work on the new setup.
Beta, I'll try again when I get back but if I remember it kept saying invalid expression.That should work. Are you on stable or beta version?
That won't work for beta, you need to change it to thisBeta, I'll try again when I get back but if I remember it kept saying invalid expression.
!in_array({$contentTemplate}, {xen: array '0=thread_view', '1=forum_view'})
Your requirement is a bit complicated so the expression will be quite complicated, like this:
Code:$visitor['user_id'] != 0 AND in_array($contentTemplate, array('forum_view', 'category_view')) AND preg_match('/^node(205|206|207)($|\s)/', $bodyClasses)
The reason is $category variable is not available in the PAGE_CONTAINER template (where the hook ad_above_content is used) so you can't use that variable. Fortunately XenForo make uses of $bodyClasses so we need to use it here. Put your node ids (both forums and categories) in the preg_match pattern.
I noticed you have updated your post but just to clarify, the above should work for both positions so you don't need to duplicate your widgetsYou sir are a genious! Thank you for taking the time to help me figure that one out.
Create and insert your custom hook manually.Does anyone know how to make a widget appear in a footer section? For example, I am using an Audention/ThemeHouse theme and wish to show the Forum Stats widget in one of my footer sections.
Appreciate any help or answers.
The forum stats widget needs a custom hook?Create and insert your custom hook manually.
Does anyone know how to make a widget appear in a footer section? For example, I am using an Audention/ThemeHouse theme and wish to show the Forum Stats widget in one of my footer sections.
Appreciate any help or answers.
Create and insert your custom hook manually.
It depends, if you can use one of the existing hook then feel free to use it (e.g. you can use "footer" or "footer_after_copyright"). Otherwise put something like this in the footer template:The forum stats widget needs a custom hook?
<xen:hook name="my_awesome_custom_footer" />
We use essential cookies to make this site work, and optional cookies to enhance your experience.