ki:blog

右手に萌えを、左手にネタを。

拍手で遊ぼう

拍手をアンケにしたり小窓で出したりする方法をご紹介します。
が、その前に。

A.公式サイトでレンタルしている場合
*この方法では小窓では出せません
*フォームを1つ以上つけることはできません
 →コメントのフォームを無くしてアンケートに変えることは出来る(たぶん)
理由:GETでデータを送れないため。

B.公式サイトのスクリプトを自分で設置している場合
*1と同じです
*が、スクリプトの方に一文加えてもらえば色々できます
理由:要するにGETでもデータ受信できるようにするわけよ。

C.cclapを利用している場合
*やりたい放題
理由:作った本人が何も考えてな遊びたいから。

D.patipatiシステムを利用している場合
*不明
理由:見てないから知らん(機能持ってるし)

そんな感じで。
説明分りづらかったらごめんなさい。気合いで感じてください(笑)
間違いやこうした方がいいんじゃね?という箇所があったらお知らせください。というか、むしろ教えてください。
尚、バグについては受け付けますが、サポートはしませんごめんなさい。(そんなに知識ないのでー)(と言い訳して逃げてみる)

尚この記事はそのうち逃げてしまいますのでよろしくどうぞ!
では行ってみよー!(長いです!)(疲れた!笑)



前置き:
※【】は適宜変えてください。
※最低限しか書いてないのでsizeなどはご自由に。
※動作のアルファベットは前述を参考にしてください。
※B'はスクリプト本体を改造した場合に使えるものです。改造方法はこちら
※公式サイトを利用の方は赤文字のcommenthitokotoに変更してください。
※青文字は自由に変更可ですが変更した際に動かねぇYO!といわれても困りけり。(分かる人だけ変えてください)
※ブログなどShift_JIS以外の文字コードの場所へ設置する場合はこちらを参照してください。

1.拍手のコメントフォームをサイト内に設置する(動作:A,B,C)
以下のタグを適当なところにペシっと貼ってください。
<form action="【拍手アドレス】" method="post" target="_blank">
<input type="text" name="comment">
<input type="submit" value="拍手">
</form>
要するに拍手ボタンで出たお礼の画面のフォームそのまま付ければOKなのです。

2.コメントの変わりにアンケートフォームにする方法(動作:A,B,C)
以下のタグを適当なところにペシっと貼ってください。
<form action="【拍手アドレス】" method="post" target="_blank">
<input type="radio" name="comment" value="回答1">回答1
<input type="radio" name="comment" value="回答2">回答2
<input type="submit" value="拍手">
</FORM>
コメントの代わりにラジオボタンの選択したモノを送るようにしただけですね。当然テキストエリアも可能。
チェックボックスでも使えますが、「回答1回答2」ってな感じで全部一緒になってしまうので、value="回答1/"とか区切り線やかっこなどを入れておくといいかもしれません。

この辺りに関してはこちらのサイトさんで詳しくご説明されているのでむしろその方が分りやすいかも^^;

