Help Giúp code ảnh đại diện tại Xenporl

anhtrum86

Gefreiter
Tham gia
09/09/2015
Bài viết
73
Được Like
22
ruPnpB.png


Code : RecentNews
Mã:
<xen:require css="EWRblock_RecentNews.css" />

<div class="portalListTitle">
        <h3><b style="color:xFF0000; font-size:23px">MUA BÁN MỚI NHẤT</b></h3>
    </div>
    <ol class="messageList sectionMain muareSimplePortalList" id="portalList">
    <xen:foreach loop="$RecentNews2" value="$news">
        <li class="itembit {$i}">
        <div class="categoryStrip">
            <h3><a href="{xen:link threads, $news}" target="_self">{xen:helper threadPrefix, $news}{$news.title}</a></h3>
        </div>
        <div class="message">
            <div class="center">
                <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" /></a>
                    </div>
                <xen:elseif is="{$news.image}" />
                    <a href="{xen:link threads, $news}"><img src="{$news.image}" alt="{$news.image}" /></a>
                <xen:else />
                    <xen:avatar user="$news" size="m" itemprop="photo" />
                </xen:if>
            </div>
            <article>
            <blockquote class="messageText ugc baseHtml">{xen:helper snippet, $news.message, 250}</blockquote>
            </article>
            <div class="sectionFooter">
                <div class="contentSummary">
                    Bình luận: {xen:number $news.reply_count}  Đọc: {xen:number $news.view_count}
                </div>
            </div>
            <div class="author">
                <dl class="pairsJustified">
                    <dt><xen:=Datetime time="$news.promote_date" /></dt>
                </dl>
                <dl class="pairsJustified">
                    <dt><span class="viewcount">{xen:number $news.view_count}</span></dt>
                </dl>
            </div>
        </div>
        </li>
    </xen:foreach>
        <div class="view-more-portal">
            <div class="more-text">
                <a href="?page=<xen:if is="{$page} == 0">2<xen:else />{xen:calc '{$page} + 1'}</xen:if>">Xem thêm tin</a>
            </div>
        </div>
    </ol>
