Nhúng nút Facebook share vào PHPBB

Vào Styles, mở viewtopic_body.html. Tìm đoạn:




<div class="topic-actions">
   <div class="buttons">
   <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
      <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
Thêm phía sau:
      <!-- Facebook share mod -->
         <div class="buttons">
            <script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
            <a href="" onclick="return fbs_click()" class="fb_share_link"><img style="border:0" src="styles/pondlife/imageset/en/button_fbook_share.gif" alt="Share on Facebook"/></a>
         </div>
      <!-- Facebook share mod end -->
      <!-- Twitter share -->
         <div class="buttons">
            <script type="text/javascript">function twt_click() {u=location.href;t=document.title;window.open('http://twitter.com/home?status='+encodeURIComponent(u)+'&amp;t='+encodeURIComponent(t));return false;}</script>
            <a href="" onclick="return twt_click()" class="fb_share_link"><img style="border:0" src="styles/pondlife/imageset/en/button_twit_share.gif" alt="Tweet this topic"/></a>
         </div>
      <!-- Twitter share end -->
 

Không có nhận xét nào: