Resource icon

[bd] Widget Framework 2.6.6

No permission to download

HenrikHansen

Well-known member
Yes, then you should use category_view in position.
You can show in more nodes at the same time, see last example below

A single page: $page['node_id'] == 50 (change 50 your page id)
A single thread: $thread['thread_id']==31 (change 31 to your id)
A single category: $forum['parent_node_id'] == $3 (change 3 to your id)
Shown in forum 2 and 3: in_array($forum['node_id'], array(2,3))
 
  • Like
Reactions: TJA

TJA

Well-known member
Yes, then you should use category_view in position.
You can show in more nodes at the same time, see last example below

A single page: $page['node_id'] == 50 (change 50 your page id)
A single thread: $thread['thread_id']==31 (change 31 to your id)
A single category: $forum['parent_node_id'] == $3 (change 3 to your id)
Shown in forum 2 and 3: in_array($forum['node_id'], array(2,3))

Perfect, thank you for your advice.
 

RustyDogma

Member
Hi again,
I have issues understanding the 'position system' for a widget front page.

I understand that the positions are placed like in this example:

View attachment 75234

The top 0 position is not an issue to me. The widgets are placed like a charm - but it's when I try and place the widgets underneath the row 0 I have issues. I just don't seem to manage placing them correctly and when I type position 4, the row will be shown in position 1 instead and reverse. It's very frustrating.

This is the Widget Page:
View attachment 75235

And this is the position settings:

View attachment 75236

The one there should be shown in the top under row 0, but it's shown on position 4.

Perhaps I'm setting the positions wrong or something. All help is welcome - I spent too much time on it already ;)

Thank you

I'm having these exact problems and was wondering if you ever got this resolved.
 

Mr Lucky

Well-known member
Basic question here:

I can see how to add a widget to a certain page and I can see how to add a widget at a certain position on a page (hook), but how do I do both at once?

It seems to be or, not and

- Or you can input a comma separated list of templates that need the widget. Popular templates: forum_list (the index page), forum_view (the individual forum page), thread_view (the thread page).
- Or you can input a comma separated list in the format of "hook:hook_name" to render the widget directly to the hook. For example: "hook:page_container_content_top" will make the widget visible at the top of the page, on every page.


Thanks
 

Nevil

Member
Hi. I did WidgetPage as a homepage. Shutdown option "Show child nodes in navtab" does not work - links still displayed.
 

BassMan

Well-known member
You could try what I have implemented so that any staff member who is hiding their online status appears faded. Edit the wf_widget_online_staff template:

Replace
Code:
<li class="user-{$user.user_id}">
With
Code:
<li class="user-{$user.user_id}"{xen:if '!{$user.visible}',' style="opacity:0.4;"'}>

I'm sure further code could be added to only fade administrators if you wanted but I'm not entirely sure what it would be.
I want that the block won't show for me (super admin), if I'm offline. Now it's always visible (but just for me).
 

TeflonDon

Well-known member
Is there an expression I can use to make a widget not show up in threads. I have a widget that I'd like to only appear on the node list.
 

BassMan

Well-known member
I'm using the below content hook with an expression to limit it to one forum. Just don't want the widget in threads.
Oh, I thought you mean sidebar. Then I don't know how, sorry...

Also wondering how to show widget for example on below content hook, but only on specified node, forum or resource?
 

TeflonDon

Well-known member
Oh, I thought you mean sidebar. Then I don't know how, sorry...

Also wondering how to show widget for example on below content hook, but only on specified node, forum or resource?

Check the link in FAQ

Q: How to display a widget on forumid x, y, z?
A: You can use this with "forum_view" position or similar:
PHP:
in_array($forum['node_id'], array(x, y, z))
 

BassMan

Well-known member
Check the link in FAQ

Q: How to display a widget on forumid x, y, z?
A: You can use this with "forum_view" position or similar:
PHP:
in_array($forum['node_id'], array(x, y, z))
Yes, I've already looked at this, but don't know how to show only on resource page, for example under description in position resource_view_tabs.

Also don't understand that x, y, z thing. What to enter here.
 

TeflonDon

Well-known member
Yes, I've already looked at this, but don't know how to show only on resource page, for example under description in position resource_view_tabs.

Also don't understand that x, y, z thing. What to enter here.

Not sure I understand and I'm not familiar with the positions in the RM. You want to show the widget on the resource index only? Only in resources?
 

BassMan

Well-known member
Not sure I understand and I'm not familiar with the positions in the RM. You want to show the widget on the resource index only? Only in resources?
Only on resource view under description for example.

But what about those x, y, z? Can you post me example of edited code expression like you have? Then I'll faster figure out how to set it up for my forum.
 

TeflonDon

Well-known member
Only on resource view under description for example.

But what about those x, y, z? Can you post me example of edited code expression like you have? Then I'll faster figure out how to set it up for my forum.

Putting this in expressions will show the widget in forums with a node ID of 1, 5 and 6
Code:
in_array($forum['node_id'], array(1, 5, 6))

This one would show the widget only to users with a user ID of 1 and 100
Code:
in_array($visitor['user_id'], array(1, 100))
 

nrep

Well-known member
Is there a conditional available to use in PAGE_CONTAINER to check if the current page is a widget page set as the homepage? I've got a conditional I'd like to add in to an existing template modification so that something will display on the root portal page, which is a widget page set as index.
 
Top