晉級功能留言板

留言板1 留言板2

本來是懶的講解怎樣設定的Soppo∼但想想還是 稍微說一下好了Hekomi

進階的設定教學可以看這個網站:mkakikomitai留言版語法加設教學

:設定方式

1. 把下载下來的檔案解壓縮後.先找到mkcvo.cgi用右鍵點它選開啟檔案然後選 用記事本開啟 .然後找到最下面這些文字,主要就是設定這些而已.

2. 關於圖片的部份,如果你是用別的檔案∼記得要改成自己的檔案並存放在相關的資料夾

如:留言者一般可選擇之圖檔想用一個圖檔為 aaa.jpg(圖片長為30高為35)圖片顯示名稱為開心小豬

原來的:$icon_gif[0] = '../gbimg/0.gif' ; $iconnm[0] = '00'; $icon_gif_w[0] = 38 ; $icon_gif_h[0] = 37 ;

修改後:$icon_gif[0] = '../gbimg/aaa.jpg' ; $iconnm[0] = '開心小豬'; $icon_gif_w[0] = 30 ; $icon_gif_h[0] = 35 ;

(下面是我範例留言板1的設定)

#─<基本設定開始>────────────────────────────────────────────────────────
$url = 'http://popo516.myweb.hinet.net/lost_heart/apple.htm'; #首頁的網址
$gburl =''; #CVO修改 - 加入板板路徑
$script = './mkcvo.cgi'; #主程式檔名
$logfile = './mkcvo.txt'; #留言記錄檔名
$lockfile = './mkcvo.lock'; #鎖定檔檔名
$cntfile = './mkcvo.cnt'; #計數器記錄檔名 (不使用則改為'')
$logfile2 = './mkcvo_cnt.txt'; #設定記錄留言者留言篇數的晉級狀態記錄檔。(使用晉級制度必須有此檔案,不使用則改為'')

#要使用計數器的功能,必須設定每個計數器圖檔的語法。src=之後的是圖檔路徑。如果你知道每個圖檔的大小,最好也加入闊度(width)和高度(height)的數值。
#設定圖檔路徑時,也可以用類似src=http://www.∼/xxx.gif的語法來指定存在於主機伺服器以外其他位置的圖檔。
#如果不指定計數器圖檔,請改為'',便會使用純文字形式表示。
$cnt_gif[0] = '<img src=../cicon/0.gif width=9 height=9>';
$cnt_gif[1] = '<img src=../cicon/1.gif width=9 height=9>';
$cnt_gif[2] = '<img src=../cicon/2.gif width=9 height=9>';
$cnt_gif[3] = '<img src=../cicon/3.gif width=9 height=9>';
$cnt_gif[4] = '<img src=../cicon/4.gif width=9 height=9>';
$cnt_gif[5] = '<img src=../cicon/5.gif width=9 height=9>';
$cnt_gif[6] = '<img src=../cicon/6.gif width=9 height=9>';
$cnt_gif[7] = '<img src=../cicon/7.gif width=9 height=9>';
$cnt_gif[8] = '<img src=../cicon/8.gif width=9 height=9>';
$cnt_gif[9] = '<img src=../cicon/9.gif width=9 height=9>';
$cnt_keta = 5; #計數器要顯示幾多位數字?

$title = '範例留言板'; #留言板的標題
$sitemanager ='E.ting'; #防冒板主名字
$titlelogo = '<img src=../img/title.gif width=409 height=86>'; #留言板標題圖檔IMG語法 (不使用則改為'')
$backpicture = '../img/bg.gif'; #背景圖檔
$bgcolor = '#FFA4AF'; #背景顏色
$tbgcolor = '#FFA4AF'; #填寫留言表格的背景顏色
$tcolor = '#993300'; #文字顏色
$linkcolor = '#c98547'; #連結顏色 (從未到訪)
$vlinkcolor = '#c98547'; #連結顏色 (曾經到訪)
$alinkcolor = '#ff9999'; #連結顏色 (正在到訪)
$hovercolor = '#ff9999'; #連結顏色 (滑鼠經過時) #i000331
$pt = '9pt'; #整體字形大小,建議:9,10,11,12 #i000331
$pt_mini = '9pt'; #微縮字形大小,建議:8,9,10 (驚直加入 - 套用於"圖檔一覽表"連結、顏色方塊、使用者晉級資訊及留言資訊)
$e_font = "Georgia, Tahoma, Verdana, Arial"; #英文專屬字形集 (驚直加入)
$res_gif = '../img/res.gif'; #設定讓訪客「回覆留言」的圖檔。(不使用則改為'',便會以純文字形式表示)
$gif_spacer = '../img/spacer.gif'; #調整空位的DUMMY圖檔