Mã:
Code : RecentNews.css
.EWRporta_Portal .breadBoxTop, .EWRporta_Portal .titleBar {display: none;}
.header_rc{border-bottom:4px solid #666;position:relative;width:auto}/*#0093cb #006d96*/
.title_rc{background:x333;color:xfff;float:left;font-size:15px;padding:10px;position:absolute;text-transform:uppercase;top:-39px}
#recentNews{background:xfff;border:1px solid #ccc;margin-top:15px;padding-top:30px}
.page_count{background:none;border:none}
.EWRporta_Portal .breadBoxBottom{display:none}
.postedStat .views,.postedStat .likes,.postedStat .comments{float:left;padding-right:25px;padding-top:3px}
.postedStat .views span{background:transparent url(/images/icon.png) no-repeat -135px -7px;float:left;font-size:13px;height:15px;padding-right:10px;width:19px}
.postedStat .likes span{background:transparent url(/images/icon.png) no-repeat -174px -67px;float:left;font-size:13px;height:15px;padding-right:0;width:19px}
.postedStat{padding-bottom:10px;padding-left:10px;padding-top:10px}
.recentNews .messageContent .comments span{background:transparent url(/images/icon.png) no-repeat -173px -7px;float:left;font-size:13px;height:15px;padding-right:5px;width:19px}
.recentNews .messageContent .comments a{color:x3A3A3A!important;font-weight:400!important}
.LeftMenuFix{margin:0 auto;width:1000px}
.LeftMenu_wrp{background:xfff;float:left;margin-left:0;margin-right:10px;margin-top:15px;width:130px}
/* .item_lmn{border:xd9d9d9 solid 1px;border-top:none;color:x3870a0;display:block;font-size:14px;padding:8px 10px;text-align:center}
.item_lmn:hover{background:xf1f1f1}
.title_lmn1 .item_lmn{background:x0093cc;color:xfff}
.title_lmn2 .item_lmn{background:xe75218;color:xfff}
.LeftMenuFixed{margin-left:-140px;margin-top:-3px;position:absolute;width:135px!important}*/
.clearFix{clear:both}
.HotBlock{float:left;margin-top:0;width:100%}
.HotBlock_wrp{background:none repeat scroll 0 0 #FFF;border:1px solid #CCC;margin-top:15px;padding-top:30px}
.HotBlock_ct{padding:20px 0 0}
.header_hb .title_rc{background:x444}
.HotBlock_items{float:left;height:100px;overflow:hidden;padding-bottom:20px;padding-left:20px;width:320px}
.img_items{display:block;float:left;height:95px;overflow:hidden;padding-right:10px;width:95px}
.img_items img{min-height:95px;width:95px}
.ct_items{float:left;width:205px}
.title_items{color:x444!important;display:block;font-size:15px;font-weight:700;max-height:58px;overflow:hidden;text-align:justify;width:205px}
.info_items{color:x666!important;font-size:12px;width:190px}
.lmn_bock02 .fb-like,.lmn_bock02 .plusone{border:xd9d9d9 solid 1px;border-top:none;color:x3870a0;display:block;font-size:14px;margin:0!important;padding:8px 10px;text-align:center}
.thread_view .HotBlock{margin-bottom:10px;margin-right:310px;margin-top:-10px;width:auto}
.EWRporta_Portal .PageNav{padding-top:10px}
.titleBar h1{margin-top:10px}
.cms_congnghe_img{float:left;height:170px;overflow:hidden;width:270px}
.right_ct{margin-left:280px}

.bbCodeQuote{margin-right:10px!important}
.subHeadingportal{-webkit-border-radius:5px 5px 0 0; -moz-border-radius:5px 5px 0 0; -khtml-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0;font-weight:700;margin:0 0 5px;overflow:hidden;padding-bottom:2px;text-align:left}
.subHeadingportal .newsTitle{color:x444;font-family:Tahoma, Geneva, sans-serif;font-size:16px;line-height:24px}
.recentNews .leftDate .newsText{font-size:13px;margin-left:0!important;text-align:justify}
.recentNews .leftDate .newsText iframe{max-width:550px;width:auto}
.cn_message{padding-bottom:0!important}
.cn_message .fb-comments{margin:0 auto}
.cnfacebookLike{padding:15px 10px 10px}
.sectionFooterportal{color:x65a5d1;font-size:11px;line-height:16px;padding:4px 10px}
.sectionFooterportal a{color:x65a5d1}
.primaryContentportal{background-color:xFFFFF;padding:10px}
.primaryContentportal a{color:x176093}
.sectionMainportal{background:xfff;border-bottom:1px solid #D9D9D9;float:left;margin:0!important;padding:20px}
.widget-container .secondaryContent a,.widget-container .userTitle a{font-weight:400}
.cms_congnghe_img a:hover img {
    margin-left: -5%;
    width: 110%;
}
.cms_congnghe_img a img {
    transition: all 0.2s ease 0s;
    width: 100%;
}
.recentNews .subHeading { margin: -10px -10px 10px; }
.recentNews .subHeading a { color: #444444 !important; }
.recentNews .subHeading h2 { font-size: 1.5em; }
.recentNews .messageUserBlock { float: right; margin-left: 10px; }

.recentNews .newsDate { float: left; margin: 0px 10px 10px 0px; padding: 0px 10px 5px; width: 35px; font-weight: bold; text-align: center; }
.recentNews .newsDate .newsMonth { padding: 10px 0px 5px !important; margin: 0px -10px 5px !important; text-transform: uppercase; }
.recentNews .newsDate .newsDay { font-size: 26px; }

.recentNews .leftDate .newsDate { margin-left: -45px; }
.recentNews .leftDate .newsText { margin-left: 25px; }

.recentNews .messageContent { font-size: 13px; }
.recentNews .messageContent .postedBy a{color:x666;}
.recentNews .messageContent .postedBy { font-size: 12px; padding-bottom: 5px;padding-top: 0px; }
.recentNews .messageContent .username { font-weight: bold; color:x0093cb !important;}
.recentNews .messageContent .comments { float: left; font-weight: bold; }
.recentNews .messageContent .clearFix { clear: right; }

.recentNews .iconKey div
{
    background: transparent url('styles/baisik/xenforo/xenforo-ui-sprite.png') no-repeat 10000px 0;
    width: 16px;
    height: 16px;
    float: left;
    margin-right: 4px;
}
.recentNews .iconKey .sticky    { background-position:   0px -16px; }
.recentNews .iconKey .redirect  { background-position: -48px -16px; }
.recentNews .iconKey .new       { background-position: -64px -16px; }

.recentNews .sectionFooter { margin: 10px -10px -10px; text-align: right; position: relative; }
.recentNews .sectionFooter .continue { padding-top: 5px; font-size: 12px; }
.recentNews .sectionFooter .continue .redirect { margin: 3px 4px 0px 0px; }

.recentNews .sectionFooter .categories { padding-top: 5px; float: left; }
.recentNews .sectionFooter .categories li { display: inline; }

.recentNews .sectionFooter .sharePage { position: absolute; }
.recentNews .sectionFooter .shareControl { margin-top: 6px !important; }
 
Sửa lần cuối bởi điều hành viên:

anhtrum86

Gefreiter
Tham gia
09/09/2015
Bài viết
73
Được Like
22
1. Xin code chèn vào Recen hoặc recen.css: có 3 lựa chọn
a. Nếu có avatar thì chọn avatar
b. Chọn hình đại diện trong topic
c. Chọn hình ảnh mình tự minh họa y
Do ko rành code, nên chỉ copy và làm theo
2. Cho hình tự động căn giữa
Xin cảm ơn ACE !
 

anhtrum86

Gefreiter
Tham gia
09/09/2015
Bài viết
73
Được Like
22
1. Block mua bán, lấy avtar làm đại diện, đôi lúc có hinh` minh họa thì cả avatar và hình minh họa chèn vào nhau tại hình đại diện bài viết
2. Block về công nghệ, có hình ảnh của bài viêt' thi` quá lớn, ko tự căn chỉnh gọn gàng
3. Block tin tức, căn chinhr ok, tự lấy hình ảnh minh họa luôn
Xin ACE giup' 1 - 2 đc như 3
 

Blue

Founder
Thành viên BQT
Tham gia
25/02/2015
Bài viết
910
Được Like
1,529
Đặt mã vào thẻ Code đi bạn, không nó hiện toàn smile.
 

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

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

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