module Facebook Like และ Comments ใส่ URL อัตโนมัติ - Joomla! Forum - community, help and support


แนะนำวิธี module ด้วยตัวเองครับ หากท่านใดมีวิธีการอื่นที่ดีกว่าอย่าลืมแนะนำกันบ้างนะครับ

code comment, ของ facebook จะต้องระบุ url หรือ link ของเพจนั้นลงไปด้วยถึงจะทำงานได้code นี้ช่วยให้ webmaster ทำงานได้ง่ายขึ้น โดยไม่ต้องใส่ url ลงไปทุกลิงค์ เพราะถ้าหาก
มีเพจเป็นร้อยเป็นพันหรือมากกว่านั้น คงจะเหนื่อยและเสียเวลากันมาก

วิธีการ
login เข้า backend ของ joomla แล้วไปที่เมนู extension - modules - new - custom html
แล้วใส่ code ทางด้านล่าง, ผู้ใช้สามารถเปลี่ยนพารามิเตอร์ของ code ได้ตามความต้องการ แล้วเปิดนำไปใช้งาน ในตำแหน่ง เมนูในเว็บ joomla ได้ตามต้องการ

code: select all

<script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getelementsbytagname(s)[0];
  if (d.getelementbyid(id)) return;
  js = d.createelement(s); js.id = id;
  js.src = "//connect.facebook.net/th_th/all.js#xfbml=1&amp;appid=170338523018184";
  fjs.parentnode.insertbefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
document.write("<div class='fb-like' data-href='" + window.location.href + "' data-send='false' data-width='500' data-show-faces='true'></div>");
document.write("<div class='fb-comments' data-href='" + window.location.href + "' data-num-posts='8' data-width='600' notify='true' migrated='1'></div>");
</script>


ตัวอย่างหน้าเพจที่ใส่ module นี้
http://www.rimnam.com/%e0%b8%95%e0%b8%b ... b8%9a.html






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support