Resource icon

[bd] Widget Framework 2.6.6

No permission to download
Show birthday sort by most post message to least, instead of username.

Find following in Birthday.php
PHP:
        $fetchOptions = array(
            'order' => 'username',
            'join' => XenForo_Model_User::FETCH_USER_PROFILE + XenForo_Model_User::FETCH_USER_OPTION,
        );

replace it with:
PHP:
        $fetchOptions = array(
            //'order' => 'username',
            'order' => 'message_count',
            'direction' => 'DESC',
            'join' => XenForo_Model_User::FETCH_USER_PROFILE + XenForo_Model_User::FETCH_USER_OPTION,
        );
 
Show birthday sort by most post message to least, instead of username.

Find following in Birthday.php
PHP:
        $fetchOptions = array(
            'order' => 'username',
            'join' => XenForo_Model_User::FETCH_USER_PROFILE + XenForo_Model_User::FETCH_USER_OPTION,
        );

replace it with:
PHP:
        $fetchOptions = array(
            //'order' => 'username',
            'order' => 'message_count',
            'direction' => 'DESC',
            'join' => XenForo_Model_User::FETCH_USER_PROFILE + XenForo_Model_User::FETCH_USER_OPTION,
        );
Nice idea. Maybe I will have it as an option in future version.
 
Upgraded xF to 1.4 & WF today, and while some things are working my server logs are pumping out errors and quick.

ErrorException: Undefined variable: forum - library/WidgetFramework/WidgetRenderer.php(498) : runtime-created function:1
 
Upgraded xF to 1.4 & WF today, and while some things are working my server logs are pumping out errors and quick.

ErrorException: Undefined variable: forum - library/WidgetFramework/WidgetRenderer.php(498) : runtime-created function:1
Looks like one of your expressions are using $forum when it is not available. Please check your expression.
 
How would one go about using this?
You put it where you want to stop showing in the full layout. For example. you have a post with 5 long paragraphs, you only want the first two to show up. You only need to put the bb code after the two paragraph and it's done.
 
I have tweaked New Profile Posts block into something bigger:
308nKdm.png


Then edited the Interact to try to give a more "facebookish feeling" to it.
Only trying to poke now how to make the title bar like it displays on the other sidebars. Something is missing because the "border" paddings also don't feel right.

Also @xfrocks i agree with birthday suggestion, also something to avoid those users who register and never post a thing, like 0 messages to not display would be awesome. Most of the users i never heard of, eh!
 
Last edited:
The widgets display, but so does the main xenforo sidebar.
So that means I have two side bars one on top of the other :/

How do I get rid of the xenforo sidebar to display the widget framework one?
 
