Wiki2Go 1.14.4 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/bin/Wiki2Go_make_repository.rb +10 -0
  2. data/bin/Wiki2Go_make_site.rb +1 -1
  3. data/lib/Web2Go/ERB_Interpreter.rb +6 -1
  4. data/lib/Wiki2Go/FileStorage.rb +28 -12
  5. data/lib/Wiki2Go/Install/make_repository.rb +140 -0
  6. data/lib/Wiki2Go/Install/make_site.rb +98 -16
  7. data/lib/Wiki2Go/Install/site/html/admin.css +197 -101
  8. data/lib/Wiki2Go/Install/site/html/rssLogo.png +0 -0
  9. data/lib/Wiki2Go/Install/site/html/valid-html401.png +0 -0
  10. data/lib/Wiki2Go/Install/templates/admin.htm +51 -47
  11. data/lib/Wiki2Go/Install/templates/admin_pages/update_blacklist.txt +17 -0
  12. data/lib/Wiki2Go/Install/templates/edit.htm +9 -28
  13. data/lib/Wiki2Go/Install/templates/full_footer.htm +35 -0
  14. data/lib/Wiki2Go/Install/templates/header.htm +7 -0
  15. data/lib/Wiki2Go/Install/templates/pagelist.htm +2 -24
  16. data/lib/Wiki2Go/Install/templates/simple_footer.htm +17 -0
  17. data/lib/Wiki2Go/Install/templates/versionlist.htm +2 -24
  18. data/lib/Wiki2Go/Install/templates/view.htm +2 -42
  19. data/lib/Wiki2Go/Install/wiki/style.css +65 -67
  20. data/lib/Wiki2Go/Page.rb +14 -2
  21. data/lib/Wiki2Go/PrivateWikiConfig.rb +34 -19
  22. data/lib/Wiki2Go/PublicWikiConfig.rb +59 -41
  23. data/lib/Wiki2Go/ReadWriteWikiConfig.rb +24 -13
  24. data/lib/Wiki2Go/Server.rb +19 -18
  25. data/lib/Wiki2Go/SpamFilter.rb +31 -18
  26. data/lib/Wiki2Go/Web.rb +31 -17
  27. data/lib/Wiki2Go/Wiki2Go.rb +59 -15
  28. data/lib/Wiki2Go/Wiki2GoConfig.rb +10 -4
  29. data/lib/Wiki2Go/Wiki2GoServlet.rb +18 -4
  30. data/lib/Wiki2Go/WikiFormatter.rb +82 -26
  31. metadata +13 -4
  32. data/lib/Wiki2Go/cgi/display.rb +0 -20
@@ -1,135 +1,231 @@
1
1
  body