$name_color = '#993300'; #每篇留言之中,留言者名字等資訊的顏色
$msg_color = '#FFA4AF'; #每篇留言之中,留言內容的背景顏色

$titleset = 1; #每篇留言都要有標題嗎?(0:不要 1:要)

$homelinklogo = '<img src=../img/url.gif width=12 height=11 border=0 alt=個人網站>'; #留言者個人網站連結圖檔IMG語法 (不使用則改為'')
$maillinklogo = '<img src=../img/email.gif width=12 height=8 border=0 alt=電子信箱>'; #留言者電子信箱連結圖檔IMG語法 (不使用則改為'')

$top_l = '<img src=../img/top_l_h.gif width=14 height=14>'; #造成留言框圓角效果的圖檔IMG語法 (左上角) (不使用則改為'')
$top_r = '<img src=../img/top_r_h.gif width=14 height=14>'; #造成留言框圓角效果的圖檔IMG語法 (右上角) (不使用則改為'')
$bottom_l = '<img src=../img/bottom_l_h.gif width=14 height=14>'; #造成留言框圓角效果的圖檔IMG語法 (左下角) (不使用則改為'')
$bottom_r = '<img src=../img/bottom_r_h.gif width=14 height=14>'; #造成留言框圓角效果的圖檔IMG語法 (右下角) (不使用則改為'')

$datamax = 300; #最新的留言集,保留的留言篇數 (只要留言達到這個數目,最原先的留言便會存入舊留言集)
$pagemax = 15 ; #1頁可顯示之留言篇數
$password = '1234'; #管理者密碼
$tag = 'yes'; #允許使用HTML碼?(yes,no)
$resflag = 'yes'; #最新回覆的留言搬到最頂?(yes,no)
$hostflag = 'no'; #顯示留言者的HOST位址?(yes,no)

$row = 6; #輸入留言內容方塊的列數(高度)
$col = 56; #輸入留言內容方塊的欄數(闊度)
$t_width = 380; #每篇留言的闊度(以像素計)預設460 (本站留言板設定660,600,550,500)

#設定留言可用之背景顏色.原作者的設定:@COLORS_B = ('#666666','#003399','#990000','#669900','#cc3399','#ff6633','#cccc00');
@COLORS_B = ('deepskyblue','steelblue','dimgray','seagreen','cadetblue','darkturquoise','royalblue','darkorchid','mediumvioletred','hotpink','tomato','crimson','goldenrod','chocolate','saddlebrown',); #(驚直修改 - 使用文字顏色碼並加入更多顏色)
$colb_use = 1; #(0:顏色由留言者選擇 1:顏色由管理者指定)
$colb = '#FFA4AF' ; #如果上面的值是'1',全部留言都使用這個指定的背景顏色
#設定留言可用之文字顏色.原作者的設定:@COLORS_F = ('#666666','#993300','#990000','#669900','#cc3399','#ff6633','#cccc00','#000000');
@COLORS_F = ('lightskyblue','lightsteelblue','darkgray','mediumseagreen','lightseagreen','turquoise','cornflowerblue','orchid','palevioletred','lightpink','lightsalmon','lightcoral','gold','sandybrown','peru','black'); #(驚直修改 - 使用文字顏色碼並加入更多顏色)
$colf_use = 1; #(0:顏色由留言者選擇 1:顏色由管理者指定)
$colf = '#993300' ; #如果上面的值是'1',全部留言都使用這個指定的文字顏色

#留言表格的各個欄目(名字、電子信箱、個人網站、標題等)可以使用一套圖檔顯示出來
$gif_flg = 1; #想要使用留言表格欄目圖檔嗎?(0:不使用 1:使用)