#0 /home/adminzona/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/adminzona/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/adminzona/public_html/library/XenForo/Model/DataRegistry.php(164): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tINSERT INT...', Array)
#3 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(118): XenForo_Model_DataRegistry->set('wfc__1_forum_li...', Array)
#4 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(69): WidgetFramework_Model_Cache->_set('_1_forum_list_l...', Array)
#5 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(233): WidgetFramework_Model_Cache->setCachedWidgets(Array, 'forum_list_lock...', 1)
#6 /home/adminzona/public_html/library/WidgetFramework/Core.php(576): WidgetFramework_Model_Cache->setLiveCache(Array, 'forum_list_lock...', 1)
#7 /home/adminzona/public_html/library/WidgetFramework/Core.php(625): WidgetFramework_Core->_saveCachedWidget('forum_list_lock...', '1', Array, false, true)
#8 /home/adminzona/public_html/library/WidgetFramework/WidgetRenderer.php(546): WidgetFramework_Core::saveCachedWidget('forum_list_lock...', '1', Array, false, true)
#9 /home/adminzona/public_html/library/WidgetFramework/WidgetRenderer.php(646): WidgetFramework_WidgetRenderer->_acquireLock(Array, 'forum_list', Array)
#10 /home/adminzona/public_html/library/WidgetFramework/Core.php(397): WidgetFramework_WidgetRenderer->render(Array, 'forum_list', Array, Object(XenForo_Template_Public), Object(_WidgetFramework_ArrayOfString))
#11 /home/adminzona/public_html/library/WidgetFramework/Core.php(316): WidgetFramework_Core->_renderWidgetsFor('forum_list', Array, Object(XenForo_Template_Public), '\n\t\n\t\n\t\n\t\t\n\t\t\n\t\t...')
#12 /home/adminzona/public_html/library/WidgetFramework/Listener.php(126): WidgetFramework_Core->renderWidgetsFor('forum_list', Array, Object(XenForo_Template_Public), Array)
#13 [internal function]: WidgetFramework_Listener::template_post_render('forum_list', '\n\n\n\n\n\n\n\t\n\n\n\n\t<o...', Array, Object(XenForo_Template_Public))
#14 /home/adminzona/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#15 /home/adminzona/public_html/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'forum_list')
#16 /home/adminzona/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#17 /home/adminzona/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(123): XenForo_Template_Public->render()
#18 /home/adminzona/public_html/library/XenForo/FrontController.php(618): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#19 /home/adminzona/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#20 /home/adminzona/public_html/index.php(13): XenForo_FrontController->run()
#21 {main}
Request State
array(3) {
["url"] => string(31) "http://adminzona.club/index.php"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
I have tweaked New Profile Posts block into something bigger:
308nKdm.png


Then edited the Interact to try to give a more "facebookish feeling" to it.
Only trying to poke now how to make the title bar like it displays on the other sidebars. Something is missing because the "border" paddings also don't feel right.

Also @xfrocks i agree with birthday suggestion, also something to avoid those users who register and never post a thing, like 0 messages to not display would be awesome. Most of the users i never heard of, eh!
Which position is this? I assume it is a hook position? For hook, the title is pretty small. You can make it look bigger by EXTRA.css :)

Hey :)