3.小窓でお礼画面を出す方法(動作:B',C)
新しいウィンドウではなく、JavaScriptでツールバーや画面サイズなどを制御して小窓を出す方法です。
<SCRIPT type="text/javascript">
<!--
function OpenWin1() {
var comment = document.clap.comment.value;
if (comment == "") {
document.clap.comment.value = '';
comment = document.clap.comment.value;
} else {
comment = document.clap.comment.value;
}
window.open ('【拍手アドレス】?comment='+ comment, 'newwin', 'menubar=no,scrollbars=yes, width=【ウィンドウ幅】, height=【ウィンドウ高さ】');
}
//-->
</SCRIPT>
<form name="clap">
<input type=text name="comment">
<input type="submit" value="拍手" onClick="OpenWin1()">
</FORM>
青字の部分で、ブラウザの上にあるメニューなどを表示・非表示に設定できます。詳しくはJavaScriptのサイトを参照してください。

4.コメントフォーム+アンケート(動作:B',C)
以下は基本形です。フォームによって//**の部分が変わります。
<SCRIPT type="text/javascript">
<!--
function OpenWin1() {
var comment = document.clap.comment.value;
var sub = document.clap.sub.value;
if (comment == "") {
document.clap.comment.value = '';
comment = document.clap.comment.value;
} else {
comment = document.clap.comment.value;
}
//**1
window.open ('【拍手アドレス】?comment='+ comment + sub, 'newwin', 'menubar=no,scrollbars=yes, width=【ウィンドウ幅】, height=【ウィンドウ高さ】');
}
//-->
</SCRIPT>
<form name="clap">
//**2
<input type=text name="comment">
<input type="submit" value="拍手" onClick="OpenWin1()">
</FORM>

4−1.テキストボックス、テキストエリアを追加する場合
//**の場所をそれぞれ書き換えてください。
//**1
if (sub == "") {
document.clap.comment.value = '';
sub = document.clap.sub.value;
} else {
sub = '' +document.clap.sub.value+ '';
}
//**2
<input type="text" name="sub">

4−2.ラジオボタンを追加する場合
//**の場所をそれぞれ書き換えてください。
//**1
var flag,sub='';
for (var i=0; i < document.clap.sub.length; i++) {
flag = document.clap.sub[i].checked;
if(flag){ sub = '' +document.clap.sub[i].value+ ''; }
}
//**2
<input type="radio" name="sub" value="回答1">回答1
<input type="radio" name="sub" value="回答2">回答2

4−3.チェックボックスを追加する場合
//**の場所をそれぞれ書き換えてください。
//**1
var flag,sub='';
for (var i=0; i < document.clap.sub.length; i++) {
flag = document.clap.sub[i].checked;
if(flag){ sub += '' +document.clap.sub[i].value+ ''; }
}
//**2
<input type="checkbox" name="sub" value="回答1">回答1
<input type="checkbox" name="sub" value="回答2">回答2


【 ブログのばやい 】
ブログっていうか、異なる文字コード(Shit_JIS)以外の場所で設置する場合、文字化けの可能性があります。
submitのボタンに、緑字の部分を入れてください。
<vinput type="submit" value="拍手" value="Shift_JIS" onClick="document.charset;document.charset='shift_jis';OpenWin1()">

【 改造方法 】
公式サイトスクリプトを改造してデータをGETで受け取れるようにします。
通常CGIではデータはPOSTといって目に見えない形で送られますが、このデータをURLにくっつけて目に見える形でデータを送ります。これをGETといいます。
clapinit.cgiの110行目と111行目の間に以下の文を入れます。
else { $buf = $ENV{'QUERY_STRING'}; }
   ↓入力後
if ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN, $buf, $ENV{'CONTENT_LENGTH'});
}
else { $buf = $ENV{'QUERY_STRING'}; }
%in=();
- :: comments (0) :: trackbacks (89)

Comments [↑NEW]

Comment Form

※海外在住だったりコメント投稿が拒否される場合メール欄に「激ダサだぜ!」と入力すると良いですよ。<スパム対策。 キーワードは気まぐれに変わります(たぶん)

Trackbacks

※トラックバックは反映に時間がかかるときがあったりなかったり。