#設定留言表格的各個欄目圖檔
$gif_name = '../img/kakikomitai_name.gif'; #(名字)
$gif_email = '../img/kakikomitai_email.gif'; #(電子信箱)
$gif_home = '../img/kakikomitai_homepage.gif'; #(個人網站)
$gif_title = '../img/kakikomitai_title.gif'; #(標題)
$gif_message = '../img/kakikomitai_message.gif'; #(留言內容)

$icon_use = 'yes'; #留言內容使用圖檔嗎?(yes,no)

#↓設定管理者專用圖檔。除了管理者以外,沒有其他人可以使用這個圖檔。
#你可以在$oiconpass為這個屬於你的專用圖檔設定一個密碼,留言內容掃出來的時候驗證密碼&名字如果跟記錄所載相同才會顯示出來,否則會使用一般圖檔。
#醬子就算有人要冒充你來寫留言,也必須知道你的專用圖檔密碼才能夠成功盜用你的身份。(不使用則改為$oiconpass = '';)
$oicon_gif = '../kofimg/admin.gif' ; $oiconpass = '1234'; $oicon_gif_w = 44 ; $oicon_gif_h = 48 ;

#↓設定常連者專用圖檔。你可以為你的朋友或經常上來寫留言的網友(常連者)增加其他圖檔如$jicon_gif[2]...[5]等,餘此類推。
#留言內容掃出來的時候,會驗證留言者的名字是否跟這裡所設定的$jiconnm一樣,如是者便會出現對應的個人圖檔,不受自行選擇之圖檔影響。
$jicon_gif[0] = '../kofimg/01.gif' ; $jiconnm[0] = '' ; $jipass[0] = '963852741' ; $jicon_gif_w[0] = 50 ; $jicon_gif_h[0] = 44 ;
$jicon_gif[1] = '../kofimg/02.gif' ; $jiconnm[1] = '' ; $jipass[1] = '963852741' ; $jicon_gif_w[1] = 46 ; $jicon_gif_h[1] = 44 ;
$jicon_gif[2] = '../kofimg/03.gif' ; $jiconnm[2] = '' ; $jipass[2] = '963852741' ; $jicon_gif_w[2] = 43 ; $jicon_gif_h[2] = 44 ;
$jicon_gif[3] = '../kofimg/04.gif' ; $jiconnm[3] = '' ; $jipass[3] = '963852741' ; $jicon_gif_w[3] = 44 ; $jicon_gif_h[3] = 47 ;
$jicon_gif[4] = '../kofimg/05.gif' ; $jiconnm[4] = '' ; $jipass[4] = '963852741' ; $jicon_gif_w[4] = 52 ; $jicon_gif_h[4] = 42 ;
$jicon_gif[5] = '../kofimg/06.gif' ; $jiconnm[5] = '' ; $jipass[5] = '963852741' ; $jicon_gif_w[5] = 59 ; $jicon_gif_h[5] = 44 ;
$jicon_gif[6] = '../kofimg/07.gif' ; $jiconnm[6] = '' ; $jipass[6] = '963852741' ; $jicon_gif_w[6] = 40 ; $jicon_gif_h[6] = 43 ;
$jicon_gif[7] = '../kofimg/08.gif' ; $jiconnm[7] = '' ; $jipass[7] = '963852741' ; $jicon_gif_w[7] = 47 ; $jicon_gif_h[7] = 40 ;
$jicon_gif[8] = '../kofimg/09.gif' ; $jiconnm[8] = '' ; $jipass[8] = '963852741' ; $jicon_gif_w[8] = 49 ; $jicon_gif_h[8] = 36 ;
$jicon_gif[9] = '../kofimg/10.gif' ; $jiconnm[9] = 'Whip' ; $jipass[9] = '963852741' ; $jicon_gif_w[9] = 50 ; $jicon_gif_h[9] = 35 ;
$jicon_gif[10] = '../kofimg/11.gif' ; $jiconnm[10] = '' ; $jipass[10] = '963852741' ; $jicon_gif_w[10] = 52 ; $jicon_gif_h[10] = 35 ;
$jicon_gif[11] = '../kofimg/12.gif' ; $jiconnm[11] = '' ; $jipass[11] = '963852741' ; $jicon_gif_w[11] = 43 ; $jicon_gif_h[11] = 37 ;


