Teach you how to build a website in TSYS

Source: Internet
Author: User

Recently, many people are very interested in tsys. What you don't know is that tsys's asp version has already stopped development, I used PHP to re-develop a more powerful cms Based on the asp version of tsys. The name is blackhand, this version retains all the advantages of tsys, shields the disadvantages of tsys, and adds many great functions. If you are interested, you can take a look.

In addition, the asp version of tsys requires the webmaster to write asp scripts. Similarly, for flexibility, this PHP version requires the webmaster to write PHP scripts. Only in this way can the webmaster be more flexible, it can be used for other features that cms does not dare to involve or never can do. this is the true meaning of tsys!
PHP tsys browser page: Http://hi.baidu.com/see7di/blog/item/4daf1955bd555bc8b745ae93.html
PHP tsys: Http://download.csdn.net/source/3248406


As open-source and free software, TSYS has never provided a formal tutorial to new beginners ~~ Some netizens on the Internet, that is, cool (out of date), have created an entry-level e-book for new contacts. Today I wrote this post as a type of notebook-based teaching, I believe it will soon help new TSYS friends get started.


The TSYS application requires users to have some knowledge of HTML ~~ Currently, the latest TSYS version is 2.0beta1, and many TSYS reinforcement boards are available on the network. This is the official TSYS1.1 official version,

1. Create your page template. In fact, it is to build a static page. The page sections are all defined by themselves, so you can use TSYS to create various forms of pages, which is also different from other website construction systems, we recommend that you add the necessary content, for example:
<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> grow up now </title>
</Head>
<Body bgcolor = "white">
<Table width = "400" cellpadding = "3" cellspacing = "5">
<Tr>
& Lt; td width = "400" colspan = "2" & gt;
<A href = http://www.31u.net> grown up demo page </a>
</Td>
</Tr>
</Table>
<Table width = "400" cellpadding = "3" cellspacing = "5">
<Tr>
& Lt; td width = "400" colspan = "2" & gt;
<Font id = "LID1"
Style = "COLOR: black; FONT: 9pt/12pt, MS Song"> <P id = "LID2"> perform the following operations: </p> <ul>
<Li id = "list1"> if you have entered the address of the webpage in the address bar, make sure it is correctly spelled. <BR>
</Li>
<Li id = "list2"> open the home page and find the link that points to the information you are interested in. </Li>
<Li id = "list3"> click the back button to try other links. </Li>
<Li ID = "list4"> click search to find information on the Internet </li>
</Ul>
</Td>
</Tr>
</Table>
</Body>
</Html>

2. Use tags where updates are needed (tags support Chinese characters). In the preceding example, click search, find information on the Internet, replace it with the "domestic news" topic ~~ You can change
<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> grow up now </title>
</Head>
<Body bgcolor = "white">
<Table width = "400" cellpadding = "3" cellspacing = "5">
<Tr>
& Lt; td width = "400" colspan = "2" & gt;
<A href = http://www.31u.net> grown up demo page </a>
</Td>
</Tr>
</Table>
<Table width = "400" cellpadding = "3" cellspacing = "5">
<Tr>
<! --- Domestic news: Start --->
& Lt; td width = "400" colspan = "2" & gt;
<Font id = "LID1"
Style = "COLOR: black; FONT: 9pt/12pt, MS Song"> <P id = "LID2"> perform the following operations: </p> <ul>
<Li id = "list1"> if you have entered the address of the webpage in the address bar, make sure it is correctly spelled. <BR>
</Li>
<Li id = "list2"> open the home page and find the link that points to the information you are interested in. </Li>
<Li id = "list3"> click the back button to try other links. </Li>
<Li ID = "list4"> click search to find information on the Internet </li>
</Ul>
</Td>
<! --- Domestic news: end --->
</Tr>
</Table>
</Body>
</Html>

3. Add the "domestic news" channel in the TSYS background and you can see that it has an ID number.

4. In Tsys \ Manage \ UpdateSite, there are four built-in page01.asp ...... update files for the game demonstration site ~~ Select one page01.asp and modify the 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" -->
<%
'/////////////////////////////////////// /////////////////////////////
'// This page:
'// Generate the index.htm homepage content
'/////////////////////////////////////// /////////////////////////////

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 (" "<operation failed> \ n your permissions are insufficient" & 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

'// Prompt for successful update
Function UpdateOk ()
Response. write ("<script> alert (" "<operation succeeded> \ n page updated successfully" & Def_SoftCopyright_Script & "); window. history. back (); </script> ")
Response. End ()
End Function

'// Domestic news
Function Update01 ()
Dim TemplateFilePath
TemplateFilePath = Server. MapPath (".../../index.htm ")
'/////////////////////////////////////// /////////////////////////////
'// ../Index.htm
'// The above path must be set to a correct name; otherwise, an error will be reported.
'/////////////////////////////////////// /////////////////////////////
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"
'/////////////////////////////////////// /////////////////////////////
'// The red part is changed to the ID number assigned by the system when the channel is added ~~
'// The blue part indicates the number of news records to be displayed ~~
'/////////////////////////////////////// /////////////////////////////

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
'/////////////////////////////////////// /////////////////////////////
'// The above is the custom output mode
'/////////////////////////////////////// /////////////////////////////
Rs. MoveNext
Wend
Rs. Close
Set Rs = Nothing

With TClass
. OpenTemplate (TemplateFilePath)
. StartElement = "<! --- Domestic news: Start --->"
. EndElement = "<! --- Domestic news: end --->"
'/////////////////////////////////////// /////////////////////////////
'// Change to the same as the tag you are using
'/////////////////////////////////////// /////////////////////////////
. Value = strHtml
. ReplaceTemplate ()
. Save ()
End
Set TClass = Nothing
End Function
%>

4. OK ~~ Add an article in "Resource Management" in the tsys background ~~ Because only the background of the official version 1.1 demonstration is used, remember to select "domestic news" when adding an article ", select all updates in the first update of "Site update" and "Page resource Update ~~ Go to the page you just created and refresh it ~~ Does it show the article just now ?~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.