Resource icon

[bd] Widget Framework 2.6.6

No permission to download
Thanks for this great add on. Just updated to the latest version.

Favourite block at the moment would have to be the one where you can display a poll from a specified thread.
 
How to see that? I install this plugin and I'll see it there or something?

I am all new to this so..I hope you can help me more on this issue.

Thanks!
Go the AdminCP > Appearances > Add Widget (on the left side). You will have some renderers to choose. Read the instruction on that page to continue.
 
We found a lot of empty "widget-container" DIVs in the source code.

This seems to be a minor bug.

I recommend changing the "wf_widget_wrapper" template from:
Code:
<xen:require css="wf_default.css" />
 
<xen:if is="{xen:count $tabs} > 1">
    <xen:comment>We are rendering tabs</xen:comment>
    <div class="section widget-container widget-tabs">
        <div class="primaryContent">
            <ul class="tabs Tabs" data-panes="#widget-tabs-{$groupId} > li">
                <xen:foreach loop="$tabs" value="$tab">
                    <xen:if is="{$tab.html}">
                        <li>
                            <a href="{$requestPaths.requestUri}#widget-tab-{$tab.widget_id}">
                                <h3>{xen:raw $tab.title}</h3>
                            </a>
                        </li>
                    </xen:if>
                </xen:foreach>
            </ul>
        </div>
        <div style="clear: both; height: 0px;">&nbsp;<!-- dirty fix, sorry --></div>
        <div class="secondaryContent" id="widget-group-{$groupId}">
            <ul id="widget-tabs-{$groupId}">
                <xen:foreach loop="$tabs" value="$tab">
                    <xen:if is="{$tab.html}">
                        <li id="widget-tab-{$tab.widget_id}" class="widget {$tab.class}">
                            <ul>
                                {xen:raw $tab.html}
                            </ul>
                        </li>
                    </xen:if>
                </xen:foreach>
            </ul>
        </div>
    </div>
<xen:else />
    <xen:comment>Simpler case: just a single widget</xen:comment>
    <div class="section widget-container">
        <xen:foreach loop="$tabs" value="$tab">
            <div class="secondaryContent widget {$tab.class}" id="widget-{$tab.widget_id}">
                <xen:if is="{$tab.html}">
                    <h3>
                        <xen:if is="{$tab.extraData.link}">
                            <a href="{$tab.extraData.link}">{xen:raw $tab.title}</a>
                        <xen:else />
                            {xen:raw $tab.title}
                        </xen:if>
                    </h3>
                    {xen:raw $tab.html}
                </xen:if>
            </div>
        </xen:foreach>
    </div>
</xen:if>

TO:
Code:
<xen:require css="wf_default.css" />
 
<xen:if is="{xen:count $tabs} > 1">
    <xen:comment>We are rendering tabs</xen:comment>
    <div class="section widget-container widget-tabs">
        <div class="primaryContent">
            <ul class="tabs Tabs" data-panes="#widget-tabs-{$groupId} > li">
                <xen:foreach loop="$tabs" value="$tab">
                    <xen:if is="{$tab.html}">
                        <li>
                            <a href="{$requestPaths.requestUri}#widget-tab-{$tab.widget_id}">
                                <h3>{xen:raw $tab.title}</h3>
                            </a>
                        </li>
                    </xen:if>
                </xen:foreach>
            </ul>
        </div>
        <div style="clear: both; height: 0px;">&nbsp;<!-- dirty fix, sorry --></div>
        <div class="secondaryContent" id="widget-group-{$groupId}">
            <ul id="widget-tabs-{$groupId}">
                <xen:foreach loop="$tabs" value="$tab">
                    <xen:if is="{$tab.html}">
                        <li id="widget-tab-{$tab.widget_id}" class="widget {$tab.class}">
                            <ul>
                                {xen:raw $tab.html}
                            </ul>
                        </li>
                    </xen:if>
                </xen:foreach>
            </ul>
        </div>
    </div>
<xen:elseif is="{xen:count $tabs} == 1" />
    <xen:comment>Simpler case: just a single widget</xen:comment>
    <div class="section widget-container">
        <xen:foreach loop="$tabs" value="$tab">
            <div class="secondaryContent widget {$tab.class}" id="widget-{$tab.widget_id}">
                <xen:if is="{$tab.html}">
                    <h3>
                        <xen:if is="{$tab.extraData.link}">
                            <a href="{$tab.extraData.link}">{xen:raw $tab.title}</a>
                        <xen:else />
                            {xen:raw $tab.title}
                        </xen:if>
                    </h3>
                    {xen:raw $tab.html}
                </xen:if>
            </div>
        </xen:foreach>
    </div>
</xen:if>

<xen:else /> is replaced by <xen:elseif is="{xen:count $tabs} == 1" />
 
I don't know, if someone mentioned it before, but for all of you using this addon and experience performance issues:

This addon has a debug setting for the developer that disables the caching system if "debug" is enabled at XenForos config.php. We have debug enabled at XenForo all the time, but only for the IP addresses of our developers. So all of our developers experienced slow downs when browsing our site, which makes use of Widget Framework at almost all pages, most bad at pages with the Thread Widget.

Since we do not really need to debug WF, we disabled the debug function in Widget Framework with a core file edit (Core.php). Now our developers can browse our site more quickly.

xfrocks, may I recommend that you choose to allow debug for Widget Framework to be set independently from Xenforo? This may solve a lot of performance issues some boards owners experience. ;)
 
I don't know, if someone mentioned it before, but for all of you using this addon and experience performance issues:

