1 頁 (共 1 頁)

[外掛] P.C.P 時間格式選項

發表於 : 2004-06-13 09:28
天霜
#
#-----[ OPEN 打開 ]------------------------------------------------
#

代碼: 選擇全部

includes/usercp_register.php
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

	$template->assign_vars(array(
		'USERNAME' => $username,
#
#-----[ BEFORE ADD 之前, 加上 ]------------------------------------
#

代碼: 選擇全部

// build the date format list
	$timeset = array(
		'D m d, Y g:i a', 
		'D d-m-Y, G:i', 
		'M Y, D d, g:i a', 
		'D d M Y, G:i', 
		'd M Y h:i a', 
		'd M Y, G:i',
		'D M d, Y g:i a',
		'D M d, Y G:i',
	);
	$s_time = '<select name="dateformat" onChange="select_dateformat(this.options[this.selectedIndex].value);">';
	$time = time();
	$found = false;
	for ($i=0; $i < count($timeset); $i++)
	{
		$selected = ($user_dateformat == $timeset[$i]) ? ' selected="selected"' : '';
		if ($selected != '') $found = true;
		$s_time .= '<option value="' . $timeset[$i] . '"' . $selected . '>' . create_date($timeset[$i], $time, $user_timezone) . '</option>';
	}
	$selected = ( !$found ) ? ' selected="selected"' : '';
	$s_time .= '<option value=""' . $selected . '>' . $lang['Other'] . '</option></select>';
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

'LOCATION' => $location,
#
#-----[ AFTER, ADD 之後, 加上 ]------------------------------------
#

代碼: 選擇全部

		'S_DATE_FORMAT' => $s_time,
#
#-----[ OPEN 打開 ]------------------------------------------------
#

代碼: 選擇全部

language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE ADD 之前, 加上 ]------------------------------------
#

代碼: 選擇全部

// build the date format list
$lang['Other'] = "其他...";
#
#-----[ OPEN 打開 ]------------------------------------------------
#

代碼: 選擇全部

templates/subSilver/profile_add_body.tpl
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} method="post">
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#

代碼: 選擇全部

<script language="JavaScript" type="text/javascript">
<!--
function select_dateformat(format) 
{
	if (format != '')
	{
		this.document.forms['post'].user_dateformat.value = format;
	}
}
//-->
</script>
<form action="{S_PROFILE_ACTION}" {S_FORM_ENCTYPE} name="post" method="post" >
#
#-----[ FIND 尋找 ]------------------------------------------------
#

代碼: 選擇全部

	<tr> 
	  <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
		<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
	  <td class="row2"> 
		<input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
	  </td>
	</tr>
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#

代碼: 選擇全部

	<tr> 
	  <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
		<span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
	  <td class="row2">{S_DATE_FORMAT} 
			<input type="text" name="user_dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
	  </td>
	</tr>
#
#-----[ SAVE/CLOSE ALL FILES 儲存/關閉所有檔案 ]-------------------
#
# EoM 外掛修正結束