Resource icon

[bd] Widget Framework 2.6.6

No permission to download
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>
Oh yes, that looks much better, thank you.

Although, oddly, now that I have added this, my Latest posts widget has disappeared from the forum home page! Not from the threads or CTA homepage....just forum home.

o_O
 
Oh yes, that looks much better, thank you.

Although, oddly, now that I have added this, my Latest posts widget has disappeared from the forum home page! Not from the threads or CTA homepage....just forum home.

o_O
Try turning this widget on and off to see if it affects the other widget? They should not interfere in anyway though.
 
Weird...

I have reverted the template, deleted and re-created the widget but it's still not showing on the forum_list. It's fine on the other pages...

If it helps, here's my widget list:
cap3.webp

I am running xF 1.4
 
Last edited:
They look right (position 0x0 and position 1x0). Try pressing the save button on each widget?

I have a major rebuild of the layout editor, maybe I will release a beta for you if the above suggestion doesn't work...
No go, unfortunately. I pressed save on each widget and it made no difference. I appreciate that offer :)
 
Reporting a bug:

library/WidgetFramework/WidgetRenderer/ShareThisPage.php, WidgetFramework_WidgetRenderer_ShareThisPage::_render(), around line 35:

$params is provided for convenience. It is a subset of $renderTemplateObject->_params. Re-merging the entire array back into _params via $renderTemplateObject->setParams() is an extremely expensive operation and has no effect. When XenForo_Application::mapMerge() is replace with its built-in equivalent for PHP 5.3+, array_replace_recursive(), PHP errors out, complaining about circular references. (I don't actually see any circular references; I think it just has a depth limit.)

Removing this unnecessary code decreases index page processing times by around 20-50 ms using XenForo's mapMerge implementation. The widget continues to function normally.
 
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 :)
Oh that's why, how can i reproduce it like the normal sidebar paddings / titlebar?
pLuX98R.png

The hook doesn't display that Title and Separator. Not sure what should i target via css hm
 
No go, unfortunately. I pressed save on each widget and it made no difference. I appreciate that offer :)
It is available here https://xfrocks.com/widget-framework/threads/bd-widget-framework-v2-6-0-beta.313/

Reporting a bug:

library/WidgetFramework/WidgetRenderer/ShareThisPage.php, WidgetFramework_WidgetRenderer_ShareThisPage::_render(), around line 35:

$params is provided for convenience. It is a subset of $renderTemplateObject->_params. Re-merging the entire array back into _params via $renderTemplateObject->setParams() is an extremely expensive operation and has no effect. When XenForo_Application::mapMerge() is replace with its built-in equivalent for PHP 5.3+, array_replace_recursive(), PHP errors out, complaining about circular references. (I don't actually see any circular references; I think it just has a depth limit.)

Removing this unnecessary code decreases index page processing times by around 20-50 ms using XenForo's mapMerge implementation. The widget continues to function normally.
Nice find. I have applied the change to the code. It will be available in the next version.
 
Oh that's why, how can i reproduce it like the normal sidebar paddings / titlebar?
pLuX98R.png

The hook doesn't display that Title and Separator. Not sure what should i target via css hm
Try this maybe?
Code:
.WidgetFramework_WidgetRenderer_ShareThisPage h3 { font-size: 2em; }
 
Try this maybe?
Code:
.WidgetFramework_WidgetRenderer_ShareThisPage h3 { font-size: 2em; }
That helped, targeted .WidgetFramework_WidgetRenderer_ProfilePosts, but won't display it with the visual from the normal sidebar hm, specially the borders paddings and the Title > Style HR hm
 
Hi @xfrocks,

I have created a few widget which was used the [Advanced] HTML for the Renderer. I saw it displayed as in the browser such as "#widget-13.secondaryContent.widget.WidgetFramework_WidgetRenderrer_Html", "#widget-14.secondaryContent.widget.WidgetFramework_WidgetRenderrer_Html",....

I wanna insert the icons in the sidebar title with different icon for each widget which created. Can i put some CSS code based on the widget number which highlighted in the red color as above?

Thanks!
 
Has anybody ever figured out why the template "find_new_posts" doesn't work for attempting to order widgets on the new posts page? I've seen this come up a lot, but there has never been an answer (at least that I can find).

The name of the template is "find_new_posts". Adding exactly that string to template list of a widget results in nothing. The only way to get a widget on that page is to add it to "all" instead..

Any solutions out there?

I have been able to successfully add widgets to the page by adding a custom hook location within the template code, but that doesn't add it to the sidebar.
 
Has anybody ever figured out why the template "find_new_posts" doesn't work for attempting to order widgets on the new posts page? I've seen this come up a lot, but there has never been an answer (at least that I can find).

The name of the template is "find_new_posts". Adding exactly that string to template list of a widget results in nothing. The only way to get a widget on that page is to add it to "all" instead..

Any solutions out there?

I have been able to successfully add widgets to the page by adding a custom hook location within the template code, but that doesn't add it to the sidebar.

Found it .. arg. That page has a wrapper, so you have to use "find_new_wrapper" ..
 
That helped, targeted .WidgetFramework_WidgetRenderer_ProfilePosts, but won't display it with the visual from the normal sidebar hm, specially the borders paddings and the Title > Style HR hm
If you want it to be identical to the sidebar look, it will take sometime. Basically just inspect the widget in sidebar and redo those for the widget in hook. But personally I think it doesn't need to be identical ;)

Found it .. arg. That page has a wrapper, so you have to use "find_new_wrapper" ..
Hah, I was gonna tell you just that!
 
Top Bottom