狀態列訊息+時間plus0.2
########################################################
## 外掛名稱: 狀態列訊息+時間
## 外掛版本: plus0.2
## 作者: tytsim, k122417901, ts00728326
##
## 這個外掛支援所有phpbb2.0
## This mod is for all phpBB2.0
##
##
## Installation Level: 普通
## Installation Time: 3-4 分鐘
## Files To Edit: 4
## admin/admin_board.php
## includes/page_header.php
## language\lang_chinese_traditional_taiwan\lang_admin.php
## /templates/your_templates/overall_header.tpl
##
##########################################################
##
## Installation Notes:
##
## There is some customization that will need to be
## done in Viewtopic_body.tpl It is really up to you
## where you want it to be placed.
##
########################################################
plus0.2:tytsim
外掛指正:~倉木麻衣~
後台功能:k122417901
原作者:ts00728326
範例:http://www.tytsim.bobos.ca/bbs/index.php
大家先備份~
新功能簡介:
1. 已修正"h"變數的問題
2. 後台增加"狀態列時間制"
3. 中午12:00 由"12:00 上午" 修改做 "12:00 中午"
plus0.3將會加的功能:
1. "上午" "中午" "下午" "目前時間:"文字編輯
有可能會加的功能(未必會有):
1. 會員修改"狀態列時間制"
修正安裝 (於2005/7/24 下午 08:40分後安裝的不用修改)
把overall_header.tpl
if (h = 12)
改做
if (h == 12)
升級安裝 (plus0.1 to plus 0.2)
#
#-----[ OPEN 打開 ]-------------------------------------------------------------
#
page_header.php
#
#-----[ FIND 找尋 ]------------------------------------------------------------
#
if($board_config['mod_time']=="1"){
$mod_time="onetwo";
}else if ($board_config['mod_time']=="0"){
$mod_time="twofour";
}
#
#-----[ CHANGE 轉做 ]------------------------------------------------------------
#
if($board_config['mod_time']=="1"){
$mod_time="onetwo()";
}else if ($board_config['mod_time']=="0"){
$mod_time="twofour()";
}
#
#-----[ OPEN 打開 ]---------------------------------------------------------------
#
overall_header.tpl
#
#-----[ FIND 找尋 ]-----------------------------------------------------------
#
onload="{mod_time}()"
#
#-----[ CHANGE 轉做 ]--------------------------------------------------------
#
onload="{mod_time}"
#
#-----[ FIND 找尋 ]-----------------------------------------------------------
#
<script language="JavaScript" type="text/javascript">
<!--
timeID = 10;
stcnt = 16;
msg = "{WELCOME_MESSAGE}";
wmsg = new Array(32);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg="";
for (j=0; j<msg.length; j++) wmsg=wmsg+msg.charAt(j)+b;
}
function twofour()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
cl = " 目前時間: "+h+":"+m+":"+s+" ";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("twofour()",100);
}
function onetwo()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
if (h > 12)
{
h = h-12 ;
cl = " 目前時間: "+h+":"+m+":"+s+" 下午";
}
if (h <= 12) cl = " 目前時間: "+h+":"+m+":"+s+" 上午";
if (h < 10 & h > 0 ) cl= " 目前時間: 0"+h+":"+m+":"+s+" 下午";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("onetwo()",100);
}
-->
</script>
#
#-----[ CHANGE 轉做 ]------------------------------------------------------
#
<script language="JavaScript" type="text/javascript">
<!--
timeID = 10;
stcnt = 16;
msg = "{WELCOME_MESSAGE}";
\nwmsg = new Array(32);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg="";
for (j=0; j<msg.length; j++) wmsg=wmsg+msg.charAt(j)+b;
}
function twofour()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
cl = " 目前時間: "+h+":"+m+":"+s+" ";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("twofour()",100);
}
function onetwo()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
if (h == 12)
{
cl = " 目前時間: "+h+":"+m+":"+s+" 中午";
}else if (h > 12)
{
h = h-12 ;
cl = " 目前時間: "+h+":"+m+":"+s+" 下午";
if (h < 10 & h > 0 ) cl= " 目前時間: 0"+h+":"+m+":"+s+" 下午";
}else if (h < 12) cl = " 目前時間: "+h+":"+m+":"+s+" 上午";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("onetwo()",100);
}
-->
</script>
#
#-----[ SAVE COLSE 存檔 關閉 ]--------------------------------------------
#EoM 外掛升級結束
完整安裝:
#
#-----[ OPEN 打開 ]----------------------------------------------------------------
#
overall_header.tpl
#
#-----[ BEFORE </HEAD> ADD 在</head>之前加上 ]------------------------
#
<script language="JavaScript" type="text/javascript">
<!--
timeID = 10;
stcnt = 16;
msg = "{WELCOME_MESSAGE}";
wmsg = new Array(32);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg="";
for (j=0; j<msg.length; j++) wmsg=wmsg+msg.charAt(j)+b;
}
function twofour()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
cl = " 目前時間: "+h+":"+m+":"+s+" ";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("twofour()",100);
}
function onetwo()
{
ct = new Date();
h = "0"+ct.getHours();
m = "0"+ct.getMinutes();
s = "0"+ct.getSeconds();
h = h.substring(h.length-2,h.length+1);
m = m.substring(m.length-2,m.length+1);
s = s.substring(s.length-2,s.length+1);
if (h == 12)
{
cl = " 目前時間: "+h+":"+m+":"+s+" 中午";
}else if (h > 12)
{
h = h-12 ;
cl = " 目前時間: "+h+":"+m+":"+s+" 下午";
if (h < 10 & h > 0 ) cl= " 目前時間: 0"+h+":"+m+":"+s+" 下午";
}else if (h < 12) cl = " 目前時間: "+h+":"+m+":"+s+" 上午";
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = cl+str;
clearTimeout(timeID);
timeID = setTimeout("onetwo()",100);
}
-->
</script>
#
#-----[ FIND 找尋 ]----------------------------------------------------------------
#
<body
#
#-----[ IN-LINE (AFTER) ADD 在之後(同一行)加 ]-------------------------------
#
onload={MOD_TIME}
#
#-----[ OPEN 打開 ]--------------------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND 找尋 ]---------------------------------------------------------------
#
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
#
#-----[ AFTER ADD 之後加 ]---------------------------------------------------
#
if($board_config['mod_time']=="1"){
$mod_time="onetwo()";
}else if ($board_config['mod_time']=="0"){
$mod_time="twofour()";
}
#
#-----[ FIND 找尋 ]---------------------------------------------------------------
#
'NAV_LINKS' => $nav_links_html)
#
#-----[ BEFORE IT, ADD 在之前加 ]--------------------
#
'WELCOME_MESSAGE' => $board_config['welcome_message'],
'MOD_TIME' => $mod_time,
#
#-----[ OPEN 打開 ]----------------------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND 找尋 ]----------------------------------------------------------------
#
"L_SITE_DESCRIPTION" => $lang['Site_desc'],
#
#-----[ AFTER ADD 之後加 ]------------------------------------------------------
#
"L_WELCOME_MESSAGE" => $lang['Welcome_message'],
"L_MOD_TIME" => $lang['Mod_time'],
#
#-----[ FIND 找尋 ]----------------------------------------------------------------
#
"SITE_DESCRIPTION" => $new['site_desc'],
#
#-----[ AFTER, ADD 之後加]-----------------------------------------------------
#
"WELCOME_MESSAGE" => $new['welcome_message'],
"MOD_TIME" => $new['mod_time'],
#
#-----[ OPEN 打開 ]------------------------------------------------
#
language\lang_chinese_traditional_taiwan\lang_admin.php
#
#-----[ FIND 找尋 ]-----------------------------------------------------------
#
$lang['Site_desc'] = '討論區描述';
#
#-----[ AFTER ADD 之後加 ]--------------------------------------------------
#
$lang['Welcome_message'] = '狀態列訊息';
$lang['Mod_time'] = '狀態列時間制';
#
#-----[ OPEN 打開 ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND 尋找 ]------------------------------------------------
#
<tr>
<td class="row1">{L_SITE_DESCRIPTION}</td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="{SITE_DESCRIPTION}" /></td>
</tr>
#
#-----[ AFTER, ADD 之後加 ]------------------------------------
#
<tr>
<td class="row1">{L_WELCOME_MESSAGE}</td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="welcome_message" value="{WELCOME_MESSAGE}" /></td>
</tr>
<tr>
<td class="row1">{L_MOD_TIME}<br>12小時制打1,24小時制打0</td>
<td class="row2"><input class="post" type="text" size="5" maxlength="1" name="mod_time" value="{MOD_TIME}" /></td>
</tr>
#
#-----[ ADD SQL 加入SQL語法 ]----------------------------------
#
INSERT INTO phpbb_config (config_name , config_value) VALUES ('welcome_message', '您好^_^');
INSERT INTO phpbb_config (config_name , config_value) VALUES ('mod_time', '1');
#
#-----[ SAVE CLOSE 存檔 關閉 ]
#
#EoM
有問題到
非官方推薦認證外掛討論
[外掛]狀態列訊息+時間plus0.2
MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!
版主: 版主管理群
前往
- Announcement
- ↳ 系統公告區
- Support
- ↳ [3.3.x] 安裝與使用
- ↳ [3.3.x] 中文
- ↳ [3.3.x] 轉換
- Extensions
- ↳ 官方認證擴充功能
- ↳ [3.3.x] 官方認證擴充功能
- ↳ 非官方認證擴充功能
- ↳ 擴充功能問題討論
- Style
- ↳ 官方認證風格
- ↳ [3.3.x] 官方認證風格
- ↳ 非官方認證風格
- ↳ 風格問題討論
- Knowledge
- ↳ 教學文件庫
- ↳ 2.0
- ↳ 3.0
- ↳ 3.1
- ↳ 3.2
- ↳ 3.3
- ↳ phpBB 技術文件與知識庫
- ↳ 2.0
- ↳ 3.0
- ↳ 3.1
- ↳ 3.2
- Non-phpBB specific
- ↳ 塔羅占卜
- ↳ 塔羅精華
- ↳ 每週運勢
- ↳ 我想發問
- ↳ 站長交流
- ↳ 自由軟體或免費軟體
- ↳ 架站
- ↳ AppServ
- ↳ WampServer
- ↳ XAMPP
- ↳ phpMyAdmin
- ↳ ExoBUD MP
- ↳ 4images
- ↳ Coppermine Photo Gallery
- ↳ 網路
- ↳ 文書
- ↳ 檔案
- ↳ 美工
- ↳ 系統
- ↳ 安全
- ↳ 多媒體
- ↳ 遊戲
- ↳ 光碟
- ↳ 休閒哈拉與心情小品
- ↳ 意見反應或無法分類
- Link
- ↳ 竹貓星球數位(股)
- ↳ FaceBook_phpBB3-官方中文支援
- ↳ SSD 不限流量-網站空間( .tw or .com.tw域名免費送)
- ↳ 推薦網站
- ↳ phpBB.com
- ↳ phpBBHacks.com
- Archives
- ↳ phpBB 3.2.x Forum Archive
- ↳ [3.2.x] 安裝與使用
- ↳ [3.2.x] 中文
- ↳ [3.2.x] 轉換
- ↳ [3.2.x] 官方認證擴充功能
- ↳ [3.2.x] 官方認證風格
- ↳ phpBB 3.1.x Forum Archive
- ↳ [3.1.x] 安裝與使用
- ↳ [3.1.x] 中文
- ↳ [3.1.x] 轉換
- ↳ [3.1.x] 官方認證風格
- ↳ phpBB 3.0.x Forum Archive
- ↳ [3.0.x] Support
- ↳ [3.0.x] 安裝與使用
- ↳ [3.0.x] 中文
- ↳ [3.0.x] 轉換
- ↳ [3.0.x] Mod
- ↳ [3.0.x] 官方認證外掛
- ↳ [3.0.x] 非官方認證外掛
- ↳ [3.0.x] 外掛問題討論
- ↳ [3.0.x] Style
- ↳ [3.0.x] 官方認證風格
- ↳ [3.0.x] 非官方認證風格
- ↳ [3.0.x] 風格問題討論
- ↳ phpBB2 Forum Archive
- ↳ Support
- ↳ phpBB 2 安裝與使用
- ↳ phpBB 2 plus 綜合討論
- ↳ MOD
- ↳ 官方認證外掛
- ↳ 非官方認證外掛
- ↳ 外掛問題討論
- ↳ Style
- ↳ 官方認證風格
- ↳ 非官方認證風格
- ↳ 風格問題討論