• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Share Widget Framework Thread Thumbnails giống Tinh Tế

Smobi

New Member
Chức năng: Thay ảnh đại diện bằng ảnh trong bài viết (mặc định là avatar của poster)

Demo:
capture-jpg.5543
​​
Cách làm:

- Yêu cầu phải sử dụng Widget Framework
- Upload đè (overwrite) file Threads.php vào /library/WidgetFramework/WidgetRenderer/
- Mở template wf_widget_threads thay toàn bộ code bằng:
PHP:
<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>
- Done

P/S: Các bạn có thể chỉnh kích thước ảnh đại diện ở width:80px; height:80px;

Download
Widget Framework Threads.zip
 
Last edited:

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin Widget Framework for XenForo Xenforo 0
Admin [CJ] Staff online widget vB5 Add-ons 0
Admin Yilmaz - Recent Visitors of the Profiles (vb5.6.x widget) Add-ons 0
Admin [EAE Add-ons] Thread preview widget Xenforo 0
Admin Resource Manger Stats Widget Xenforo 0
Admin [OzzModz] Attachment Stats Widget Xenforo 0
Admin Members online widget permission xenforo 2 Xenforo 0
Admin XFMG media widget type icons xenforo 2 Xenforo 0
Admin [AwesomeForo] - Node List widget xenforo 2 Xenforo 0
Admin How to make a tabbed widget xenforo 2 Xenforo 0
Admin [SC] TeamSpeak Widget in SideBar 1.1.0 xenforo 2.x Xenforo 0
Admin Widget: CMS Most Viewed Articles This Week Vbb tutorial 0
Admin Thủ thuật kích hoạt lại tính năng gắn widget ra màn hình khóa của Android 4.4 Thủ thuật ĐTDĐ 0
Admin vBSocial.com LifeStream Widget - Combine all feeds into one Add-ons 0
Admin [ozzy47] Homeland Security Terror Alert Widget Vbb tutorial 0
Admin [WIDGET] Users Registered This Week Vbb tutorial 0
Myshare Share [XtWidget] Like-Dislike widget Wap builder, wapego, xtgem, wen.ru, wapka, wap4 0
Admin Kickstarter/IndieGoGo Widget BBcode Vbulletin 0
Admin Hướng dẫn hiển thị chuyên mục ra index khi theme không hỗ trợ Widget Wordpress 0
Admin [Plugin] Authors widget Wordpress 0
Admin [XtWidget] Like-Dislike widget Wap builder, wapego, xtgem, wen.ru, wapka, wap4 0
Admin Hướng dẫn Tạo alexa widget Thảo luận SEO 0
T 7 lý do bạn có thể chọn Flask Framework ( P2 ) Tin tức CNTT 0
T 7 lý do bạn có thể chọn Flask Framework ( P1 ) Tin tức CNTT 0
P Thủ thuật Hướng dẫn cài đặt .Net Framework 3.5 và 4.0 trên hệ điều hành windows 7 Thủ thuật máy tính 0
Admin Microsoft .NET Framework 4.5 - chương trình hỗ trợ của Microsoft giúp các ứng dụng chạy trên nền .NE Phần mềm 0
Admin Kích hoạt .Net Framework 3.5 trên Windows 8 Hệ điều hành 1
Admin Yilmaz - Force Users to Read a Thread vB5 Add-ons 0
Admin Yilmaz - Post New Thread Button To Showthread vB5 Add-ons 0
Admin Yilmaz - Thread Author vB5 Add-ons 0
Admin [OzzModz] Create Poll Thread Permissions Xenforo 0
Admin [OzzModz] Original Poster Thread Starter Indicator Xenforo 0
Admin [OzzModz] New Posts Button Bottom Of Thread Xenforo 0
Admin Yilmaz - X Viewing Thread Information Module vB5 Add-ons 0
Admin [OzzModz] Remove Thread Prefix From Page Title Xenforo 0
Admin [PB] Copy Link to Thread Xenforo 0
Admin Yilmaz - Thread Thumbnails V5 Add-ons 0
Admin Thread Prefix Colors xenforo 2 Xenforo 0
Admin Remove the name and creation date under the thread title xenforo 2 Xenforo 0
Admin German translation for [OzzModz] Email Staff When New Post/Thread In Mod Queue Xenforo 0
Admin [PB] Manage Reply Ban on Locked Thread Xenforo 2 Xenforo 0
Admin Previous & Next Thread xenforo 2 Xenforo 0
Admin Create new thread button vBullein 5 Add-ons 0
Admin Remaining Posts in Thread View xenforo 2 Xenforo 0
Admin Force to read a thread (STFRT2) Xenforo 0
Admin [thread] and [post] BBCode xenforo 2 Xenforo 0
Admin Thread Solutions - French Translation by SyTry xenforo 2.x Xenforo 0
Admin Hướng dẫn thay đổi màu chủ đề sticky xenforo 2.x - Sticky thread simple styling xenforo 2 Xenforo 0
Admin Minimum thread title length xenforo 2.0 Xenforo 0
Admin [XenMax] - More Thread Same Category Xenforo 2.x Xenforo 0

Similar threads

New posts New threads New resources

Back
Top