Resource icon

[bd] Widget Framework 2.6.6

No permission to download
F0r the first one it should be something to this effect:

PHP:
{$contentTemplate} == 'forum_list' OR {$contentTemplate} == 'forum_view' OR {$contentTemplate} == 'thread_reply'

This will also work:

PHP:
{$contentTemplate} == 'forum_list' || {$contentTemplate} == 'forum_view' || {$contentTemplate} == 'thread_reply'
 
F0r the first one it should be something to this effect:

PHP:
{$contentTemplate} == 'forum_list' OR {$contentTemplate} == 'forum_view' OR {$contentTemplate} == 'thread_reply'

This will also work:

PHP:
{$contentTemplate} == 'forum_list' || {$contentTemplate} == 'forum_view' || {$contentTemplate} == 'thread_reply'

Awesome, that worked. Thanks a lot!

Any idea about the second issue I have?
 
I'm sure this has been asked a million times, but I can't find the answer. How do I make it so that my "recent threads" widget only shows up on the home page (forum list)?
 
Last edited:
I'm sure this has been asked a million times, but I can't find the answer. How do I make it so that my "recent threads" widget only shows up on the home page (forum list)?

Use this conditional.
PHP:
{$contentTemplate} == 'forum_list'
The widget will only show up in forum_list then.
 
You seem to be not using the BETA version. The BETA version uses "conditionals" instead of "expressions". Try to remove the {} tag and try again.
 
@xfrocks

Compact view does not display sticky threads unless sticky thread only is selected. (widget type: new posts)

Compact view also does not respect users' ignore settings.

Hope you fix these issues in the next beta.

Thank you.
 
Last edited:
@xfrocks

Compact view does not display sticky threads unless sticky thread only is selected. (widget type: new posts)

Compact view also does not respect users' ignore settings.

Hope you fix these issues in the next beta.

Thank you.
Justed tested with sticky thread option empty + type new post and it seems to work correctly. I also tested with the other two sticky thread options (yes/no). The query is the same for all layout btw. So maybe something else is causing your issue?
 
@Tealk try this if you want to make it appear to users who are in either usergroup 1 or usergroup 2:
Code:
{$contentTemplate} == 'forum_list' && ({xen:helper ismemberof, $visitor, 1} || {xen:helper ismemberof, $visitor, 2})
Thank you, and is it possible that only groups 1 and 2 will see the field if they have no subgroups?
 
Last edited:
@Tealk You want to target users that have either usergroup 1 or 2 as the their primary usergroup but those users must NOT have any secondary usergroup? Er, I think you can use a template helper/function to check whether "secondary usergroup" array of user is filled or not, alongside the previous conditionals. Unfortunately, I can't remember the exact keyword and I can't get on PC to check it out for the time being.

It's not recommended to use anything other than "Registered" as the primary usergroup though. So usually you only check on their "secondary usergroup", which 'ismemberof' can do well.

edit: If it's possible to check the content of "secondary usergroup" array, it should be possible to explicitly check only the "primary usergroup". Unfortunately I can't test my conjecture for the time being.
 
@Tealk You want to target users that have either usergroup 1 or 2 as the their primary usergroup but those users must NOT have any secondary usergroup?
Yes, all users with a specific secondary usergroup schould not see the box. Or only Registered without a secondary group.

And has someone an idea why the order is wrong?
Widget Type: New Threads
upload_2017-2-21_9-45-25.webp
 
Last edited:
PHP 7.1 is too strict (had to update my Advanced Styling Rules add-on because of a similar fatal error).

error.webp

Code:
@@ -87,7 +87,7 @@
                 {
                     $tab['selected'] = true;
                     $selected = true;
-                   break 2;
+                   break;
                 }
             }
         }

EDIT:
The latest version has that fixed.
Conveniently, it can be found at the developer's website and on github: github.com/xfrocks/bdWidgetFramework
 
Last edited:
While adding a widget, every time I just select PHP callback renderer, I get an error "Please enter a valid callback method." All I do is select PHP callback and it doesn't give me a chance do to anything else and display this error. Any idea why?
 

Attachments

  • error.webp
    error.webp
    17.8 KB · Views: 16
I'm trying to create a feature that allows users to cycle through the normal info shown on sidebars, because my sidebar is fixed but I still want to display everything in it. I'm looking for something similar to this website's sidebar, where the Xs toggle the different tabs. I've tried out a ton of codes already, and in the end result none of them have any real similarity to what I'm looking for, so I'm desperate at this point. How can I code this with the Widget Framework? I really have no idea what I'm doing with this add on, to be honest.
 
@aeriverse Are you using the BETA version? In the BETA version, you can "group" multiple widgets and then you can choose the group to display as tabbed widgets. It used to have some bugs in the old BETA version, but the bugs may have been fixed by now.

edit: I attached an example from my site.
 

Attachments

  • 1488731962104screencapture.webp
    1488731962104screencapture.webp
    36.1 KB · Views: 13
Last edited:
@aeriverse Are you using the BETA version? In the BETA version, you can "group" multiple widgets and then you can choose the group to display as tabbed widgets. It used to have some bugs in the old BETA version, but the bugs may have been fixed by now.

edit: I attached an example from my site.

I'm not sure what you mean by BETA version, but what would be the code for this grouping widget?
 
Top Bottom