สอบถามวิธีทำลิ้งค์อ้างอิงเมื่อมีคนมาก็อบปี้ข้อมูลในเว็บเรา

เริ่มโดย nanoman, 17 มิถุนายน 2013, 10:39:41

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

nanoman

วันก่อนผมเข้าไปในเว็บนี้ครับ เพื่อที่จะก็อบปี้เนื้อเพลง
http://www.siamzone.com/music/thailyric/index.php

พอผมก็อบปี้เสร็จแล้ว เอาไปวางในเว็บอื่น หรือวางในโปรแกรมไมโครซอฟเวิร์ด จะปรากฎว่ามีข้อความและลิ้งค์ "...อ้างอิง ตามด้วยลิ้งค์บทความ"

เลยอยากรู้ว่าเค้าทำยังไงครับ หรือว่าใช้สคริปตัวไหน พอจะมีท่านใดทราบบ้างครับ...  :wanwan017:


nanoman

อ้างถึงจาก: beg ใน 17 มิถุนายน 2013, 11:17:37
เอาโค้ดนี้ไปวางในส่วน head ครับ
<script type="text/javascript">
function addLink() {
    var body_element = document.getElementsByTagName('body')[0];
    var selection;
    selection = window.getSelection();
    var pagelink = "<br /><br /><a href='" document.location.href "'>ข้อมูลจากเว็บ " document.location.href "</a>";
    var copytext = selection pagelink;
    var newdiv = document.createElement('div');
    newdiv.style.position='absolute';
    newdiv.style.left='-99999px';
    body_element.appendChild(newdiv);
    newdiv.innerHTML = copytext;
    selection.selectAllChildren(newdiv);
    window.setTimeout(function() {
        body_element.removeChild(newdiv);
    },0);
}
document.oncopy = addLink;
</script>


ไม่ได้ครับ...

TG_Min

เป็นตัวสคริปสำเร็จรูปที่ฝรั่งเขาได้ทำให้เราเอามาใช้ฟรี แต่ข้อจำกัดของมันคือ สามารถใช้ได้แค่โดเมนเดียวต่อการสร้างโคด 1 ครั้ง
เข้าไปที่เว็บ hปปps://id.tynt.com/account/sign_up เพื่อสมัคร

เป็นการลงทะเบียน Account โดยจะต้องกรอกโดเมนที่เราจะใช้งานให้ถูกต้อง เมื่อทำการสมัครเสร็จแล้วระบบก็จะแจ้งโคดให้เราเช่น

<!-- BEGIN Tynt Script -->
   <script type="text/javascript">
   if(document.location.protocol=='http:'){
   var Tynt=Tynt||[];Tynt.push('d5bQScfq4r4Ptdacwqm_6r');
   (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
   }
   </script>
   <!-- END Tynt Script -->

ให้เราเอาไปใส่ในไฟล์เว็บของเรา ในส่วนของ <head>.....</head>

ใครใจดีหา code ใช้กับหลาย domain รบกวนด้วย
[direct=https://www.kasetorganic.com/shop/]Shop[/direct] [direct=https://www.dek-d.com/member/profile/beautisora/blog]บล็อกของ Sora[/direct] [direct=https://krabi.vwander.com]เที่ยวกระบี่ไปได้ทุกวัน[/direct]

beg

อ๋อ โค้ดสคริปจะแสดงไม่ถูกต้องเวลาวางในเว็บบอร์ดน่ะครับ ทำให้เอาไปใช้แล้วไม่ได้ผล

โหลดเป็นไฟล์ที่นี่ ครับ เป็นไฟล์ zip ตัวอย่างโค้ดที่ใช้ได้แน่นอน
http://www.4shared.com/zip/hreez6NV/a_online.html

TG_Min

บ้าหรือเปล่า วางในบอร์ดแล้ว code เปลี่ยน ตลกครับ
เอาของผมไปใช้เลย

ตัวอย่าง


<script type="text/javascript">
function addLink() {
var body_element = document.getElementsByTagName('body')[0];
var selection;
selection = window.getSelection();
var pagelink = "<br /><br /> Read more at: <a href='" document.location.href "'>" document.location.href "</a><br />Copyright &copy; TG_MIN : thaiseoboard"; // change this if you want
var copytext = selection   pagelink;
var newdiv = document.createElement('div');
newdiv.style.position='absolute';
newdiv.style.left='-99999px';
body_element.appendChild(newdiv);
newdiv.innerHTML = copytext;
selection.selectAllChildren(newdiv);
window.setTimeout(function() {
body_element.removeChild(newdiv);
},0);
}
document.oncopy = addLink;
</script>
[direct=https://www.kasetorganic.com/shop/]Shop[/direct] [direct=https://www.dek-d.com/member/profile/beautisora/blog]บล็อกของ Sora[/direct] [direct=https://krabi.vwander.com]เที่ยวกระบี่ไปได้ทุกวัน[/direct]

zidit

ถึงใช้สคิป แต่คนที่จงใจไม่ให้เครดิต ก็จะลบออกอยู่ดีนะผมว่า