source: tcl/turl-defs.tcl @ 1

Last change on this file since 1 was 1, checked in by mek, 8 years ago

initial import

File size: 3.0 KB
Line 
1#Turl, A tinyurl.com clone
2#Copyright (C) 2003  Mat Kovach (mkovach@alal.com)
3#
4#This program is free software; you can redistribute it and/or modify
5#it under the terms of the GNU General Public License as published by
6#the Free Software Foundation; either version 2 of the License, or
7#(at your option) any later version.
8#
9#This program is distributed in the hope that it will be useful,
10#but WITHOUT ANY WARRANTY; without even the implied warranty of
11#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12#GNU General Public License for more details.
13#
14#You should have received a copy of the GNU General Public License
15#along with this program; if not, write to the Free Software
16#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18ns_log Notice "Loading turl definitions"
19
20proc turl_system_url {} {
21    # The url of the system
22    return "URL"
23}
24
25proc turl_system_name {} {
26    # Name of the system
27    return "SYSTEM TITLE"
28}
29
30proc turl_system_owner {} {
31    # This is where all the email will go
32    return "EMAILADDRESS"
33}
34
35proc turl_page_ext {} {
36    # Valid page extentions to search for if none are give
37    # Order is important as this is first come, frst to get servred
38    return [list adp html htm]
39}
40
41proc turl_footer {} {
42    # How do you want the footer to look like.  I like to included
43    # a link to mail somebody
44    return "<p>
45<hr>
46<a href=\"mailto:[turl_system_owner]\">
47[turl_system_owner]
48</a>
49</body>
50</html>"
51}
52
53proc turl_url {} {
54    # what is the URL for this system
55    # This is used for the request processing.  If your system
56    # is http://domain/turl/ then use /turl/ here.
57    return "/"
58}
59
60proc turl_url_offset {} {
61    # number of additional urls
62    # http://domain/turl/ would give an offset of 1
63    return 0
64}
65
66proc turl_header { {title ""} } {
67    # Top of the page stuff
68    return "<html><head>
69<title>$title</title>
70</head>
71<link rel=stylesheet type=\"text/css\" href=\"/turl-css.adp\">\n
72<body>
73<h2>$title</h2>
74<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
75  <tr>
76    <td align=\"right\">
77      <table width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\">
78        <tr>
79          <td bgcolor=\"#999999\" class=\"stripes\">&nbsp;</td>
80        </tr>
81        <tr>
82          <td bgcolor=\"#0085c0\" class=\"stripes\">&nbsp;</td>
83        </tr>
84      </table></td>
85    <td colspan=\"2\" width=\"80%\">
86      <table width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\">
87        <tr>
88          <td bgcolor=\"#666666\" width=\"100%\" class=\"stripes\">&nbsp; &nbsp;</td>
89        </tr>
90        <tr>
91          <td bgcolor=\"#0085c0\" width=\"100%\" class=\"stripes\">&nbsp;</td>
92        </tr>
93      </table>
94    </td>
95  </tr>
96</table>
97<br>
98<a href=\"/index.adp\">Home</a> : <a href=\"/about.adp\">About</a>
99<hr>"
100}
101
102proc disable_days {} {
103    # number of non working days to disable a redirection
104    return 10
105}
106
107proc max_encode_length {} {
108   # length of your turl id
109   return 5
110}
111
112proc doc_root {} {
113    # where is the root for the webpages
114    return "/web/turl/www"
115}
Note: See TracBrowser for help on using the repository browser.