2
2
  {
3
- margin-top: 10px;
4
- margin-left: 2em ;
5
- margin-right: 2em ;
6
- font-size: 11pt;
3
+ padding-right: 0px;
4
+ padding-left: 0px;
5
+ font-size: 100%;
6
+ padding-bottom: 0px;
7
+ margin: 2em;
7
8
  color: black;
9
+ padding-top: 0px;
8
10
  font-family: verdana, helvetica, arial, sans-serif, sans;
9
11
  background-color: #f1f1f1;
10
12
  text-align: justify;
11
- }
12
-
13
- ul
14
- {
15
- margin-left:0.5em;
16
- padding-top : 0.5em ;
17
- padding-left : 0em ;
18
- padding-right : 0em ;
19
- padding-bottom : 0.5em ;
20
- margin-right:1em
21
- }
22
-
23
- li
24
- {
25
- margin-left:0.5em;
26
- margin-right:1em ;
27
- padding : 0em 0em 0em 0em ;
28
- }
29
-
13
+ }
14
+
15
+ table.container
16
+ {
17
+ border-right: #ccc 1px solid;
18
+ border-top: #ccc 1px solid;
19
+ border-left: #ccc 1px solid;
20
+ border-bottom: #ccc 1px solid;
21
+ border-collapse: collapse;
22
+ background-color: white;
23
+ }
24
+
25
+ table.Header
26
+ {
27
+ border-right: #ccc 1px solid;
28
+ padding-right: 1em;
29
+ border-top: #ccc 1px solid;
30
+ padding-left: 1em;
31
+ padding-bottom: 0.5em;
32
+ margin: 0em;
33
+ border-left: #ccc 1px solid;
34
+ width: 100%;
35
+ padding-top: 0.5em;
36
+ border-bottom: #ccc 1px solid;
37
+ background-color: #ffff99;
38
+ text-align: left;
39
+ }
40
+
41
+ table.Footer
42
+ {
43
+ padding-right: 1em;
44
+ border-top: #ccc thin solid;
45
+ padding-left: 1em;
46
+ background-color: #fafad2;
47
+ }
48
+
49
+ table.Body
50
+ {
51
+ margin: 0px;
52
+ }
53
+
54
+ table.Footer td
55
+ {
56
+ padding-right: 0em;
57
+ padding-left: 0em;
58
+ padding-bottom: 0em;
59
+ padding-top: 0em;
60
+ }
61
+
62
+ td.Menu
63
+ {
64
+ border-right: #ccc 1px solid;
65
+ padding-right: 0.5em;
66
+ border-top: #ccc 1px solid;
67
+ padding-left: 0.5em;
68
+ padding-bottom: 0.5em;
69
+ border-left: #ccc 1px solid;
70
+ padding-top: 0.5em;
71
+ border-bottom: #ccc 1px solid;
72
+ background-color: ghostwhite;
73
+ }
74
+
75
+ td.Menu ul
76
+ {
77
+ padding-right: 0em;
78
+ padding-left: 0em;
79
+ padding-bottom: 0em;
80
+ margin: 0px;
81
+ padding-top: 0em;
82
+ list-style-type: none;
83
+ }
84
+
85
+ td.Menu li
86
+ {
87
+ padding-right: 0.25em;
88
+ display: block;
89
+ padding-left: 0.25em;
90
+ font-weight: bold;
91
+ font-size: 90%;
92
+ padding-bottom: 0.25em;
93
+ margin : 0 0 0 0.25em ;
94
+ padding-top: 0.25em;
95
+ background-color: whitesmoke;
96
+ }
97
+
98
+
99
+ div.menuheading
100
+ {
101
+ padding-right: 0em;
102
+ display: block;
103
+ padding-left: 0.25em;
104
+ font-weight: bold;
105
+ padding-bottom: 0.25em;
106
+ margin: 0.5em 0px 0px;
107
+ padding-top: 0.25em;
108
+ background-color: #ffff99;
109
+ }
110
+
111
+
112
+ td.Content
113
+ {
114
+ padding-right: 1em;
115
+ padding-left: 1em;
116
+ padding-bottom: 1em;
117
+ padding-top: 1em;
118
+ }
119
+
120
+ ul
121
+ {
122
+ padding-right: 0em;
123
+ padding-left: 0em;
124
+ padding-bottom: 0.5em;
125
+ margin-left: 0.5em;
126
+ margin-right: 1em;
127
+ padding-top: 0.5em;
128
+ }
129
+
130
+ li
131
+ {
132
+ padding-right: 0em;
133
+ padding-left: 0em;
134
+ padding-bottom: 0em;
135
+ margin-left: 0.5em;
136
+ margin-right: 1em;
137
+ padding-top: 0em;
138
+ }
139
+
30
140
  h1
31
141
  {
32
142
  font-weight: bold;
33
143
  font-size: 28pt;
144
+ margin: 0em;
34
145
  color: black;
35
- margin : 0em ;
36
- }
37
-
38
- h2,h3,h4,h5,h6
39
- {
40
- color:black
41
- }
42
-
43
- h2,h3.frontpage {
44
- text-align: center ;
45
- }
46
-
47
- table.Header
146
+ }
147
+
148
+ h2, h3, h4, h5, h6
48
149
  {
49
- padding-right: 0.1em;
50
- padding-left: 0.5em;
51
- padding-bottom: 0.1em;
52
- padding-top: 0em;
53
150
  color: black;
54
- background-color: white;
55
- text-align: left;
56
- border-bottom: 1px solid #ccc;
57
- }
58
-
59
- table.Footer
60
- {
61
-
62
- clear: both;
63
- margin: 100px 0 0 0;
64
- padding: 6px;
65
- color: #000;
66
- background: #fff;
67
- border-top: 1px solid #ccc;
68
- }
69
-
70
- hr {
151
+ }
152
+
153
+ h2, h3.frontpage
154
+ {
155
+ text-align: center;
156
+ }
157
+
158
+ hr
159
+ {
71
160
  color: #ccc;
72
- }
73
-
74
- table.Body
161
+ }
162
+
163
+ td[class=search]
75
164
  {
76
- text-align: left;
77
- }
78
-
79
- td[class=search] {
80
165
  text-align: right;
81
- }
82
-
166
+ }
167
+
83
168
  a:link