Anyone done THIS with WF yet? If you have...how did you achieve it?
I think some people did that. Basically you put this in the wf_widget_online_users template (I haven't tried it myself FYI).
Code:
<xen:if hascontent="true">
<div class="avatarList WidgetFramework_WidgetRenderer_OnlineStaff">
    <ul>
        <xen:contentcheck>
            <xen:foreach loop="$onlineUsers.records" value="$user">
                <xen:if is="(isset({$user.is_staff}) AND {$user.is_staff}) OR (!isset({$user.is_staff}) AND ({$user.is_moderator} OR {$user.is_admin}))">
                    <li class="user-{$user.user_id}">
                        <xen:avatar user="$user" size="s" img="true" />
                        <xen:username user="$user" rich="true" />
                        <div class="userTitle">{xen:helper userTitle, $user}</div>
                    </li>
                </xen:if>
            </xen:foreach>
        </xen:contentcheck>
    </ul>
</div>
</xen:if>
<div class="userList WidgetFramework_WidgetRenderer_OnlineUsers">
    <xen:if is="{$onlineUsers.records}">
        <xen:if is="{$widget.options.hide_following} == 0 AND {$visitor.user_id}">
            <xen:if hascontent="true">
            <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
            <ul class="followedOnline">
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.followed}">
                            <li title="{$user.username}" class="Tooltip user-{$user.user_id}"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
            <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
            </xen:if>
        </xen:if>
       
        <ol class="listInline">
            <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                <xen:if is="{$i} <= {$onlineUsers.limit}">
                    <li class="user-{$user.user_id}">
                    <xen:if is="{$user.user_id}">
                        <xen:username user="$user" rich="@wf_onlineUsers_rich" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                    <xen:else />
                        {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                    </xen:if>
                    </li>
                </xen:if>
            </xen:foreach>
            <xen:if is="{$onlineUsers.recordsUnseen}">
                <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
            </xen:if>
        </ol>
    </xen:if>
   
    <div class="footnote">
        <xen:if is="isset({$onlineUsers.robots})">
            {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
        <xen:else />
            {xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}
        </xen:if>
    </div>
</div>
 
The widgets display, but so does the main xenforo sidebar.
So that means I have two side bars one on top of the other :/

How do I get rid of the xenforo sidebar to display the widget framework one?
As @eberkund have already said, adding "Clear Sidebar" should remove your existing sidebar.
 
I follow your installation and nothing error happen. Widget still appear on public site (same what I set on before version) but nothing appear on Admin Control!
Hmm, that's strange. Make sure you download the package again at xenforo.com and upload the xml again one more time. If it still doesn't work, please start a conversation with me with your site info, I will come by and take a look.
 
#0 /home/adminzona/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/adminzona/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/adminzona/public_html/library/XenForo/Model/DataRegistry.php(164): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tINSERT INT...', Array)
#3 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(118): XenForo_Model_DataRegistry->set('wfc__1_forum_li...', Array)
#4 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(69): WidgetFramework_Model_Cache->_set('_1_forum_list_l...', Array)
#5 /home/adminzona/public_html/library/WidgetFramework/Model/Cache.php(233): WidgetFramework_Model_Cache->setCachedWidgets(Array, 'forum_list_lock...', 1)
#6 /home/adminzona/public_html/library/WidgetFramework/Core.php(576): WidgetFramework_Model_Cache->setLiveCache(Array, 'forum_list_lock...', 1)
#7 /home/adminzona/public_html/library/WidgetFramework/Core.php(625): WidgetFramework_Core->_saveCachedWidget('forum_list_lock...', '1', Array, false, true)
#8 /home/adminzona/public_html/library/WidgetFramework/WidgetRenderer.php(546): WidgetFramework_Core::saveCachedWidget('forum_list_lock...', '1', Array, false, true)
#9 /home/adminzona/public_html/library/WidgetFramework/WidgetRenderer.php(646): WidgetFramework_WidgetRenderer->_acquireLock(Array, 'forum_list', Array)
#10 /home/adminzona/public_html/library/WidgetFramework/Core.php(397): WidgetFramework_WidgetRenderer->render(Array, 'forum_list', Array, Object(XenForo_Template_Public), Object(_WidgetFramework_ArrayOfString))
#11 /home/adminzona/public_html/library/WidgetFramework/Core.php(316): WidgetFramework_Core->_renderWidgetsFor('forum_list', Array, Object(XenForo_Template_Public), '\n\t\n\t\n\t\n\t\t\n\t\t\n\t\t...')
#12 /home/adminzona/public_html/library/WidgetFramework/Listener.php(126): WidgetFramework_Core->renderWidgetsFor('forum_list', Array, Object(XenForo_Template_Public), Array)
#13 [internal function]: WidgetFramework_Listener::template_post_render('forum_list', '\n\n\n\n\n\n\n\t\n\n\n\n\t<o...', Array, Object(XenForo_Template_Public))
#14 /home/adminzona/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#15 /home/adminzona/public_html/library/XenForo/Template/Abstract.php(195): XenForo_CodeEvent::fire('template_post_r...', Array, 'forum_list')
#16 /home/adminzona/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#17 /home/adminzona/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(123): XenForo_Template_Public->render()
#18 /home/adminzona/public_html/library/XenForo/FrontController.php(618): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#19 /home/adminzona/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#20 /home/adminzona/public_html/index.php(13): XenForo_FrontController->run()
#21 {main}
Request State
array(3) {
["url"] => string(31) "http://adminzona.club/index.php"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
You left out the error message so I don't know what is the issue?
 
Which position is this? I assume it is a hook position? For hook, the title is pretty small. You can make it look bigger by EXTRA.css :)


I think some people did that. Basically you put this in the wf_widget_online_users template (I haven't tried it myself FYI).
Code:
<xen:if hascontent="true">
<div class="avatarList WidgetFramework_WidgetRenderer_OnlineStaff">
    <ul>
        <xen:contentcheck>
            <xen:foreach loop="$onlineUsers.records" value="$user">
                <xen:if is="(isset({$user.is_staff}) AND {$user.is_staff}) OR (!isset({$user.is_staff}) AND ({$user.is_moderator} OR {$user.is_admin}))">
                    <li class="user-{$user.user_id}">
                        <xen:avatar user="$user" size="s" img="true" />
                        <xen:username user="$user" rich="true" />
                        <div class="userTitle">{xen:helper userTitle, $user}</div>
                    </li>
                </xen:if>
            </xen:foreach>
        </xen:contentcheck>
    </ul>
</div>
</xen:if>
<div class="userList WidgetFramework_WidgetRenderer_OnlineUsers">
    <xen:if is="{$onlineUsers.records}">
        <xen:if is="{$widget.options.hide_following} == 0 AND {$visitor.user_id}">
            <xen:if hascontent="true">
            <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
            <ul class="followedOnline">
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.followed}">
                            <li title="{$user.username}" class="Tooltip user-{$user.user_id}"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
            <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
            </xen:if>
        </xen:if>
      
        <ol class="listInline">
            <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                <xen:if is="{$i} <= {$onlineUsers.limit}">
                    <li class="user-{$user.user_id}">
                    <xen:if is="{$user.user_id}">
                        <xen:username user="$user" rich="@wf_onlineUsers_rich" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                    <xen:else />
                        {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                    </xen:if>
                    </li>
                </xen:if>
            </xen:foreach>
            <xen:if is="{$onlineUsers.recordsUnseen}">
                <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
            </xen:if>
        </ol>
    </xen:if>
  
    <div class="footnote">
        <xen:if is="isset({$onlineUsers.robots})">
            {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
        <xen:else />
            {xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}
        </xen:if>
    </div>
</div>
Nice one, thank you mate :)

Anyone know how or where to add "Staff" and "Members", to separate the two lists?
cap2.webp
 
Nice one, thank you mate :)

Anyone know how or where to add "Staff" and "Members", to separate the two lists?
View attachment 83899
You can do it like this

Code:
<xen:if hascontent="true">
<h3>Staff</h3>
<div class="avatarList WidgetFramework_WidgetRenderer_OnlineStaff">
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="(isset({$user.is_staff}) AND {$user.is_staff}) OR (!isset({$user.is_staff}) AND ({$user.is_moderator} OR {$user.is_admin}))">
<li class="user-{$user.user_id}">
<xen:avatar user="$user" size="s" img="true" />
<xen:username user="$user" rich="true" />
<div class="userTitle">{xen:helper userTitle, $user}</div>
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
</div>
</xen:if>

<h3>Members</h3>
<div class="userList WidgetFramework_WidgetRenderer_OnlineUsers">
<xen:if is="{$onlineUsers.records}">
<xen:if is="{$widget.options.hide_following} == 0 AND {$visitor.user_id}">
<xen:if hascontent="true">
<h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
<ul class="followedOnline">
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.followed}">
<li title="{$user.username}" class="Tooltip user-{$user.user_id}"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
<h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
</xen:if>
</xen:if>

<ol class="listInline">
<xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
<xen:if is="{$i} <= {$onlineUsers.limit}">
<li class="user-{$user.user_id}">
<xen:if is="{$user.user_id}">
<xen:username user="$user" rich="@wf_onlineUsers_rich" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
<xen:else />
{xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
</xen:if>
</li>
</xen:if>
</xen:foreach>
<xen:if is="{$onlineUsers.recordsUnseen}">
<li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
</xen:if>
</ol>
</xen:if>

<div class="footnote">
<xen:if is="isset({$onlineUsers.robots})">
{xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
<xen:else />
{xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}
</xen:if>
</div>
</div>
 
Top Bottom