#↓設定留言者一般可選擇之圖檔。可以依個人需要增加其他圖檔如$icon_gif[11]...[20]等,餘此類推
$icon_gif[0] = '../gbimg/0.gif' ; $iconnm[0] = '00'; $icon_gif_w[0] = 38 ; $icon_gif_h[0] = 37 ;
$icon_gif[1] = '../gbimg/1.gif' ; $iconnm[1] = '01'; $icon_gif_w[1] = 38 ; $icon_gif_h[1] = 37 ;
$icon_gif[2] = '../gbimg/2.gif' ; $iconnm[2] = '02'; $icon_gif_w[2] = 38 ; $icon_gif_h[2] = 37 ;
$icon_gif[3] = '../gbimg/3.gif' ; $iconnm[3] = '03'; $icon_gif_w[3] = 38 ; $icon_gif_h[3] = 37 ;
$icon_gif[4] = '../gbimg/4.gif' ; $iconnm[4] = '04'; $icon_gif_w[4] = 38 ; $icon_gif_h[4] = 37 ;
$icon_gif[5] = '../gbimg/5.gif' ; $iconnm[5] = '05'; $icon_gif_w[5] = 38 ; $icon_gif_h[5] = 37 ;
$icon_gif[6] = '../gbimg/6.gif' ; $iconnm[6] = '06'; $icon_gif_w[6] = 38 ; $icon_gif_h[6] = 37 ;
$icon_gif[7] = '../gbimg/7.gif' ; $iconnm[7] = '07'; $icon_gif_w[7] = 38 ; $icon_gif_h[7] = 37 ;
$icon_gif[8] = '../gbimg/8.gif' ; $iconnm[8] = '08'; $icon_gif_w[8] = 38 ; $icon_gif_h[8] = 37 ;
$icon_gif[9] = '../gbimg/9.gif' ; $iconnm[9] = '09'; $icon_gif_w[9] = 38 ; $icon_gif_h[9] = 37 ;
$icon_gif[10] = '../gbimg/10.gif' ; $iconnm[10] = '10'; $icon_gif_w[10] = 38 ; $icon_gif_h[10] = 37 ;
$icon_gif[11] = '../gbimg/11.gif' ; $iconnm[11] = '11'; $icon_gif_w[11] = 38 ; $icon_gif_h[11] = 37 ;
$icon_gif[12] = '../gbimg/12.gif' ; $iconnm[12] = '12'; $icon_gif_w[12] = 38 ; $icon_gif_h[12] = 37 ;
$icon_gif[13] = '../gbimg/13.gif' ; $iconnm[13] = '13'; $icon_gif_w[13] = 38 ; $icon_gif_h[13] = 37 ;
$icon_gif[14] = '../gbimg/14.gif' ; $iconnm[14] = '14'; $icon_gif_w[14] = 38 ; $icon_gif_h[14] = 37 ;


$icon_line = 3 ; #顯示圖檔一覽表時,每行顯示幾多個圖檔?

$method = 'POST'; #METHOD方式(POST或GET)

#設定有問題的網域清單。只要符合這清單的網域都會被攔截(禁止寫入留言)。
# 設定 "xxx?.com" 即包括了 "xxx1.com","xxx2.com" 等,「?」可以是任何1個字元。
# 設定 "xxx*.com" 即包括了 "xxx1.com","xxx12345.com" 等,「*」可以是0個或以上的任何字元。
@DANGER_LIST=("xxx.com","yyy.com","zzz*.org.tw");

#設定留言內容的最高字數(以字元計算)。如果不設定最高字數,改為''即可。這個數值不能夠設得太大,最好是5000或以下,否則可能會出現錯誤信息。
$maxword = '2000'; #2000個字元即代表1000個中文字。

#設定晉級制度的每個類別。
@rank = ('來訪者','無聊人','強人','常客','貴賓','<strong>VIP</strong>&nbsp;重要人物','<strong>VIP</strong>&nbsp;型男索女','<strong>VIP</strong>&nbsp;抽筋勁人','<strong>VIP</strong>&nbsp;無敵狂人','<strong>VIP</strong>&nbsp;留言機器');
#設定每個類別的晉級資格,數目為留言篇數。
@rankno = ('0','10','20','40','80','100','200','500','750','1000');

