Help Giúp hiện thumbnail ra home xenporta

evolution123

Private
Tham gia
27/11/2018
Bài viết
34
Được Like
17
Chào mọi người. Mình sử dụng xenforo v1. Và đang gặp khó khăn phần hiền thumbnail trong widget ngoài home xenporta.

Mình có tạo 1 widget trong addon widget framework.
Nhưng nó chỉ hiện ra home như thế này thôi.
upload_2018-12-10_17-15-5.png

Nó không nhận hình ảnh

Còn trong những nơi khác thì bình thường
upload_2018-12-10_17-16-31.png


Dưới đây là phần code trong widget ạ, mọi người xem giúp em:
Mã:
<xen:if is="{$vnxfpost} || {$vnxfnew}">
<style>
a.img_items {
    display: block;
    float: left;
    height: 130px;
    margin-right: 10px;
    overflow: hidden;
    width: 100%;
    border:1px solid #F0F0F0;
}
a.img_items img {
    #max-height: {$opt.himg}px;
    width: 100%;
}
</style>
<xen:require css="More_Thread_tap_widget.css" />
    <div class="WidBlock">
        <xen:if is="{$vnxfpost}">
            <div class="WidBlock_wrp">
                
               <h3 style=" font-weight: bold; font-size: 15px; color: rgb(39, 50, 56); background-repeat: no-repeat; background-position: top right; padding: 15px 10px; margin-bottom: 0px; border-top: 5px solid rgb(39, 50, 56); border-top-left-radius: 0px; border-top-right-radius: 0px; text-transform: uppercase; box-sizing: border-box; position: relative; ">
            
                Đang HOT
            
        </h3>
                
                <div class="WidBlock_ct">
                    <xen:foreach loop="$vnxfpost" value="$news" i="$i">
                    
                    
                    <li>
<div class="post-item-thumbnail">
<xen:if is="{$showimg}">
                                    <a href="{xen:link threads, $news}" title="{$news.title}" target="_blank">
                                        <xen:if is="{$news.attach}">
                                            <img src="{xen:link attachments, $news.attach}"  class="attachment-writeup-medium size-writeup-medium wp-post-image" alt="{$news.title}" title="{$news.title}" />
                                        <xen:elseif is="{$news.image}" />
                                            <img src="{$news.image}"  class="attachment-writeup-medium size-writeup-medium wp-post-image" alt="{$news.title}" title="{$news.title}" />
                                        <xen:else />
                                            <img src="{$opt.bia}"  class="attachment-writeup-medium size-writeup-medium wp-post-image" alt="{$news.title}" title="{$news.title}"/>
                                        </xen:if>
                                    </a>
  </xen:if>
</div>
<div class="post-item-inner group">
<p class="post-item-category">
<a style=" color: rgb(39, 50, 56); font-weight: 400; background: none; border: none; padding: 0; font-size: 15px; text-transform: uppercase; ">{xen:helper threadPrefix, $article}</a></p>   
<p class="post-item-title">
<a href="{xen:link threads, $news}" rel="bookmark" title="{$news.title}">{$news.title}</a>
</p>
</div>
</li>
                    </xen:foreach>
                    <div style="clear:both;"></div>
                </div>
            </div>
        </xen:if>
</xen:if>


Em cảm ơn nhiều ạ
 

Minhdat070

Gefreiter
Tham gia
03/09/2017
Bài viết
79
Được Like
47
Chào em gái :))
1. kiểm tra điều kiện if đầu tiên
2. in kết quả url image xem có giá trị không, không có thì xem lại code trong addon
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom