zoukankan      html  css  js  c++  java
  • 手把手教你TSYS建站

          最近好多人对tsys很感兴趣,其实大家不知道的是tsys的asp版本早就已经停止开发了,为了不想让如此优秀的东西被埋没所以我在tsys的asp版本的基础上使用PHP重新开发了一个功能更强的cms,名字是blackhand,这个版本保留了tsys所有的优点,另外屏蔽了tsys的缺点,还增加了诸多很棒的功能,大家如果感兴趣可以看一下.

         另外,因为tsys的asp版本就要求站长会编写asp脚本,同样的,为了灵活性所以呢这个PHP版本就要求站长会写PHP脚本,只有如此才能更灵活,才能用它去做别的cms不敢涉及或永远做不到的功能.这才是tsys的真谛!
    PHP版本的tsys浏览页面:http://hi.baidu.com/see7di/blog/item/4daf1955bd555bc8b745ae93.html
    PHP版本的tsys下载地址:http://download.csdn.net/source/3248406


          TSYS作为开源、免费软件,但是官方却一直没有一个比较正式的教程提供给刚接触的新手~~网络上有网友也就是寒蝉(在落伍吧)制作了一个入门的电子书籍给新接触的朋友,今天我写的这个帖子是那种日记式的教学,相信可以很快的帮助新接触TSYS的朋友上手

          TSYS应用要求使用者对HTML有一定的了解~~目前TSYS最新版本为2.0beta1,而且网络上有不少TSYS加强板,这使用的是官方发布的TSYS1.1正式版,

    1。建好你的页面模版。实际上就是建好一个静态的页面,页面板块,形式全是自己定义的,也就可以用TSYS建出形式各样的页面,这也是和其他一些建站系统有所区别的,建议添加上必要的内容,举例说明:
    <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>从此长大</title>
    </head>
    <body bgcolor="white">
    <table width="400" cellpadding="3" cellspacing="5">
       <tr>
    <td width="400" colspan="2">
    <a href=http://www.31u.net>从此长大演示页面</a>
    </td>
       </tr>
    </table>
    <table width="400" cellpadding="3" cellspacing="5">
       <tr>
    <td 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">如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。<BR>
       </li>
       <li id="list2">打开主页,然后查找指向您感兴趣信息的链接。 </li>
       <li id="list3">单击后退按钮,尝试其他链接。 </li>
       <li ID="list4">单击搜索,寻找 Internet 上的信息</li>
    </ul>
    </td>
       </tr>
    </table>
    </body>
    </html>



    2。在需要更新的地方使用标签(标签支持中文),如上例子,我要在“单击搜索,寻找 Internet 上的信息”这个地方替换为以后的“国内新闻”这个栏目~~就可以更改为
    <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>从此长大</title>
    </head>
    <body bgcolor="white">
    <table width="400" cellpadding="3" cellspacing="5">
       <tr>
    <td width="400" colspan="2">
    <a href=http://www.31u.net>从此长大演示页面</a>
    </td>
       </tr>
    </table>
    <table width="400" cellpadding="3" cellspacing="5">
       <tr>
    <!---国内新闻:开始--->
    <td 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">如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。<BR>
       </li>
       <li id="list2">打开主页,然后查找指向您感兴趣信息的链接。 </li>
       <li id="list3">单击后退按钮,尝试其他链接。 </li>
       <li ID="list4">单击搜索,寻找 Internet 上的信息</li>
    </ul>
    </td>
    <!---国内新闻:结束--->
       </tr>
    </table>
    </body>
    </html>

    3。在TSYS后台添加“国内新闻”这个频道,可以看到它有个ID号,等会用的上的

    4。在Tsys\Manage\UpdateSite中有系统自带的page01.asp......等4个用于游戏演示站的更新文件~~我们选择其中一个page01.asp,修改其中的代码为

    <%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" -->
    <%
    '////////////////////////////////////////////////////////////////////
    '//本页:
    '//生成index.htm首页内容
    '////////////////////////////////////////////////////////////////////

    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页面更新成功"& Def_SoftCopyright_Script &""");window.history.back();</script>")
    Response.End()
    End Function

    '//国内新闻
    Function Update01()
    Dim TemplateFilePath
           TemplateFilePath=Server.MapPath("../../../index.htm")
    '////////////////////////////////////////////////////////////////////
    '//../../../index.htm
    '//以上路径,名称一定要设对,否则会报错
    '////////////////////////////////////////////////////////////////////

    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"
    '////////////////////////////////////////////////////////////////////
    '//红色的部分改为刚添加频道时系统给的ID号~~
    '//蓝色的部分为要显示的新闻条数~~
    '////////////////////////////////////////////////////////////////////


    Set Rs=Conn.ExeCute(Sql)
    While Not Rs.Eof
           strHtml=strHtml&"·[" & StrClass.FormatMyDate(Rs("AddTime"),"{m}/{d}") & "]<a href=http://www.51one.net/create/other/""" & Rs("FilePath") & """ target=""_blank"">" & Rs("Title") & "</a><br>" & vbCrLf
    '////////////////////////////////////////////////////////////////////
    '//以上为自定义输出方式
    '////////////////////////////////////////////////////////////////////
           Rs.MoveNext
    Wend
    Rs.Close
    Set Rs=Nothing

    With TClass
           .OpenTemplate(TemplateFilePath)
           .StartElement="<!---国内新闻:开始--->"
           .EndElement="<!---国内新闻:结束--->"
    '////////////////////////////////////////////////////////////////////
    '//改为和你使用的标签一致
    '////////////////////////////////////////////////////////////////////

           .Value=strHtml
           .ReplaceTemplate()
           .Save()
    End With
    Set TClass=Nothing
    End Function
    %>


    4。OK了~~在tsys后台“资源管理”里添加文章~~因为只是用了1.1正式版演示的后台,所以在添加文章时记得选“国内新闻”,然后在“站点更新”“页面资源更新”的第一个里选择全部更新~~现在去你刚建的网页刷新下~~是不是显示了刚才的文章?~
  • 相关阅读:
    数据库——游标
    避免全表扫描的sql优化
    聚合索引(clustered index) / 非聚合索引(nonclustered index)
    [摘抄]Python内置的字符串处理函数整理
    Web 安全渗透方面的学习路线?
    [转载]从关系型数据库到非关系型数据库
    [转载]shell脚本
    关于工具面试题
    ES6之promise
    关于vue-router总结
  • 原文地址:https://www.cnblogs.com/see7di/p/2239995.html
Copyright © 2011-2022 走看看