Resource icon

[bd] Widget Framework 2.6.6

No permission to download
I am currently using in_array($forum['node_id'], array(73,74,75)) to show a banner in "above hook" position of a forum. How could i accomplish this with a category? I seemed to have exhausted my efforts in getting the right formula for using a category id instead of forum id.
 
@xfrocks is there a way to show different widgets based on if they are using a phone or desktop? And/or by usergroup?
There's an option for each widget that lets you enable/disable it for mobile users.

You can show different widgets to different user groups using the widget's "Expression" field. For example:
Code:
XenForo_Template_Helper_Core::callHelper('ismemberof', array($visitor,3))
This will only show the widget to users in the user group with the ID of "3".
 
Sure. The widgets have unique IDs, so the widget with ID #3 would be targeted with the following CSS placed in the EXTRA.css template:

Code:
/* hide for desktops */
#widget-3 {
   display: none;
}

@media (max-width:@maxResponsiveNarrowWidth) {
   /* show on mobile */
   #widget-3 {
      display: block;
   }
}
 
Sure. The widgets have unique IDs, so the widget with ID #3 would be targeted with the following CSS placed in the EXTRA.css template:

Code:
/* hide for desktops */
#widget-3 {
   display: none;
}

@media (max-width:@maxResponsiveNarrowWidth) {
   /* show on mobile */
   #widget-3 {
      display: block;
   }
}
How about hiding on mobile? just change to display: none;?
 
If anyone could help me what seems like it should be an easy task for the WF..

https://xenforo.com/community/threads/widget-displayed-in-category-vs-forum.120600/

I would appreciate it! A reply here will work as someone felt as if that question was solved and was closed..

First one to come up with a working solution, I will gift $10 in bitcoins..

in_array($forum['node_id'], array(73,74,75))

I need to be able to do the above but within a category vs. a forum.
 
Last edited:
Top Bottom