Resource icon

[bd] Widget Framework 2.6.6

No permission to download
I want to individually adjust the top padding of the items in sidebar.
I have installed the Widget Framework and some sidebar items need to be configured for top padding. However not sure where I need to go.

This is my site talkutube.com

Please help
 
Suggestion: For a widgets position, allow the use of a negative to denote exclusion. For example "all, -thread_view", meaning to show the widget on all pages except the thread_view pages.
 
Using the "all" position may cause issue with server performance. This is a known problem and I will try to fix it in future versions. In the meantime, please consider more specific positions.
Thanks for confirming this as it literally almost drove me nuts why it didn't want to work on our boards. Would be fantastic if this can be fixed in a future release.

Thanks for the ongoing support of this mod xfrocks (y)
 
Is is somehow possible to add a link with the forum name instead of the username, in the Recent threads widget?

I think the origin forum of a thread would be more usefull than the posting username which I have already added to the avatar title instead.

I have tried the following:
Code:
<div class="userTitle">
posted in <a href="{xen:link 'forums', {xen:array 'node_id={$thread.node_id}', 'title={$thread.forum_title}'}}">[{$thread.forum_title}]</a></div>
but the link does not point to the seo friendly url and the forum name just dont show at all.

Any ideas?
 
Hey,

i can't really figure out how that php callback widget is supposed to work. I want the widget to include a php file so the stuff out of that is displayed there. I would be glad if someone could explain in detail what exactly i have to do there to make it work.
 
I am trying to add widgets to a page node, and I managed to do it using "pagenode_container" and expression "$page['node_id'] == xx". However, the Clear Sidebar widget does not remove visitors panel. If I remove the expression, it even adds it to the others. I thought this was fixed ages ago?

That said, it seems hiding visitor panel does not work at all on my forum.

Addons:

Donation Manager 1.0.1
Nodes As Tabs 1.1.3
Post Message Regex Replacer 1.0.0
Registration Form Timer 2.0
Tapatalk 1.5.0
Top Users 1.1.3
WF - XenAtendo Upcoming Events 1.0.1
Widget for Donation Manager 1
XFA - BBCode for tabs 1.0.3
[8wayRun.Com] XenAtendo (Events) 1.4.8
[8wayRun.Com] XenPorta (Portal) 1.5.5
[bd] Widget Framework 2.1.1
[Tinhte] Attach Image Optimization 2.2.9
 
Is is somehow possible to add a link with the forum name instead of the username, in the Recent threads widget?

I think the origin forum of a thread would be more usefull than the posting username which I have already added to the avatar title instead.

I have tried the following:
Code:
<div class="userTitle">
posted in <a href="{xen:link 'forums', {xen:array 'node_id={$thread.node_id}', 'title={$thread.forum_title}'}}">[{$thread.forum_title}]</a></div>
but the link does not point to the seo friendly url and the forum name just dont show at all.

Any ideas?
There is no "forum_title" included so you can't do this for now. But I will consider it in the next version.
 
Hey,

i can't really figure out how that php callback widget is supposed to work. I want the widget to include a php file so the stuff out of that is displayed there. I would be glad if someone could explain in detail what exactly i have to do there to make it work.
It's very simple. You should create a file in the xenforo/library and name it "CallbackClass.php", the content should be

PHP:
<?php
 
class CallbackClass {
public static function callback(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject) {
return 'this is some custom html';
}
}

Then you can enter "CallbackClass" for the callback class and "callback" for the callback method.
 
I am trying to add widgets to a page node, and I managed to do it using "pagenode_container" and expression "$page['node_id'] == xx". However, the Clear Sidebar widget does not remove visitors panel. If I remove the expression, it even adds it to the others. I thought this was fixed ages ago?

That said, it seems hiding visitor panel does not work at all on my forum.

Addons:

Donation Manager 1.0.1
Nodes As Tabs 1.1.3
Post Message Regex Replacer 1.0.0
Registration Form Timer 2.0
Tapatalk 1.5.0
Top Users 1.1.3
WF - XenAtendo Upcoming Events 1.0.1
Widget for Donation Manager 1
XFA - BBCode for tabs 1.0.3
[8wayRun.Com] XenAtendo (Events) 1.4.8
[8wayRun.Com] XenPorta (Portal) 1.5.5
[bd] Widget Framework 2.1.1
[Tinhte] Attach Image Optimization 2.2.9
Can you take screenshot of the widget list page and the widget page for "Clear Sidebar" widget? Thank you.
 
Hello, I managed to fix it myself. It turned out the page_container was customized in version 1.1.0, but did not show up in the outdated template screen...

I compared the reverted template with the old one, and the only diffrence in the sidebar section was that the 1.1.0 version had this line:
Code:
<xen:include template="sidebar_visitor_panel" />
instead of this one:
Code:
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>

Did the change, and now it works perfectly :)
 
Hello, I managed to fix it myself. It turned out the page_container was customized in version 1.1.0, but did not show up in the outdated template screen...

I compared the reverted template with the old one, and the only diffrence in the sidebar section was that the 1.1.0 version had this line:
Code:
<xen:include template="sidebar_visitor_panel" />
instead of this one:
Code:
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>

Did the change, and now it works perfectly :)
Nice find! :D
 
Hi xfrocks, can you please add node ids to the li elements of the recent threads widget? I want to replace the avatars with my custom node icons.

Edit: Oh never mind, this will do it
Code:
<li class="node_{$thread.node_id}">
 
  • Like
Reactions: DRE
Another thing, can you please add a read/unread indicator to the li elements? I tried {xen:if $forum.hasNew, 'unread'} but it doesn't work in the widget.
 
does anyone know how i can change it in the code on here for online users now so it can be where only admin's can see in and not everyone?
 
