Resource icon

[bd] Widget Framework 2.6.6

No permission to download
  1. Argument 1 passed to XenForo_Template_Helper_Core::helperUserNameHtml() must be of the type array, null given in /vagrant/public_html/gtswarm/public_html/library/XenForo/Template/Helper/Core.php, line 1671
  2. Argument 1 passed to XenForo_Template_Helper_Core::getUserHref() must be of the type array, null given, called in /vagrant/public_html/gtswarm/public_html/library/XenForo/Template/Helper/Core.php on line 1687 and defined in /vagrant/public_html/gtswarm/public_html/library/XenForo/Template/Helper/Core.php, line 1572

For any developers here, looking for some tips on how to make a template for your addon to be compatible with the widget framework. I am getting the above errors with a custom template I am loading using responseView function through a class that extends XenForo_ControllerPublic_Abstract.

While some of the widget load fine, widgets like the forum stats one load with no stats (and the errors listed above) and the threads renderer widgets can't even be saved to the template.

So I get a feeling I need to somehow my addon compatible with the widgets framework by loading some of the necessary data that the widgets require but I'm not exactly sure how to go about doing that.

Any pointers would be greatly appreciated.

Thanks!
 
On a widget page I want to add a widget with a PHP callback renderer. I can define a class and a method for this callback, that's fine. But what I would need in addition is the possibiltiy to pass arguments (2 strings) to this callback function. Any ideas how I can do this? @xfrocks
 
I am trying to following the faq to no avail and wondering if someone can help.
Trying to use advanced html widget and setup a iframe up - thats np.
But I want it to only show on user group 3 - np

But I also want it to show on forum id: 23 only in forum view.

Any ideas on how I do this with expression?

Thanks
 
@slewis1972 With the BETA version, you can no longer use expressions, but instead conditionals. And with conditionals, I'm assuming the following will work:
HTML:
{$contentTemplate} == 'forum_view'
{$forum.node_id} == '23'
{xen:helper ismemberof, $visitor, 3}
Or maybe it has to be written as a single-line conditionals, like this:
HTML:
{$contentTemplate} == 'forum_view' && {$forum.node_id} == '23' && {xen:helper ismemberof, $visitor, 3}
 
Hi
Ok - upgraded to beta 13

Ref the node bit, I get error: Undefined variable: forum

Also, the layout editor, wants to put everything in sidebar. its all out of whack with page layout. I use pixel edit theme.

Any help appreciated.
 
Also, the layout editor, wants to put everything in sidebar.
I dont can confirm this. Look at https://xen-hilfe.de under the navigation the resources widget is position is made with the WF Layout Editor (Beta 13).

I use pixel edit theme.
That theme brings up another problem when you use the "Sticky Sidebar" feature and floating navigation. When you scroll down, the sidebar widgets stay, but also the other non-sidebar widgets... We have disabled the "Sticky Sidebar" from Pixel Exit and now it works.

Works the WF with the default style on your site?
 
Created a new test style (default look) and same issue with layout editor all messed up. See attached.
 

Attachments

  • snip_20160815125947.webp
    snip_20160815125947.webp
    19.2 KB · Views: 10
Ok, got it to view now in just node 23 with {$forum.node_id} == '23' && {xen:helper ismemberof, $visitor, 3}

Layout editor is still out of whack...hmm
 
@slewis1972 I believe this bit is important to prevent "Undefined variable: forum":
Code:
{$contentTemplate} == 'forum_view'
in non-forum_view pages (such as threads, members, etc).
 
I created a widget that ads a sidebar to all pages. Is there an option to select which styles to include or exclude?

I want the extra sidebar on one style, but not another.

Thank you.
 
I created a widget that ads a sidebar to all pages. Is there an option to select which styles to include or exclude?

I want the extra sidebar on one style, but not another.

Thank you.
If you're using the BETA version, you can use conditionals:
Code:
{$visitor.style_id} == STYLE_ID
 
Hello,

I want to make 1 sidebar f or guests and members to be the same.
But somehow I keep struggling, I removed the New post and forum statistics from showing up, and this works for when members are logged in, but not for a guest. See the 2 screenshots attached.

Guest:

Members:


I am running Widget Framework on my forum.
 
@midego Did you use [bd] Cache by any chance? The guests-facing page might have been cached by that add-on. And if you didn't, both guests and members should have seen the same widgets technically (yeah, it shouldn't depend on browser's cache). Though don't quote me on that, I'm just assuming based on observation from tweaking widgets in my site.
 
Top Bottom