84
169
  {
170
+ font-weight: bolder;
85
171
  color: #a50a11;
86
- font-weight: bolder ;
87
172
  text-decoration: none;
88
- }
89
-
90
- a:visited {
173
+ }
174
+
175
+ a:visited
176
+ {
177
+ font-weight: normal;
91
178
  color: #a50a11;
92
179
  text-decoration: none;
93
- font-weight: normal ;
94
- }
95
-
96
- a:hover {
180
+ }
181
+
182
+ a:hover
183
+ {
97
184
  text-decoration: underline;
98
- }
99
-
100
- #container {
101
- width: 800px;
102
- margin: 0;
103
- margin-left: auto;
104
- margin-right: auto;
105
- margin-bottom: 40px;
106
- margin-top: 5px;
107
- padding-left: 15px;
108
- padding-right: 15px;
109
- padding-top: 5px;
110
- padding-bottom: 5px;
111
- background: #fff;
112
- border-left: 1px solid #ccc;
113
- border-right: 1px solid #ccc;
114
- border-top: 1px solid #ccc;
115
- border-bottom: 1px solid #ccc;
116
- }
117
-
185
+ }
186
+
118
187
  table.topiclist
119
188
  {
120
189
  width: 100%;
121
- }
122
-
190
+ }
191
+
123
192
  table.topiclist tr.date
124
193
  {
125
194
  font-weight: bold;
126
- }
127
-
195
+ }
196
+
128
197
  table.topiclist tr.odd
129
198
  {
130
199
  background-color: #ffffcc;
131
- }
132
-
200
+ }
201
+
133
202
  table.topiclist tr.even