Hey xfrocks,

Sorry if this has been asked/answered but is there a expression to show in viewing a certain resource(say by a resource ID).

Thanks ahead of time.
 
If I have a thread in a forum where its not permitted to have threads this happens when trying to read it.

Code:
An exception occurred: Undefined index: xenOptions in /var/www/vhosts/site.com/httpdocs/forum/library/WidgetFramework/WidgetRenderer/ShareThisPage.php on line 19
 
XenForo_Application::handlePhpError() in WidgetFramework/WidgetRenderer/ShareThisPage.php at line 19
WidgetFramework_WidgetRenderer_ShareThisPage->_render() in WidgetFramework/WidgetRenderer.php at line 421
WidgetFramework_WidgetRenderer->render() in WidgetFramework/Core.php at line 254
WidgetFramework_Core->_renderWidgetsFor() in WidgetFramework/Core.php at line 195
WidgetFramework_Core->renderWidgetsFor() in WidgetFramework/Listener.php at line 30
WidgetFramework_Listener::template_post_render()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 195
XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
XenForo_Template_Public->render() in RotatingAds/Listener.php at line 40
RotatingAds_Listener::template_post_render()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Template/Abstract.php at line 195
XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 119
XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 565
XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
XenForo_FrontController->run() in /var/www/vhosts/site.com/httpdocs/forum/index.php at line 13

I do that because I have to show a specific thread at the top of all sub forums with some info, so I create a normal thread and move it to that forum and it shows correct, but clicking it throws the error.

How can I fix it ?

Thanks.
 
Change avatar by a thumbnail image (demo: http://www.tinhte.vn/)

1234.gif

- Requires use Widget Framework
- Upload to (overwrite) file Threads.php the / library / WidgetFramework / WidgetRenderer /
- Open template wf_widget_threads replace the whole code with:

Code:
<style>
.xp-thread-top .clear{
clear:both;
}
.xp-thread-bottom .xp-left{
float:left;
}
.xp-thread-bottom .xp-right a{
font-size: 15px;
}
.sidebar .avatarList .avatar img {
width:60px;
height:60px;
}
</style>
 
 
<xen:if hascontent="true">
    <div class="avatarList">
        <ul>
            <xen:contentcheck>
          <xen:foreach loop="$new" value="$thread">
              <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
  <xen:include template="wf_widget_threads_thread_title">
<xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
</xen:include>
<div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                            </div>
                        </div>
              </li>
          </xen:foreach>
          <xen:foreach loop="$recent" value="$thread">
              <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
                          <xen:include template="wf_widget_threads_thread_title">
<xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
<xen:set var="$_threadLink">{xen:if '{$visitor.user_id} > 0', {xen:link threads/unread, $thread}, {xen:link posts, {xen:array 'post_id={$thread.last_post_id}'}}}</xen:set>
</xen:include>
<div class="userTitle">{xen:phrase wf_x_replied, 'user={$thread.username}'} <xen:datetime time="{$thread.last_post_date}" /></div>
                            </div>
                        </div>
              </li>
          </xen:foreach>
          <xen:foreach loop="$popular" value="$thread">
              <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
                          <xen:include template="wf_widget_threads_thread_title">
                                <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
</xen:include>
<div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                            </div>
                        </div>
              </li>
          </xen:foreach>
                <xen:foreach loop="$mostReplied" value="$thread">
              <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
                          <xen:include template="wf_widget_threads_thread_title">
                                <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
</xen:include>
<div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'}, {xen:phrase replies}: {xen:number $thread.reply_count}</div>
                            </div>
                        </div>
                  </li>
          </xen:foreach>
                <xen:foreach loop="$mostLiked" value="$thread">
                    <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
                          <xen:include template="wf_widget_threads_thread_title">
                                <xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
</xen:include>
<div class="userTitle">
                                {xen:phrase wf_x_posted, 'user=<a href="{xen:link 'members', {$thread}}">{$thread.username}</a>'},
                                {xen:phrase likes}: <a href="{xen:link 'posts/likes', {xen:array 'post_id={$thread.first_post_id}'}}" class="OverlayTrigger">{xen:number $thread.first_post_likes}</a>
                            </div>
                            </div>
                        </div>
                    </li>
          </xen:foreach>
          <xen:foreach loop="$polls" value="$thread">
              <li>
              <div class="xp-thread-bottom">
<div class="xp-left">
<xen:if is="{$thread.attachment}">
<a href="{xen:link threads, $thread}" class="avatar" class="Tooltip">
<img src="{$thread.attachment}" alt="{$thread.title}" title="{$thread.title}" />
</a>
<xen:else />
<xen:avatar user="$thread" size="m" img="true" />
</xen:if>
</div>
                            <div class="xp-right">
                          <xen:include template="wf_widget_threads_thread_title">
<xen:set var="$_showPrefix">{$widget.options.display.show_prefix}</xen:set>
</xen:include>
<div class="userTitle">{xen:phrase wf_x_posted, 'user={$thread.username}'} <xen:datetime time="{$thread.post_date}" /></div>
                            </div>
                        </div>
                      </li>
          </xen:foreach>
            </xen:contentcheck>
        </ul>
    </div>
</xen:if>

But error
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 311050473 bytes) in /home/hoihoavietnamnn/public_html/library/WidgetFramework/WidgetRenderer/Threads.php on line 252

Help me!
 

Attachments

I'm working on a private forum where all forums are blocked from public viewing. To block widgets like "users online" from the public, what expression would be best. Currently, new users with unconfirmed email addresses can see the widgets. Would it be best to check for the user state to be "Valid"? If so, what would the expression for that be? Thanks!
 
Top Bottom