BobbyWibowo
Well-known member
Q: How to display a widget on forumid x, y, z?Is it possible to define the position of a widget as something like 'all except one page'?
A: You can use this with "forum_view" position or similar:
PHP:
in_array($forum['node_id'], array(x, y, z))
A: You can use this with "forum_view" position or similar:
PHP:
in_array($forum['node_id'], array(x, y, z)) == false
A: Yes, you can use this with "forum_view" position or similar:
PHP:
$forum['parent_node_id'] == <category-id>
A: You can use this with "pagenode_container" position:
PHP:
$page['node_id'] == <page-node-id>
A: You can use this with "resource_category" position:
PHP:
$category['resource_category_id'] == 34
A: You can use this with "resource_view" position:
PHP:
$resource['resource_id'] == x
Q: How do I hide a widget from members - so just display it to guests?Is it possible to only have widgets shown to registered members?
A: Use this in the Expression field:
PHP:
$visitor['user_id'] == 0
A: You can use this:
PHP:
$visitor['user_id'] != 0
I don't know how widget page works, to be honest. I've never bothered to try it. But if you can use template conditionals there, consider XenForo Helper ismemberof: https://xenforo.com/community/threa...tiple-usergroup-ids-in-1-1.18199/#post-237839.Is there anyone who did it till now?
How to add usergroup permission in widget page?
I added some renderer for my add-on that shows some part of the add-on as widget, and just want to let admins to override related usergroup permissions for that widget.
@cclaerhout