This addon has a debug setting for the developer that disables the caching system if "debug" is enabled at XenForos config.php. We have debug enabled at XenForo all the time, but only for the IP addresses of our developers. So all of our developers experienced slow downs when browsing our site, which makes use of Widget Framework at almost all pages, most bad at pages with the Thread Widget.

Since we do not really need to debug WF, we disabled the debug function in Widget Framework with a core file edit (Core.php). Now our developers can browse our site more quickly.

xfrocks, may I recommend that you choose to allow debug for Widget Framework to be set independently from Xenforo? This may solve a lot of performance issues some boards owners experience. ;)
I believe xfrocks mentioned this at some point in this thread or directly to me.
 
I don't know, if someone mentioned it before, but for all of you using this addon and experience performance issues:

This addon has a debug setting for the developer that disables the caching system if "debug" is enabled at XenForos config.php. We have debug enabled at XenForo all the time, but only for the IP addresses of our developers. So all of our developers experienced slow downs when browsing our site, which makes use of Widget Framework at almost all pages, most bad at pages with the Thread Widget.

Since we do not really need to debug WF, we disabled the debug function in Widget Framework with a core file edit (Core.php). Now our developers can browse our site more quickly.

xfrocks, may I recommend that you choose to allow debug for Widget Framework to be set independently from Xenforo? This may solve a lot of performance issues some boards owners experience. ;)
Yeah, I will make it independent from XenForo's in the next version. As you are a developer, why don't you send a pull request my way? ;)

Hey xfrocks,

Do these instructions still work?

http://xenforo.com/community/threads/bd-widget-framework.28014/page-13#post-353641

When I follow the steps I'm getting this:

The server responded with an error. The error message is in the JavaScript console.
It should work. If you encountered an error, check your widget, class, etc.

Last question I saw this post:

http://xenforo.com/community/threads/bd-widget-framework.28014/page-22#post-404652


Is there a way to apply those expressions to specific pages? Doesn't seem to be working, I threw in contentTemplate there too but I was guessing :)
Which conditional are you trying to use? It should work.
 
Yeah, I will make it independent from XenForo's in the next version. As you are a developer, why don't you send a pull request my way? ;)


It should work. If you encountered an error, check your widget, class, etc.


Which conditional are you trying to use? It should work.


I tried in the expression:

Code:
in_array($contentTemplate['node_id'], array(66, 76, 67))

and


Code:
in_array($contentTemplate, array(X, Y, Z))

For the position I put pagenode_container
 
It should work. If you encountered an error, check your widget, class, etc.

Here's how I have it:

widget2.webp

widget1.webp

code in BackLink.php

Code:
class GamerExit_WidgetRenderer_BackLink
{
public static function render(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject)
{
ob_start();
require('/dayz/dayzstats.php');
$contents = ob_get_clean();
 
return $contents;
}
}


My file is in public_html/dayz


^-- With this setup I click Save All changes and I get:

The server responded with an error. The error message is in the JavaScript console.
 
I tried in the expression:

Code:
in_array($contentTemplate['node_id'], array(66, 76, 67))

and


Code:
in_array($contentTemplate, array(X, Y, Z))

For the position I put pagenode_container
Those won't work. You should use this
Code:
in_array($page['node_id'], array(...))

Here's how I have it:
...
^-- With this setup I click Save All changes and I get:

The server responded with an error. The error message is in the JavaScript console.
The path for require is incorrect. You must use absolute path (should be something like /home/username/public_html/dayz/dayzstats.php). Also, copy the JavaScript console error message if possible.
 
Those won't work. You should use this
Code:
in_array($page['node_id'], array(...))


The path for require is incorrect. You must use absolute path (should be something like /home/username/public_html/dayz/dayzstats.php). Also, copy the JavaScript console error message if possible.

Fixed the path, error still exists:

Code:
--
[19:50:44.861] PHP class GamerExit_WidgetRenderer_BackLink
{
public static function render(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject)
{
ob_start();
require('/home/********/public_html/dayz/dayzstats.php');
$contents = ob_get_clean();
 
return $contents;
}
}{"error":["Please enter a valid callback method."],"templateHtml":"\n\n<div class=\"errorOverlay\">\n\t<a class=\"close OverlayCloser\"><\/a>\n\t\n\t\t<h2 class=\"heading\">The following error occurred:<\/h2>\n\t\t\n\t\t<div class=\"baseHtml\">\n\t\t\n\t\t\t<label for=\"ctrl_0\" class=\"OverlayCloser\">Please enter a valid callback method.<\/label>\n\t\t\n\t\t<\/div>\n\t\n<\/div>","_visitor_conversationsUnread":"0","_visitor_alertsUnread":"15"} @ http://gamerexit.com/js/xenforo/xenforo.js?_v=bba17b4a:195
 
Fixed the path, error still exists:
...
Ah, you need to put "<?php" at the beginning of your file. Something like this

Code:
<?php
class GamerExit_WidgetRenderer_BackLink
{
public static function render(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject)
{
ob_start();
require('/home/********/public_html/dayz/dayzstats.php');
$contents = ob_get_clean();
 
return $contents;
}
 
Ah, you need to put "<?php" at the beginning of your file. Something like this

Code:
<?php
class GamerExit_WidgetRenderer_BackLink
{
public static function render(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject)
{
ob_start();
require('/home/********/public_html/dayz/dayzstats.php');
$contents = ob_get_clean();
 
return $contents;
}

Awesome!!!!! Thanks so much xfrocks
 
Great addon! And since it works without problems at my board, i only have a little suggestion:

Would it be possible to add a little seperator for the Feed Reader? It's currently difficult to see where one headline ends and the next begins. Even just a thin line or a little dot/arrow at the start of each headline would be enough.

Again, thanks for your fantastic work!
 
Top Bottom