134
203
  {
135
- }
204
+ }
205
+
206
+ table.wikitable
207
+ {
208
+ border-collapse: collapse;
209
+ }
210
+
211
+ table.wikitable tr
212
+ {
213
+ padding-right: 0.4em;
214
+ padding-left: 0.4em;
215
+ padding-bottom: 0.4em;
216
+ margin: 0em;
217
+ padding-top: 0.4em;
218
+ }
219
+
220
+ table.wikitable td
221
+ {
222
+ border-right: 1px solid;
223
+ padding-right: 0.5em;
224
+ border-top: 1px solid;
225
+ padding-left: 0.5em;
226
+ padding-bottom: 0.5em;
227
+ border-left: 1px solid;
228
+ padding-top: 0.5em;
229
+ border-bottom: 1px solid;
230
+ }
231
+
@@ -1,47 +1,51 @@
1
- <%
2
- require 'Wiki2Go/WikiFormatter'
3
- formatter = Wiki2Go::Formatter.new(@web,@config.storage,@config,false,true)
4
- %>
5
-
6
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
7
- <HTML>
8
- <HEAD>
9
- <BASE href="<%= @web.base_url %>">
10
- <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
11
- <META http-equiv="Pragma" content="no-cache">
12
- <META name="Author" content="Pascal Van Cauwenberghe">
13
- <META name="Keywords" content="ruby,wiki">
14
- <LINK rel="stylesheet" href="<%= formatter.resource_url('admin.css')%>" type="text/css">
15
- <LINK rel="alternate" type="application/rss+xml" title="RSS 2.0 feed" href="<%= formatter.resource_url('rss.xml')%>">
16
- <TITLE><%= @web.current_page %></TITLE>
17
- </HEAD>
18
- <BODY>
19
- <div id="container">
20
- <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
21
- <TR>
22
- <TD>
23
- <TABLE border="0" cellpadding="0" cellspacing="0" width="100%" class="Header">
24
- <TR>
25
- <TD><h1><%= @web.current_page %></h1></TD>
26
- <td align="right"><%= formatter.admin_link("","Home")%></td>
27
- </TR>
28
- </TABLE>
29
- <TABLE border="0" cellpadding="8" cellspacing="0" width="100%" class="Body">
30
- <TR>
31
- <TD class="Menu" valign="top">
32
- <ul>
33
- <li><%= formatter.admin_link("","Home")%></li>
34
- <li><%= formatter.admin_link("regenerate","Regenerate&nbsp;HTML")%></li>
35
- <li><%= formatter.admin_link("passwords","Passwords")%></li>
36
- <li><%= formatter.admin_link("greylist","Greylist")%></li>
37
- </ul>
38
- </TD>
39
- <TD width="100%" valign="top">$BODY$</TD>
40
- </TR>
41
- </TABLE>
42
- </TD>
43
- </TR>
44
- </TABLE>
45
- </div>
46
- </BODY>
47
- </HTML>
1
+ <%
2
+ require 'Wiki2Go/WikiFormatter'
3
+ formatter = Wiki2Go::Formatter.new(@web,@config.storage,@config,false,true)
4
+ title = @web.current_page.empty? ? "Wiki2Go administration" : @web.current_page
5
+ %>
6
+
7
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8
+ <HTML>
9
+ <HEAD>
10
+ <BASE href="<%= @web.base_url %>">
11
+ <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12
+ <META http-equiv="Pragma" content="no-cache">
13
+ <META name="Author" content="Pascal Van Cauwenberghe">
14
+ <META name="Keywords" content="ruby,wiki">
15
+ <LINK rel="stylesheet" href="<%= formatter.resource_url('admin.css')%>" type="text/css">
16
+ <LINK rel="alternate" type="application/rss+xml" title="RSS 2.0 feed" href="<%= formatter.resource_url('rss.xml')%>">
17
+ <TITLE><%= @web.current_page %></TITLE>
18
+ </HEAD>
19
+ <BODY>
20
+ <div id="container">
21
+ <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
22
+ <TR>
23
+ <TD>
24
+ <TABLE border="0" cellpadding="0" cellspacing="0" width="100%" class="Header">
25
+ <TR>
26
+ <TD><h1><%= title %></h1></TD>
27
+ </TR>
28
+ </TABLE>
29
+ <TABLE border="0" cellpadding="8" cellspacing="0" width="100%" class="Body">
30
+ <TR>
31
+ <TD class="Menu" valign="top">
32
+ <div class="menuheading"><%= formatter.admin_link("","Home")%></div>
33
+ <ul>
34
+ <li><%= formatter.admin_link("regenerate","Regenerate&nbsp;HTML")%></li>
35
+ <li><%= formatter.admin_link("passwords","Passwords")%></li>
36
+ </ul>
37
+ <div class="menuheading">SPAM&nbsp;filter</div>
38
+ <ul>
39
+ <li><%= formatter.admin_link("greylist","Greylist")%></li>
40
+ <li><%= formatter.admin_link("update_blacklist","Update&nbsp;Blacklist")%></li>
41
+ </ul>
42
+ </TD>
43
+ <TD width="100%" valign="top">$BODY$</TD>
44
+ </TR>
45
+ </TABLE>
46
+ </TD>
47
+ </TR>
48
+ </TABLE>
49
+ </div>
50
+ </BODY>
51
+ </HTML>
@@ -0,0 +1,17 @@
1
+ <%
2
+ require 'Wiki2Go/SpamFilter'
3
+ require 'cgi'
4
+
5
+ output = ''
6
+ doit = @request.parameter('update',nil)
7
+
8
+ if doit then
9
+ filter = Wiki2Go::SpamFilter.new(@config)
10
+ output = filter.update_chongqed
11
+ end
12
+ %>
13
+ <h3>Download the blacklist from http://blacklist.chongqed.org/index.html</h3>
14
+ <form action="<%= File.join(@web.script_prefix,'admin','update_blacklist')%>" method="get">
15
+ <input type="submit" name="update" value="Download">
16
+ </form>
17
+ <%= CGI::escapeHTML(output).gsub(/\n/,'<br>') %>