#你想要根據各人的晉級狀態來指定圖檔嗎?如果你使用這個模式,留言者在留言時毋須選擇圖檔。
#此外,圖檔的數目須與晉級制度的級數互相對應。(註:除管理者專用圖檔外,其餘常連者專用圖檔會失效)
#例:
# $icon_gif[0] = 'xx1.gif'; $iconnm[0] = '第一級';
# $icon_gif[1] = 'xx2.gif'; $iconnm[1] = '第二級';
# $icon_gif[2] = 'xx3.gif'; $iconnm[2] = '第三級';
# @rank = ('第一級','第二級','第三級');
# @rankno = ('0','10','100'); ※設定3個晉級類別,便要設定3個圖檔,而每個圖檔分別代表這3個類別。
$icon_rank = 0; #0:不要根據晉級狀態指定圖檔(留言時自行選擇圖檔) 1:根據晉級狀態指定圖檔

#設定sendmail程式的路徑。此項資料可向網路管理者查詢。(一般是/usr/sbin/sendmail或/usr/lib/sendmail)
#如果你想要在有新留言的時候把留言資料寄到你的電子信箱,便要設定,否則可保留為$sendmail = "";
$sendmail = "";

#設定寄發郵件通知時,要收件的電子信箱。「@」之前的一個「\」符號是必須加上的。如果沒有了「\」這符號,會出現Internal Server Error錯誤訊息。
#(使用sendmail程式送信才需要設定)
$smail_address = "xxxx\@xxxx.xxxx.com.tw";

$sendsw = 0; #當使用寄發郵件通知功能時,連你自己寫入的留言記錄(以上面的信箱作對照)也要利用郵件通知嗎?(0:忽略 1:全部都要通知)

$hiho = 0; #設為「1」即可使用「hi-ho」形式傳送郵件。某些伺服器不支援。 ※使用sendmail程式送信才需要設定

#留言密碼的加密程序(使用crypt函數將密碼暗號化)
$ango = 1; #0: 不使用 1:使用 (建議使用)

#舊留言集的設定…指定一個資料夾($olddir)存放"01.txt".."10.txt"等等的舊留言記錄檔。
$olddir = './old/'; #保存舊留言集的資料夾所在。(不使用則改為'')
$oldmax = 300; #每個舊留言集可容納之留言串列數。每當超過這個串列數後,會建立另一個舊留言集。

#你想要使用像『nyaponika學習帳』留言板的「橫線隔行」功能嗎?
$nya = 0 ; #留言內容的換行符號(<br>)要用橫線(<hr>)取代嗎?(0:否 1:是)
$maru = 1 ; #留言框要使用圓角嗎?(0:否 1:是)…如果「否」,則可以不要$top_l,r,$bottom_l,r這些圖檔。

