[Code] Share Viewtopic_body đẹp dạng tin tức để làm blog cá nhân

avatar

nkoxdl68
135
19
Punbb
An toàn
Thành viên quen thuộc
Thành viên quen thuộc

Bài viết :
68
Points :
135
Like :
19
Punbb
An toàn
Tác Giả : ThànhKent
Demo

Cho code sau vào Viewtopic_body .

Code:
<!-- BEGIN switch_user_logged_out -->[size=13][/size]
<style>[size=13][/size]
.post--0  {display:none;}[size=13][/size]
</style>[size=13][/size]
<!-- END switch_user_logged_out -->[size=13][/size]
[size=13][/size]
<style>[size=13][/size]
  [size=13][/size]
[size=13][/size]
.news-item {[size=13][/size]
    background: #fff;[size=13][/size]
    width: 50%;[size=13][/size]
    float: left;[size=13][/size]
    margin-bottom: 20px;[size=13][/size]
}[size=13][/size]
 .news-item h2 {[size=13][/size]
    padding-top: 3px;[size=13][/size]
    padding-right: 5px;[size=13][/size]
    line-height: 1.5;[size=13][/size]
    max-height: 70px;[size=13][/size]
    overflow: hidden;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
  [size=13][/size]
.news-item h2 a {[size=13][/size]
      font-size: 16px;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
[size=13][/size]
  .crop a img {[size=13][/size]
    width: 120px!important;[size=13][/size]
    height: 80px!important;[size=13][/size]
    object-fit: cover;[size=13][/size]
    float: left;[size=13][/size]
    margin-right: 15px;[size=13][/size]
    border: 1px solid #c0392b;[size=13][/size]
  }[size=13][/size]
 .news-item .post {[size=13][/size]
    border-bottom: 1px solid #ededed!important;[size=13][/size]
    border-top: 0px solid #ededed!important;[size=13][/size]
    padding-top: 10px!important;[size=13][/size]
    padding-bottom: 10px!important;[size=13][/size]
      height: 46px;[size=13][/size]
    overflow: hidden;[size=13][/size]
}[size=13][/size]
  [size=13][/size]
[size=13][/size]
  [size=13][/size]
  .editbai {    [size=13][/size]
    font-style: italic;[size=13][/size]
    font-size: 12px;[size=13][/size]
    color: #666;[size=13][/size]
  }[size=13][/size]
  .editbai img{    [size=13][/size]
    display:none;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
   .editbai a {    [size=13][/size]
   padding:0px!important;[size=13][/size]
   float:right;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  .editbai a:before {    [size=13][/size]
    content: "\Sữa bài";[size=13][/size]
    font-size: 12px;[size=13][/size]
    color: #666;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
[size=13][/size]
.dungbolo {[size=13][/size]
    color: #666;[size=13][/size]
    font-size: 18px;[size=13][/size]
    font-family: 'Roboto Condensed',sans-serif;[size=13][/size]
    text-transform: uppercase;[size=13][/size]
    padding-bottom: 5px;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
.binhluancat {[size=13][/size]
    background: #f3f3f3;[size=13][/size]
    padding: 8px;[size=13][/size]
    border-left: 5px solid #4c69ba;[size=13][/size]
    color: #4c69ba;[size=13][/size]
    font-size: 16px;[size=13][/size]
  }[size=13][/size]
[size=13][/size]
  .chucnangadmin {[size=13][/size]
    background: #c0392b;[size=13][/size]
    padding: 5px;[size=13][/size]
    border-radius: 3px;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
    .chucnangadmin a {[size=13][/size]
 color: #fff!important;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  .chucnangadmin img {[size=13][/size]
  display:none;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  a[href*="cp?mode=delete"]::before {[size=13][/size]
content: 'Xóa chủ đề';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  a[href*="cp?mode=trash"]::before {[size=13][/size]
content: 'Cho vào sọt';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  a[href*="cp?mode=move"]::before {[size=13][/size]
content: 'Di chuyển';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  a[href*="cp?mode=lock"]::before {[size=13][/size]
content: 'Khóa chủ đề';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  a[href*="cp?mode=split"]::before {[size=13][/size]
content: 'Tách bài viết';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  a[href*="merge?t="]::before {[size=13][/size]
content: 'Gộp bài viết';[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  [size=13][/size]
[size=13][/size]
  [size=13][/size]
  .postbody img {max-width:650px;}[size=13][/size]
  [size=13][/size]
[size=13][/size]
  [size=13][/size]
  [size=13][/size]
[size=13][/size]
/* Viewtopic */[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  .pun .post-entry {[size=13][/size]
    padding: 0em;[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  [size=13][/size]
[size=13][/size]
  .pun .topic {[size=13][/size]
border: 0px solid #DDD;[size=13][/size]
padding:0px;[size=13][/size]
}[size=13][/size]
  [size=13][/size]
.pun .post {[size=13][/size]
border: 0px solid #e4e4e4;[size=13][/size]
    margin-bottom: 5px;[size=13][/size]
      border-radius: 3px;[size=13][/size]
  background: #fff;[size=13][/size]
}[size=13][/size]
[size=13][/size]
[size=13][/size]
  .tiletopic a {[size=13][/size]
    font-size: 20px;[size=13][/size]
    line-height: 1.5;[size=13][/size]
    color: #d1090b!important;[size=13][/size]
  }[size=13][/size]
[size=13][/size]
[size=13][/size]
.tcm {font-size: 0px;}[size=13][/size]
.tcm span {font-size: 13px;!important}[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  .tiletopic {[size=13][/size]
    margin-top: -5px;[size=13][/size]
}[size=13][/size]
  [size=13][/size]
  .infotopic {[size=13][/size]
    margin-top: 10px;[size=13][/size]
    margin-bottom: 10px;[size=13][/size]
    font-size: 13px;[size=13][/size]
    color: #777;[size=13][/size]
    border-top: 1px solid #e5e5e5;[size=13][/size]
    border-bottom: 1px solid #e5e5e5;[size=13][/size]
    padding: 6px 2px 2px 2px;[size=13][/size]
  }[size=13][/size]
    [size=13][/size]
  .infotopic a {[size=13][/size]
  font-size: 13px!important;[size=13][/size]
  color:#777!important;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
    [size=13][/size]
  .infotopic a span {[size=13][/size]
  font-size: 13px!important;[size=13][/size]
  color:#777!important;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
   .infotopic a span strong {[size=13][/size]
  font-weight: 500!important;[size=13][/size]
  }[size=13][/size]
  [size=13][/size]
  [size=13][/size]
</style>[size=13][/size]
[size=13][/size]
<script type="text/javascript">//<![CDATA[[size=13][/size]
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };[size=13][/size]
$(function(){[size=13][/size]
[size=13][/size]
    if(typeof(_atc) == "undefined") {[size=13][/size]
        _atc = { };[size=13][/size]
    }[size=13][/size]
[size=13][/size]
    _atc.cwait = 0;[size=13][/size]
    $('.addthis_button').mouseup(function(){[size=13][/size]
        if ($('#at15s').css('display') == 'block') {[size=13][/size]
            addthis_close();[size=13][/size]
        }[size=13][/size]
    });[size=13][/size]
});[size=13][/size]
[size=13][/size]
var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' };[size=13][/size]
showHiddenMessage = function(id)[size=13][/size]
{[size=13][/size]
    try[size=13][/size]
    {[size=13][/size]
        var regId = parseInt(id, 10);[size=13][/size]
        if( isNaN(regId) ) { regId = 0; }[size=13][/size]
        [size=13][/size]
        if( regId > 0)[size=13][/size]
        {[size=13][/size]
            $('.post--' + id).toggle(0, function()[size=13][/size]
 {[size=13][/size]
 if( $(this).is(":visible") )[size=13][/size]
 {[size=13][/size]
 $('#hidden-title--' + id).html(hiddenMsgLabel.visible);[size=13][/size]
 }[size=13][/size]
 else[size=13][/size]
 {[size=13][/size]
 $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);[size=13][/size]
 }[size=13][/size]
 });[size=13][/size]
        }[size=13][/size]
    }[size=13][/size]
    catch(e) { }[size=13][/size]
    [size=13][/size]
 return false;[size=13][/size]
};[size=13][/size]
[size=13][/size]
//]]>[size=13][/size]
</script>[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
 {POLL_DISPLAY}[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
<div class="tiletopic">[size=13][/size]
 <b> <a href="{TOPIC_URL}">{TOPIC_TITLE}</a> </b>[size=13][/size]
</div>[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
<div class="">[size=13][/size]
   <!-- BEGIN postrow -->[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
 <!-- BEGIN displayed -->[size=13][/size]
 [size=13][/size]
  [size=13][/size]
[size=13][/size]
<div class="infotopic">[size=13][/size]
Người đăng : {postrow.displayed.POSTER_NAME} Đăng lúc : <span class="datepost">{postrow.displayed.POST_DATE_NEW}</span> Chuyên Mục : <span class="tcm">{NAV_CAT_DESC}</span> [size=13][/size]
  </div>[size=13][/size]
          [size=13][/size]
<div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">[size=13][/size]
<div class="post-entry">[size=13][/size]
  [size=13][/size]
<div class="entry-content postbody">[size=13][/size]
   [size=13][/size]
{postrow.displayed.MESSAGE}[size=13][/size]
  <div class="clear"></div>[size=13][/size]
  <div class="editbai">{postrow.displayed.EDIT_IMG}</div>[size=13][/size]
  [size=13][/size]
<span style="float:left;margin-top: 10px;">[size=13][/size]
    <span class="fb-like" data-href="{FORUM_URL}{TOPIC_URL}" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="true"></span>[size=13][/size]
  </span>[size=13][/size]
  [size=13][/size]
  [size=13][/size]
  [size=13][/size]
</div>[size=13][/size]
  [size=13][/size]
</div>[size=13][/size]
</div>[size=13][/size]
[size=13][/size]
 [size=13][/size]
              [size=13][/size]
<div style="clear:both;"></div>[size=13][/size]
[size=13][/size]
 [size=13][/size]
 [size=13][/size]
 <!-- END displayed -->[size=13][/size]
 <!-- END postrow -->[size=13][/size]
                          [size=13][/size]
</div>[size=13][/size]
[size=13][/size]
      <div class="clear"></div>[size=13][/size]
[size=13][/size]
<div class="dungbolo" style="float:left;margin-bottom: 10px;">Bài Cùng Chuyên Mục</div>[size=13][/size]
<div class="clear"></div>[size=13][/size]
<div class="show_topic">[size=13][/size]
 <div id="topic">[size=13][/size]
[size=13][/size]
 </div>[size=13][/size]
  [size=13][/size]
</div>[size=13][/size]
                        <div class="clear"></div>[size=13][/size]
[size=13][/size]
[size=13][/size]
<div class="binhluancat">Bình Luận</div>[size=13][/size]
<div style="background-color:#fff;padding:0px;">[size=13][/size]
  [size=13][/size]
<div class="fb-comments" data-href="{FORUM_URL}{TOPIC_URL}" data-width="910px" data-numposts="15"></div>[size=13][/size]
[size=13][/size]
</div>[size=13][/size]
[size=13][/size]
 <div id="fb-root"></div>[size=13][/size]
<script>(function(d, s, id) {[size=13][/size]
  var js, fjs = d.getElementsByTagName(s)[0];[size=13][/size]
  if (d.getElementById(id)) return;[size=13][/size]
  js = d.createElement(s); js.id = id;[size=13][/size]
  js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v2.8";[size=13][/size]
  fjs.parentNode.insertBefore(js, fjs);[size=13][/size]
}(document, 'script', 'facebook-jssdk'));</script>[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
<!-- BEGIN viewtopic_bottom -->[size=13][/size]
<div class="chucnangadmin">[size=13][/size]
            {S_TOPIC_ADMIN}[size=13][/size]
</div>[size=13][/size]
            <!-- END viewtopic_bottom -->[size=13][/size]
[size=13][/size]
[size=13][/size]
[size=13][/size]
<script src="{JS_DIR}addthis/addthis_widget.js" type="text/javascript"></script>[size=13][/size]
[size=13][/size]
<script>[size=13][/size]
    $(function () {[size=13][/size]
        $.ajax({[size=13][/size]
            url: "/feed/?f={FORUM_ID}",[size=13][/size]
            success: function (ta) {[size=13][/size]
                for (var i = 2; i < 8; i++) {[size=13][/size]
                    var DL = $(ta).find("link:eq(" + i + ")").text();[size=13][/size]
                    var title = $(ta).find("title:eq(" + i + ")").text();[size=13][/size]
$('<div class="news-item"><div class="postfeed"><div class="crop"><a href="' + DL + '" rel="bookmark"></a><h2></h2><div style="clear: both;"></div>[size=13][/size]
</div></div></div></div>').appendTo('div.show_topic #topic');               [size=13][/size]
                    [size=13][/size]
                    $('<a href="' + DL + '">' + title + '</a>').appendTo('.news-item:eq(' + (i - 2) + ') .postfeed h2');[size=13][/size]
                    $('<img src="http://1.bp.blogspot.com/-_rVBDk7MBgs/UeW2vn3fwWI/AAAAAAAAGzI/ONP2vpF-MdE/s1600/Untitled-1.png' + $(".news-item:eq(" + (i - 2) + ") .crop a:eq(0)").load(DL + ".postblog .postbody img:eq(0)") + '"  src="test" />').appendTo('.news-item:eq(' + (i - 2) + ') .crop a:eq(0)');[size=13][/size]
                }[size=13][/size]
            }[size=13][/size]
        })[size=13][/size]
    })[size=13][/size]
</script>[size=13][/size]
[size=13][/size]
[size=13][/size]
  

Nguồn : Zone-FM
 Trả lời bài viết
avatar

Edo13
15
0
PhpBB3
Thành viên chính thức
Thành viên chính thức

Bài viết :
13
Points :
15
Like :
0
PhpBB3
nhin cái code la thấy rất vui
 Trả lời bài viết
Điểm 4.6/5 dựa vào 87 đánh giá

Có Thể Bạn Quan Tâm

Đang tải...