目前TSYS最新版本為2.0beta1,而且網(wǎng)絡(luò )上有不少TSYS加強板,這使用的是官方發(fā)布的TSYS1.1正式版,
1。建好你的頁(yè)面模版。實(shí)際上就是建好一個(gè)靜態(tài)的頁(yè)面,頁(yè)面板塊,形式全是自己定義的,也就可以用TSYS建出形式各樣的頁(yè)面,這也是和其他一些建站系統有所區別的,舉例說(shuō)明:
[code]
<html>
<head>
<style>
a:link {font:9pt/12pt 宋體, MS Song; color:red}
a:visited {font:9pt/12pt 宋體, MS Song; color:#4e4e4e}
</style>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=gb2312">
<title>從此長(cháng)大</title>
</head>
<body bgcolor="white">
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tablePropsWidth2" width="400" colspan="2">
<a href=http://www.31u.net>從此長(cháng)大演示頁(yè)面</a>
</td>
</tr>
</table>
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tablePropsWidth2" width="400" colspan="2"><font id="LID1"
style="COLOR: black; FONT: 9pt/12pt 宋體, MS Song"><hr color="#C0C0C0" noshade>
<p id="LID2">請嘗試以下操作:</p><ul>
<li id="list1">如果您已經(jīng)在地址欄中輸入該網(wǎng)頁(yè)的地址,請確認其拼寫(xiě)正確。<BR>
</li>
<li id="list2">打開(kāi) <script> Homepage(); </script> 主頁(yè),然后查找指向您感興趣信息的鏈接。 </li>
<li id="list3">單擊<a href="javascript:history.back(1)">后退</a>按鈕,嘗試其他鏈接。 </li>
<li ID="list4">單擊搜索,尋找 Internet 上的信息</li>
</ul>
<p><br>
</p>
<h2 id="ietext" style="font:9pt/12pt 宋體, MS Song; color:black">HTTP 404 - 未找到文件<br>
Internet Explorer <BR>
</h2>
</font></td>
</tr>
</table>
</body>
</html>
[/code]
2。在需要更新的地方使用標簽(標簽支持中文),如上例子,我要在“單擊搜索,尋找 Internet 上的信息”這個(gè)地方替換為以后的“國內新聞”這個(gè)欄目~~就可以更改為
[code]
<html>
<head>
<style>
a:link {font:9pt/12pt 宋體, MS Song; color:red}
a:visited {font:9pt/12pt 宋體, MS Song; color:#4e4e4e}
</style>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=gb2312">
<title>從此長(cháng)大</title>
</head>
<body bgcolor="white">
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tablePropsWidth2" width="400" colspan="2">
<a href=http://www.31u.net>從此長(cháng)大演示頁(yè)面</a>
</td>
</tr>
</table>
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tablePropsWidth2" width="400" colspan="2"><font id="LID1"
style="COLOR: black; FONT: 9pt/12pt 宋體, MS Song"><hr color="#C0C0C0" noshade>
<p id="LID2">請嘗試以下操作:</p><ul>
<li id="list1">如果您已經(jīng)在地址欄中輸入該網(wǎng)頁(yè)的地址,請確認其拼寫(xiě)正確。<BR>
</li>
<li id="list2">打開(kāi) <script> Homepage(); </script> 主頁(yè),然后查找指向您感興趣信息的鏈接。 </li>
<li id="list3">單擊<a href="javascript:history.back(1)">后退</a>按鈕,嘗試其他鏈接。 </li>
<li ID="list4">
<!---國內新聞:開(kāi)始--->
<!---國內新聞:結束--->
</li>
</ul>
<p><br>
</p>
<h2 id="ietext" style="font:9pt/12pt 宋體, MS Song; color:black">HTTP 404 - 未找到文件<br>
Internet Explorer <BR>
</h2>
</font></td>
</tr>
</table>
</body>
</html>
[/code]
3。在TSYS后臺添加“國內新聞”這個(gè)頻道,可以看到它有個(gè)ID號,等會(huì )用的上的
4。在Tsys\Manage\UpdateSite中有系統自帶的page01.asp......等4個(gè)用于游戲演示站的更新文件~~我們選擇其中一個(gè)page01.asp,修改其中的代碼為
[code]
<%Option Explicit%>
<!--#include file="../Include/Config.asp" -->
<!--#include file="../Include/Tkl_SYSProedomClass.asp" -->
<!--#include file="../Include/ClassList_Fun.asp" -->
<!--#include file="../Include/CreateFile_Fun.asp" -->
<!--#include file="../Include/Tkl_StringClass.asp" -->
<!--#include file="../Include/Tkl_TemplateClass.asp" -->
<!--#Include File="../Include/OnlineClass.asp" -->
<!--#Include File="../Include/UpdateAdminTime.asp" -->
<%
‘////////////////////////////////////////////////////////////////////
‘//本頁(yè):
‘//生成index.htm首頁(yè)內容
‘////////////////////////////////////////////////////////////////////
Dim SysAdmin
Set SysAdmin=New SYSProedom_Class
If Not CBool(SysAdmin.Logined) Then
Response.Write "<script>top.location=‘login.asp‘</script>"
End If
If Not SysAdmin.UpdatePage Then
Response.Write("<script>alert(""<操作失敗>\n你的權限不足"& Def_SoftCopyright_Script &""");window.history.back();</script>")
Response.End()
End If
Call UpdateAdminTime()
Dim Conn
Set Conn = Server.CreateObject("Adodb.Connection")
Conn.Open ConnStr
Dim StrClass
Set StrClass = New Tkl_StringClass
Select Case Request("Work")
Case "Update01" :
Update01()
UpdateOk()
Case "All" :
Update01()
UpdateOk()
End Select
‘//更新成功提示
Function UpdateOk()
Response.Write("<script>alert(""<操作成功>\n頁(yè)面更新成功"& Def_SoftCopyright_Script &""");window.history.back();</script>")
Response.End()
End Function
‘//國內新聞
Function Update01()
Dim TemplateFilePath
TemplateFilePath=Server.MapPath("../../../index.htm")
‘////////////////////////////////////////////////////////////////////
‘//../../../index.htm
‘//以上路徑,名稱(chēng)一定要設對,否則會(huì )報錯
‘////////////////////////////////////////////////////////////////////
Dim TClass,strHtml
Set TClass=New Tkl_TemplateClass
strHtml=""
Dim Rs,Sql
Sql="Select Top 8 Title,FilePath,AddTime From view_NewsInfo Where Class In (34" & AllChildClass(34) & ") Order By Id DESC"
‘////////////////////////////////////////////////////////////////////
‘//紅色的部分改為剛添加頻道時(shí)系統給的ID號~~
‘//藍色的部分為要顯示的新聞條數~~
‘////////////////////////////////////////////////////////////////////
Set Rs=Conn.ExeCute(Sql)
While Not Rs.Eof
strHtml=strHtml&"·[" & StrClass.FormatMyDate(Rs("AddTime"),"{m}/2is2i2q") & "]<a href=""" & Rs("FilePath") & """ target=""_blank"">" & Rs("Title") & "</a><br>" & vbCrLf
‘////////////////////////////////////////////////////////////////////
‘//以上為自定義輸出方式
‘////////////////////////////////////////////////////////////////////
Rs.MoveNext
Wend
Rs.Close
Set Rs=Nothing
With TClass
.OpenTemplate(TemplateFilePath)
.StartElement="<!---國內新聞:開(kāi)始--->"
.EndElement="<!---國內新聞:結束--->"
‘////////////////////////////////////////////////////////////////////
‘//改為和你使用的標簽一致
‘////////////////////////////////////////////////////////////////////
.Value=strHtml
.ReplaceTemplate()
.Save()
End With
Set TClass=Nothing
End Function
%>
[/code]
4。OK了~~在tsys后臺“資源管理”里添加文章~~因為只是用了1.1正式版演示的后臺,所以在添加文章時(shí)記得選“國內新聞”,然后在“站點(diǎn)更新”“頁(yè)面資源更新”的第一個(gè)里選擇全部更新~~現在去你剛建的網(wǎng)頁(yè)刷新下~~是不是顯示了剛才的文章?~
聯(lián)系客服