[ Cứu với ] EWRblock_RecentNews không hiển thị hình ảnh bài viết

Thảo luận trong 'Installation & Upgrade Questions' bắt đầu bởi singh, 24/7/14.

1votes
5/5, 1 vote

  1. singh

    singh Member

    Bài viết:
    384
    Likes :
    79
    Chào mấy pro
    Mình đang tập cài cái EWRblock_RecentNews

    Nhưng có lỗi xảy ra là
    - hình ảnh trong bài viết bị lỗi không hiển thị
    - Những bài viết k có hình . Thì hình thay thế vẫn hiện.
    - Mà những bài có hình trong bài viết thì k hiển thị ngoài home mà toàn bị lỗi

    ai giúp với

    code mình đây
    EWRblock_RecentNews


    Mã:
    <xen:require css="message_user_info.css" />
    <xen:require css="bb_code.css" />
    <xen:require css="EWRblock_RecentNews.css" />
    
    
    <div id="Block1">
    <div class="block-title"><a href="/" title="Tin tức"><span>Tin Mới Đăng</span></a></div>
    <ul class="block1">
    <xen:foreach loop="$RecentNews" value="$news" i="$i">
    <xen:if is="{$i}<49">
    
           <li>
          
           
          
            <div class="block-content" id="{$news.thread_id}">
                <div class="img-thumb">
                   
                <xen:if is="{$news.promote_icon} != 'disabled'">
                    <xen:if hascontent="true">
       
                         <xen:contentcheck>
                                <xen:if is="{$news.attach}">
                                    <a href="{xen:link threads, $news}"><img src="http://res.cloudinary.com/tint/image/fetch/w_500,h_333,c_thumb/http://nhiettinh.net/demo/{$news.attach.thumbnailUrl}" alt="{$news.attach.filename}" /></a>
                                <xen:elseif is="{$news.medio}" />
                                    <div style="background: url('{xen:helper medio, $news.medio}') no-repeat;">
                                        <a href="{xen:link 'full:media/media/popout', $news.medio}" class="OverlayTrigger"><img src="styles/8wayrun/EWRmedio_play.png" width="160" height="90" /></a>
                                    </div>
                                <xen:elseif is="{$news.image}" />
                                    <a href="{xen:link threads, $news}"><img src="http://res.cloudinary.com/tint/image/fetch/w_500,h_333,c_thumb/{$news.image}" alt="{$news.image}" /></a>
                                <xen:else />
                                    <a href="{xen:link threads, $news}"><img src="/images/news.jpg" /></a>
                                </xen:if>
                                </xen:contentcheck>
     
     
                    </xen:if>
                </xen:if>
                   
                </div>
                  <h2>
    
                        <a href="{xen:link threads, $news}" title="{$news.title}" class="title">{xen:helper snippet, $news.title, 25}</a>
                      
                    </h2>
             
            </div>
            </li>
       
    </xen:if>
    </xen:foreach>
    </ul>
    </div>
    
    
       
       
       
       
       
       
       
       
       
       
       
       
       
       
        <div class="clearFix"></div>
    
        <xen:if hascontent="true">
        <div class="section sectionMain">
            <xen:contentcheck>
            <xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
                <xen:pagenav link="articles" linkdata="{$category}" page="{$page}" perpage="{$option.limit}" total="{$option.count}" />
            </xen:if>
            </xen:contentcheck>
        </div>
        </xen:if>
    EWRblock_RecentNews.css
    Mã:
    #Block1 .block1 li {width:33.33%;overflow:hidden;float:left;}
    #Block1 .block1 .block-content {margin:7px;min-height:110px}
    #Block1 .block1 .img-thumb {height:80px;overflow:hidden}
    #Block1 .block1 .img-thumb img {width:100%;height:80}
    #Block1 .block1 .thread-info {padding:5px}
    #Block1 .block1 .title {font-size:15px;line-height:18px;color:#333;font-weight:bold}
    #Block1 .block-content {-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3); -khtml-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3); box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);background-color: #FFF;-webkit-border-radius:3px; -moz-border-radius:3px; -khtml-border-radius:3px; border-radius:3px}
    #Block1 .block-content .desc {padding-top:10px}
    
    #recentNews h2, #footer h5, footer h5, .titleBar, .searchResult .title {
        font-family: 'Open Sans',sans-serif;
        font-weight: 700;
    }
    
    
    .button_more{
        display: block;
        text-align: center;
    }
    .button_more a {
        padding: 9px;
        display: block;
        border:1px solid #ddd;
        border-top:none;
        color: #000;
        font-size: 14pt;
    }
    
    .block-title {
    background: url(/styles/default/xenforo/icon_red_top.png) no-repeat left top;
    background-size: 15px 10px;margin-left: -25px;border-bottom: 2px #C00 solid;}
    .block-title span {
    font-family: UTM_Header, arial;
    text-transform: uppercase;
    color: #FFF;
    display: inline-block;
    line-height: 30px;
    padding: 0 40px 0 30px;
    background: url(/demo/styles/default/xenforo/title-box-top.png) no-repeat right top;
    background-size: 300px 300px;
    font-weight: normal;
    margin-top: 10px;
    font-size: 17px;
    }
    #Block1 .block-title span {
    background-position: 100% -40px;
    }
    
     

    Các file đính kèm:

    • 2.jpg
      2.jpg
      Kích thước:
      50.2 KB
      Đọc:
      0
    • 1.jpg
      1.jpg
      Kích thước:
      49 KB
      Đọc:
      0
    Đang tải...
  2. TruongHao

    TruongHao Member

    Bài viết:
    153
    Likes :
    31
    Thay hết recentnews thành
    PHP:
    <xen:require css="message_user_info.css" />
    <
    xen:require css="bb_code.css" />
    <
    xen:require css="EWRblock_RecentNews.css" />


    <
    div id="Block1">
    <
    div class="block-title"><a href="/" title="Tin tức"><span>Tin Mới Đăng</span></a></div>
    <
    ul class="block1">
    <
    xen:foreach loop="$RecentNewsvalue="$newsi="$i">
    <
    xen:if is="{$i}<49">

           <
    li>
         
           
         
            <
    div class="block-content" id="{$news.thread_id}">
                <
    div class="img-thumb">
                   
                <
    xen:if is="{$news.promote_icon} != 'disabled'">
                    <
    xen:if hascontent="true">
       
                         <
    xen:contentcheck>
                                <
    xen:if is="{$news.attach}">
                                    <
    a href="{xen:link threads, $news}"><img src="{$news.attach.thumbnailUrl}alt="{$news.attach.filename}/></a>
                                <
    xen:elseif is="{$news.medio}/>
                                    <
    div style="background: url('{xen:helper medio, $news.medio}') no-repeat;">
                                        <
    a href="{xen:link 'full:media/media/popout', $news.medio}" class="OverlayTrigger"><img src="styles/8wayrun/EWRmedio_play.png" width="160" height="90" /></a>
                                    </
    div>
                                <
    xen:elseif is="{$news.image}/>
                                    <
    a href="{xen:link threads, $news}"><img src="{$news.image}alt="{$news.image}/></a>
                                <
    xen:else />
                                    <
    a href="{xen:link threads, $news}"><img src="/images/news.jpg" /></a>
                                </
    xen:if>
                                </
    xen:contentcheck>


                    </
    xen:if>
                </
    xen:if>
                   
                </
    div>
                  <
    h2>

                        <
    a href="{xen:link threads, $news}" title="{$news.title}class="title">{xen:helper snippet$news.title25}</a>
                     
                    </
    h2>
             
            </
    div>
            </
    li>
       
    </
    xen:if>
    </
    xen:foreach>
    </
    ul>
    </
    div>


       
       
       
       
       
       
       
       
       
       
       
       
       
       
        <
    div class="clearFix"></div>

        <
    xen:if hascontent="true">
        <
    div class="section sectionMain">
            <
    xen:contentcheck>
            <
    xen:if is="{$option.pagenav} && {$option.count} > {$option.limit}">
                <
    xen:pagenav link="articles" linkdata="{$category}page="{$page}perpage="{$option.limit}total="{$option.count}/>
            </
    xen:if>
            </
    xen:contentcheck>
        </
    div>
        </
    xen:if>
     
    singh thích bài này.
  3. singh

    singh Member

    Bài viết:
    384
    Likes :
    79
    vẫn vậy anh ơi. hình vẫn bị lỗi
    demo nhiettinh.net/demo
     
  4. Bcat9505

    Bcat9505 Moderator Staff Member

    Bài viết:
    1,335
    Likes :
    494
    Lấy ảnh đơn giản từ bài viết thì:
    Mã:
     <xen:if is="{$new.attach}">
      <img src="attachments/{$news.attach.filename}.{$news.attach.attachment_id}" >
      <xen:elseif is="{$news.image}" />
      <img src="{$news.image}">
      <xen:else />
      <xen:avatar user="$news" size="s" itemprop="photo" />
      </xen:if>
     
    singh thích bài này.
  5. Bcat9505

    Bcat9505 Moderator Staff Member

    Bài viết:
    1,335
    Likes :
    494
    singh thích bài này.
  6. singh

    singh Member

    Bài viết:
    384
    Likes :
    79
  7. singh

    singh Member

    Bài viết:
    384
    Likes :
    79
    rồi chạy ngon rồi <3
     
  8. Bcat9505

    Bcat9505 Moderator Staff Member

    Bài viết:
    1,335
    Likes :
    494
    Bên đó hay nhưng có mấy cái thấy dài ^^ k biết bỏ bớt sao k^^
     
    singh thích bài này.
  9. singh

    singh Member

    Bài viết:
    384
    Likes :
    79
    nhưng mà bài nào không có hình. thì nó trắng bệch. có cách nào làm cho bài k có hình. thì nó lấy 1 mình nào đó thay thế k anh?
     
  10. advance

    advance New Member

    Bài viết:
    18
    Likes :
    0
    Đổi như thế nào vậy bạn? Mình cũng đnag bị lỗi hiển thị ảnh.
    Bạn giúp mình với.
     
comments powered by Disqus

Chia sẻ trang này

Đang tải...