#=============================================================================================================================================================================================
#設定CSS樣式表 ※如果不使用,請改為 $css_style = ""; 有需要的話,可以輸入2行或以上的文字(只要設定在兩個EOM標記之間就可以)。
$css_style = <<"EOM"; #(一般輸入欄位的樣式表設定,套用於表單中的textarea及input type=text,password)
style="font-size:$pt; font-family:'新細明體','PMingLiU';
color:#993300; background-color:#fedee2; border-width:1px; border-style:solid; border-color:#993300;"
onFocus="this.style.backgroundColor='ivory'" onBlur="this.style.backgroundColor='white'"
EOM
$css_style_e = <<"EOM"; #(驚直加入 - 英數文字輸入欄位的樣式表設定,套用於表單中的[電子信箱/個人網站/留言編號]欄位)
style="font-size:$pt; font-family:$e_font;
color:#993300; background-color:#fedee2; border-width:1px; border-style:solid; border-color:#993300;"
onFocus="this.style.backgroundColor='ivory'" onBlur="this.style.backgroundColor='white'"
EOM
$css_button = <<"EOM"; #(驚直加入 - 按鈕專用的樣式表設定,套用於表單中的input type=submit,reset,button)
style="font-size:$pt; font-family:'新細明體','PMingLiU'; line-height:12pt;
color:#993300; background-color:#fedee2; border-width:1px; border-style:solid; border-color:#993300;"
onMouseOver="this.style.color='dimgray';this.style.backgroundColor='ivory'" onMouseOut="this.style.color='gray';this.style.backgroundColor='white'"
EOM
$css_select = <<"EOM"; #(驚直加入 - 下拉選單專用的樣式表設定,套用於表單中的select)
style="font-size:$pt; font-family:'新細明體','PMingLiU'; color:#993300; background-color:#fedee2;"
onFocus="this.style.backgroundColor='ivory'" onBlur="this.style.backgroundColor='white'"
EOM
$css_style_ = <<"EOM"; #(驚直加入 - 針對非IE瀏覽器的一般輸入欄位的樣式表設定)
style="font-size:$pt; font-family:'新細明體','PMingLiU'; color:#993300; background-color:#fedee2; padding-left:2px;"
onFocus="this.style.backgroundColor='ivory'" onBlur="this.style.backgroundColor='white'"
EOM
$css_style_e_ = <<"EOM"; #(驚直加入 - 針對非IE瀏覽器的英數文字輸入欄位的樣式表設定)
style="font-size:$pt; font-family:$e_font; color:#993300; background-color:white; padding-left:2px;"
onFocus="this.style.backgroundColor='ivory'" onBlur="this.style.backgroundColor='#fedee2'"
EOM
$css_button_ = <<"EOM"; #(驚直加入 - 針對非IE瀏覽器的按鈕專用的樣式表設定)
style="font-size:9pt; font-family:'新細明體','PMingLiU'; color:#993300; background-color:#fedee2;"
onMouseOver="this.style.color='dimgray';this.style.backgroundColor='ivory'" onMouseOut="this.style.color='gray';this.style.backgroundColor='white'"
EOM

#■↓以下這個功能目的是要惡作劇留言者,使用隨機數目回扣留言者的留言篇數,如果不想使用請設為「$rdm = 0;」。
$rdm = 0; #數值範圍是0∼30,隨機變化。
@DOWN = (1,2,3,5,7,10); #隨機回扣留言篇數的數目,建議數值在15以下。

$kaisu_disp = 1; #留言內容顯示留言者的最新留言篇數?(0:否 1:是)

$ikkiflg = 1 ; #你想要使用「多篇回覆模式」嗎?(0:否 1:是)

#當留言板轉換到「多篇回覆模式」的時候,在留言輸入表單與留言內容之間會出現以下文字,提醒使用者要注意的事情。
$ikkimsg = <<"EOM";
<table width=500 align=center><tr><td>
■現在你進入了「多篇回覆模式」,你可以同時回覆多篇留言。只要在想要回覆的留言串列下面的留言框,把對應的留言分別填寫好,然後再按上面表單的「多篇回覆」按鈕即可。(注意:你只可以選擇一個圖檔。)如果你按下「關閉多篇回覆」,即可回到正常模式,所有留言串列下面的留言框隨即消失。
</td></tr></table>
EOM

#檢查留言內容的危險語法標籤
@errtag = ('table','meta','form','!--','embed','html','body','tr','td','th','a','textarea'); #危險語法標籤

#─<基本設定結束>────────────────────────────────────────────────────────
 

3. 上傳:以最常用的Netfirms空間為例 (Netfirms空間申請教學),檔案上傳後的相關位置應如下所示(請展開資料夾來看)

上傳位置與設定(cgi-bin與www是本來Netfirms就有的)
  • cgi-bin
  • www

:瀏覽器上傳

登入到Netfirms控制頁選Site Tools → 再選File Manager 會看到如下

cgi-bin資料夾進入~按右上方upload圖來上傳檔案(上傳完成應如下所示)

up回到上層目錄後再點www資料夾進入~在右上方
輸入資料夾名稱來建立資料夾(完成後應如下所示)

分別點入個別資料夾中將相關的圖片檔案上傳

4. 設定權限(755丶666丶 644)

用瀏覽器

登入到Netfirms控制頁選Site Tools → 再選File Manager →點資料夾檔案 Perm's 依照如下的勾選

755

666

644

用Ftp

用右鍵點資料夾檔案→ 再選內容CHMOD

依照如下圖所示的打入數字即可