Cheap propecia buy propecia online. :: Buy propecia buy cheap propecia online.(2007/09/10 10:29 AM)
Buy xenical and propecia online from pharmcom. Cheap propecia buy propecia online. Buy propecia international pharmacy. Buy propecia buy cheap propecia online.
Cheap cialis. :: Cheap cialis.(2007/09/09 09:26 PM)
Cod phentermine as well as cialis cheap reviews. Cheap cialis online order cialis now with discount.
Forex forum. :: Free forex forum.(2007/09/08 10:13 AM)
Free forex forum. Forex forum.
Buy phentermine online wi. :: Buy phentermine online.(2007/09/08 07:17 AM)
Buy c heap phentermine online. Buy c 20heap phentermine online. Buy phentermine online. Buy phentermine online order phentermine.
Valium side effects. :: Valium side effects.(2007/09/06 07:30 PM)
Valium side effects. Valium patient advice including side effects. Side effects of valium.
Buy valium pay cod overnight delivery. :: Buy valium c.o.d..(2007/09/04 10:58 PM)
Buy valium. Buy valium online wholesale prices save up to no. Buy valium without a prescription.
Cheap phentermine. :: Cheap phentermine diet pill.(2007/09/03 06:13 AM)
Cheap phentermine. Phentermine cheap. Get cheap phentermine online free delivery.
Order phentermine c o d. :: Order phentermine online.(2007/09/03 04:10 AM)
Order phentermine gt buy phentermine online. Order phentermine uk. Order phentermine online. Icbs forums view profile order phentermine. Phentermine order on line.
Ephedra pills ephedra liquid gel products. :: Ephedra pills ephedra liquid gel products.(2007/09/03 01:11 AM)
Ephedra pills ephedra liquid gel products.
Paxil cr. :: Paxil cr.(2007/09/02 06:58 PM)
Paxil cr. Is paxil cr better than paxil. Paxil cr dosage.
Generic xanax 2 mg no prescription. :: Generic xanax 2 mg no prescription.(2007/09/02 03:55 PM)
Generic xanax 2 mg no prescription.
Tramadol. :: Tramadol.(2007/09/02 12:13 PM)
Free blog hosting from tramadol anothervision info. Tramadol hcl 50mg. Tramadol.
Pill propecia. :: Propecia pill.(2007/09/02 09:54 AM)
Pill propecia. Propecia pill.
Tramadol side effects. :: Tramadol side effects.(2007/09/02 03:42 AM)
Tramadol for dogs side effects. Tramadol side effects. Side effects of tramadol in canines. Side effects tramadol.
Tramadol side effects. :: Side effects of tramadol in canines.(2007/09/02 12:44 AM)
Tramadol for dogs side effects. Tramadol side effects. Side effects tramadol.
Tramadol. :: Tramadol hydrochloride.(2007/09/01 10:57 PM)
Tramadol abuse. Buy tramadol. Tramadol. What is tramadol. 100 tramadol.
Cialis and pill splitting. :: Cialis.(2007/09/01 09:23 PM)
Cialis american pharmacy. Will cialis make my flaccid length longer. Cialis best price buy online. Cialis.
Discount viagra. :: Discount viagra.(2007/09/01 08:07 PM)
Canada discount viagra. An viagra discount. Discount viagra.
Buy xanax. :: Buy xanax.(2007/09/01 06:58 PM)
Buy xanax. Buy xanax without precription.
Discount phentermine. :: Discount phentermine.(2007/09/01 05:12 PM)
Discount phentermine. Discount phentermine prescription. Phentermine pill online discount.
What does valium look like. :: Valium withdrawal.(2007/09/01 01:41 PM)
No prescription valium.
Soma san diego. :: Soma san diego.(2007/09/01 12:38 PM)
Soma in san diego.
Cheapest cialis. :: Cialis cheapest online prices.(2007/09/01 11:50 AM)
Cheapest cialis. Cheapest generic cialis.
Levitra. :: Levitra paypal.(2007/08/31 09:09 PM)
Zoloft levitra pe cure.
Extract codeine from fioricet. :: Fioricet.(2007/08/31 01:26 PM)
How long does fioricet show up in blood work. Fioricet. Cheap fioricet.
Buy viagra online uk cialis levitra. :: Buy cheap viagra online uk.(2007/08/31 03:26 AM)
Buy uk viagra prescriptions buy uk viagra uk. Viagra news articles buy viagra uk prescriptions. Viagra uk buy viagra online order viagra.
Buy lorazepam. :: Buy lorazepam.(2007/08/30 02:57 AM)
Buy lorazepam.
Effexor xr. :: Pills prescription effexor.(2007/08/28 06:35 AM)
Effects of alcohol and effexor. Effexor. Effexor xr side effects. Effexor drug side effects. Effexor pain. When can i feel the effects of effexor xr.
Buy ambien. :: Generic ambien.(2007/08/27 09:32 AM)
Purchasing ambien online. Ambien. Ambien next day delivery. Ambien addiction. Ambien overnight. Ambien side effects. Ambien cr. Buy ambien.
Ultram information from drugs com. :: Celebrex as well as ultram gt online medications.(2007/08/26 09:42 PM)
Ultram. Ultram ortho mcneil.
Get phentermine. :: Lowest online phentermine price.(2007/08/26 01:38 PM)
Phentermine without a prescription. Cheap phentermine. Phentermine cheap. Phentermine 37.5. Phentermine free shipping. Phentermine no prescription. Cheapest phentermine. Buy phentermine on line.
Buy viagra uk. :: Viagra buy.(2007/08/26 07:21 AM)
Buy viagra in canada. Buy viagra.
Lexapro side effects. :: Lexapro.(2007/08/25 01:15 PM)
Lexapro weight. Effects of lexapro. Lexapro side effects. Lexapro.
Valium without prescription. :: Generic valium no prescription.(2007/08/25 11:31 AM)
Valium without prescription. No prescription valium. Valium prescription online.
Order viagra. :: Viagra samples.(2007/08/25 05:31 AM)
Viagra. Cheap viagra. Viagra st. Free viagra. Generic viagra american express. Your viagra onlinne guide. Re viagra cello. Discount viagra.
Fioricet phentermine shipping. :: Fioricet and blood work.(2007/08/23 07:18 PM)
Fioricet. Cheapest fioricet.
Discount phentermine prescription. :: Discount phentermine prescription.(2007/08/23 01:28 PM)
Discount phentermine prescription. Discount phentermine without a prescription.
Buy phentermine on line. :: Buy phentermine on line without a prescription.(2007/08/23 12:36 PM)
Buy phentermine on line.
Generic propecia. :: Generic propecia.(2007/08/23 10:22 AM)
Generic propecia. Propecia generic.
Tramadol hcl. :: Tramadol hcl 50 mg tablet.(2007/08/23 09:38 AM)
Tramadol hcl liquid. Tramadol hcl.
Phentermine diet pills shipped cod. :: Phentermine diet pills.(2007/08/23 07:00 AM)
Diet pills low cost cheap phentermine. Phentermine diet pills. Diet pills phentermine adipex. Diet pills phentermine. Phentermine diet pills diet pills.
Tramadol cheap no rx from india 200-800 pills. :: Tramadol hci online buy cheap tramadol hci online.(2007/08/23 06:11 AM)
Cheap tramadol. Tramadol cheap no rx free from india. Buy online cheap and fast tramadol. Buy cheap tramadol tramadol mg quick delivery cod. Buy cheap tramadol mg tablets only in us online. Cheap tramadol fedex overnight.
Phentermine. :: Phentermine.(2007/08/23 02:45 AM)
Phentermine price. Phentermine. Xenical hgh phentermine quit smoking detox. Phentermine no prescription. Buy phentermine on line. Phentermine blue.
Ultram er. :: Ultram er.(2007/08/22 12:06 PM)
Mg er ultram. Ultram er. Ultram 200 er.
Generic xanax 2 mg no prescription. :: Generic xanax 2 mg no prescription.(2007/08/22 09:12 AM)
Generic xanax 2 mg no prescription.
Cialis. :: Cialis.(2007/08/22 06:47 AM)
Cialis free sample. Cialis.
Buy valium online. :: Buy valium online without a prescription.(2007/08/22 06:02 AM)
Buy link online ca tf valium. Buy valium online.
Buy phentermine online without a prescription. :: Buy no phentermine prescription.(2007/08/22 03:12 AM)
Buy phentermine online no prescription. Buy phentermine prescription online pharmacy. Buy phentermine online without prescription. Buy no phentermine prescription. Buy phentermine no prescription.
Buy phentermine online shipping free. :: Mg buy phentermine.(2007/08/21 11:57 PM)
Phentermine buy.
Cialis. :: Cialis and levitra.(2007/08/21 05:05 PM)
Cialis online.
Buy phentermine cheap. :: Buy prozac phentermine online free shipping cheap.(2007/08/21 12:41 PM)
Buy phentermine online cheap without prescription.
Cheap phentermine diet pill. :: Cheap phentermine diet pill.(2007/08/21 10:48 AM)
Cheap diet online phentermine pill. Cheap phentermine diet pill.
Buy cheap phentermine. :: Buy cheap phentermine fre.(2007/08/21 07:04 AM)
Phentermine for sale buy cheap phentermine online. Buy cheap phentermine online. Phentermine pill buy cheap phentermine. Buy cheap phentermine.
Lexapro side effects. :: Lexapro.(2007/08/21 06:13 AM)
Why does lexapro make me sleep all the time. Best time to take lexapro. Lexapro. Lexapro medicine. Lexapro wean. Lexapro generic. Lexapro zaps.
Cialis drug. :: Cialis.(2007/08/20 07:09 PM)
Buy cialis online. Cialis st. Cialis.
Phentermine for sale buy cheap phentermine online. :: Buy cheap phentermine fre.(2007/08/20 03:39 PM)
Buy cheap phentermine.
Tramadol hydrochloride. :: Hydrochloride tramadol.(2007/08/20 12:42 PM)
Hydrochloride tramadol.
Buy xanax. :: Buy xanax.(2007/08/20 10:35 AM)
Buy xanax. Buy xanax online. Buy cheap generic xanax. Buy xanax without prescription in usa. Buy xanax no prescription. Xanax buy xanax online buy cheap xanax xanaxbuy. Buy cheap xanax without prescription.
Xanax. :: Xanax xr.(2007/08/20 07:08 AM)
Buy xanax. Xanax. Generic xanax 2 mg no prescription. Ativan vs xanax.
Tramadol. :: Tramadol side effects.(2007/08/19 09:50 AM)
Buy tramadol index. Tramadol hcl. Tramadol.
Soma san diego. :: Soma san diego.(2007/08/19 07:05 AM)
Soma in san diego. Soma in san diego address. Soma san diego.
Xanax. :: Xanax.(2007/08/19 12:33 AM)
Xanax online without prescription. Xanax.
Tramadol side effects. :: Tramadol side effects.(2007/08/17 01:01 PM)
Tramadol for dogs side effects. Tramadol side effects. Side effects of tramadol.
Best p... price for phentermine url. :: Best price for phentermine.(2007/08/17 06:37 AM)
Lowest price for phentermine. Phentermine best price. Best price for phentermine.
Cialis best price buy online. :: Cheap cialis discount cialis online from kcn.(2007/08/16 07:26 AM)
Buy cialis generic online cialis cheap cialis. Cialis online. Cialis best price buy online.
Paxil weaning. :: Paxil weaning.(2007/08/15 01:10 PM)
Paxil weaning.
Soma cube. :: Soma cube for sale.(2007/08/15 06:47 AM)
Soma cube. Soma cube games.
Tramadol for dogs side effects. :: Tramadol side effects.(2007/08/14 05:49 PM)
Tramadol side effects.
Phentermine buy phentermine cheap phentermine. :: Buy cheap phentermine onli ne.(2007/08/14 01:30 AM)
Buy phentermine online buy cheap phentermine. Buy phentermine cheap. Buy cheap phentermine online buy. Buy cheap phentermine now save. Buy cheap phentermine. Buy phentermine online extra cheap phentermine. Buy cheap phentermine fre.
Soma online sales. :: Soma online sales.(2007/08/13 06:20 PM)
Soma online sales.
Buy phentermine online 37.5mg no prescription. :: Buy phentermine online 37.5mg no prescription.(2007/08/13 02:29 AM)
Buy phentermine online 37.5mg no prescription.
Ambien and side effects. :: Ambien latest side effects.(2007/08/13 01:01 AM)
Ambien side effects.
Side effects from lipitor. :: Lipitor side effects walking walking.(2007/08/12 08:34 PM)
Lipitor prescription side effects. Side effects from lipitor. Lipitor side effects intestine. Lipitor side effects. Generic lipitor side effects.
Tramadol hcl 50 mg tablet abuse. :: Tramadol hcl.(2007/08/11 08:49 PM)
Tramadol hcl 20 mg 93. Tramadol hcl 50mg. Tramadol hcl. Tramadol hcl 93. Tramadol hcl 50 mg tablet.
Tramadol hcl. :: Tramadol hcl.(2007/08/11 02:19 AM)
Tramadol hcl liquid. Tramadol hcl. Tramadol hcl 93. Tramadol hcl 50 mg tablet.
Ephedra products. :: Best ephedra products on market.(2007/08/09 03:01 AM)
Products containing ephedra. Ephedra products. Diet pills with ephedra tanning products. Ephedra liquid gel products. Ephedra weight loss products.
Testosterone supplements. :: Bodybuilding supplements testosterone.(2007/08/08 08:41 PM)
Testosterone supplements for women. Testosterone supplements.
Cheapest prices phentermine online. :: Cheapest phentermine online.(2007/08/08 05:35 PM)
Cheapest phentermine online free shipping. Cheapest phentermine online no prescription. Cheapest phentermine online.
Uhi foundation forums xanax cheap phentermine. :: Phentermine very cheap.(2007/08/08 03:02 AM)
Phentermine cheap. Phentermine buy phentermine cheap phentermine.
Generic xanax 2 mg no prescription. :: Generic xanax 2 mg no prescription.(2007/08/07 11:28 PM)
Generic xanax 2 mg no prescription.
Carisoprodol side effects. :: Carisoprodol side effects.(2007/08/06 04:30 PM)
Carisoprodol side effects.
Online phentermine. :: Cheapest phentermine online.(2007/08/06 07:35 AM)
Phentermine online. Phentermine prescription online. Adipexdrug addiction order phentermine online. Phentermine online pharmacy. Online phentermine.
Cheapest phentermine online. :: Cheapest phentermine online.(2007/08/06 04:31 AM)
Cheapest phentermine online.
Ephedrine weight loss products. :: Ephedrine weight loss products.(2007/08/06 01:25 AM)
Ephedrine weight loss products.
Discount phentermine on line. :: Discount phentermine on line.(2007/08/05 10:06 PM)
Discount phentermine on line.
Medical review on wellbutrin xl. :: Wellbutrin xl anxiety.(2007/08/05 04:02 PM)
Wellbutrin xl generics canada. Wellbutrin xl. Wellbutrin xl make you gain weight. Wellbutrin xl and results of.
Ambien latest side effects. :: Ambien next day delivery canada.(2007/08/05 10:06 AM)
Ambien online. Ambien.
Buy phentermine no prescription. :: Phentermine prescription.(2007/08/05 04:23 AM)
Phentermine best price no prescription.
Tramadol hcl. :: The lowest tramadol hcl price guaranteed fast.(2007/08/04 10:12 PM)
Tramadol hcl.