• 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.

Hướng dẫn tạo thanh sharebar khi xem bài viết

Admin

Well-Known Member
Staff member
Administrator
Demo pic: (do demo làm trên localhost nên không có nút google +1, trong code thì có google +1 nhé)

tuoitrevnbiz11102012.png


Bước 1: Tạo 1 template mới, đặt tên là sharebar với nội dung:
Code:
[/B]<div style="top:265px;margin-left:-82px;position:fixed;z-index:99999;width:50px;padding:15px 7px 15px 5px;background:#fff;border-radius: 7px 0 0 7px;">
 
<!-- Views -->
<div style="background: url(&quot;//ssl.gstatic.com/s2/oz/images/stars/po/Publisher/sprite4-a67f741843ffc4220554c34bd01bb0bb.png&quot;) no-repeat scroll 0pt -68px transparent; color:#555; font-size:12px; padding:5px 0; margin-bottom:2px;text-align:center; height:25px;">{xen:number {$thread.view_count}}</div>
<div style="font-size:12px;font-weight:bold;text-align:center;padding:2px 0;margin-bottom:7px;">Views</div>
 
<!-- Google+ Button -->
    <xen:if is="{$xenOptions.plusone}">
        <div class="plusone shareControl">
            <div class="g-plusone" data-size="tall" data-count="true" data-href="{$url}"></div>
        </div>
    </xen:if>
 
<!-- AddThis Button -->
<div style="padding-top:5px;">
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_counter"></a>
</div>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4fcc0e503f99ef6b"></script>
 
 
</div>[B]
Chú ý cái phần
Code:
[/FONT][/COLOR]<div style="top:265px;margin-left:-82px;position:fixed;z-index:99999;width:50px;padding:15px 7px 15px 5px;background:#fff;border-radius: 7px 0 0 7px;">[COLOR=#141414][FONT=Arial]

có thể phải sửa lại kích thước cho phù hợp với style của forum các bạn.

Bước 2: Vào template thread_view chèn đoạn code sau vào dưới cùng:
Code:
[/B]<xen:include template="sharebar" />[B]
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top