Resource icon

[bd] Widget Framework 2.6.6

No permission to download
Future feature request
A widget that works with Resources Manager that can show X items (latest update, newest items, etc) from chosen categories.
I'm planning to use this to show the last 5 reviews (with date, rating stars, etc)
Thank a lot, xfrocks.
 
Change avatar by a thumbnail image (demo: http://www.tinhte.vn/)

View attachment 43316

- 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!
How can I fix it ?
 
Your custom script is too complicated and causing issue. I suggest not to use it. Otherwise, you need to contact the script's author.

you can help me change avatar -> thumbnail when Select the renderer = thread
12334.gif



Thanks.
 
xfrocks updated [bd] Widget Framework with a new update entry:

v2.2 now supports XenForo Resource Manager!

Change logs:

  1. Minor improvements
  2. Fixed bug redirected threads show up twice
  3. Fixed bug for Share This Page renderer
  4. Fixed bug empty widget container
  5. Fixed issues with "all" position
  6. Added template params for hook positions
  7. Added separated debug option (add to config.php: `$config['wfDebug'] = true;`)
  8. Added new options to Online Users renderer: show people you follow; show rich usernames
  9. Added support for XFRM: new renderer Resources (4 modes: new, updated,...

Read the rest of this update entry...
 
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.
Could you please consider adding this? I saw latest threads widgets not coming from widget framework that supported this and I don't want to mix stand-alone widgets with widget framework.
 
Could you please consider adding this? I saw latest threads widgets not coming from widget framework that supported this and I don't want to mix stand-alone widgets with widget framework.
Sorry the indicator cannot be cached so it's not included in this addon. It's okie to use 3rd party renderer. Some of them are very good ;)
 
Oh I think I have misunderstand you. I thought you were saying that I should install a "third-party" addon for a latest threads widget. This would defeat the point of widget framework because it is supposed to be the only place where we can manage our widgets. But I think what you meant is a renderer for widget framework (in a sense of an extension to widget framework), that doesn't come from you, right? Do you know where I can get one?
 
Back
Top Bottom