Fossil SCM

Assorted improvements to the "Skin Setup" section of forum.wiki.

wyoung 2018-08-29 03:25 trunk
Commit 04d4bde1706ea2464ff171183687392f2d23dbadfc7770cb81b606a895c4b487
1 file changed +45 -5
+45 -5
--- www/forum.wiki
+++ www/forum.wiki
@@ -198,22 +198,36 @@
198198
199199
If you create a new Fossil repository with version 2.7 or newer, its
200200
default skin is already set up correctly for typical forum
201201
configurations.
202202
203
-Those upgrading existing repositories will need to edit the Header part
204
-of their existing Fossil skin in Admin → Skins, adding something
205
-like this to create the navbar link:
203
+If you have an existing repository, you have two choices if you want its
204
+skin to be upgraded to support forums:
205
+
206
+1. Go into Admin → Skins and switch from your current skin to one
207
+ of the stock skins. If you were on a stock skin, just switch away
208
+ from your current one to the actual stock skin, since they will be
209
+ different after the upgrade.
210
+
211
+2. If you have local customization that you do not want to throw away,
212
+ you can use the diff feature of Fossil's skin editor to show how the
213
+ skins differ.
214
+
215
+The remainder of this section summarizes the differences you're expected
216
+to see when taking option #2.
217
+
218
+The first thing is that you'll need to add something like the following
219
+to the Header part of the skin to create the navbar link:
206220
207221
<verbatim>
208
- if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
222
+ if {[anycap 234567] || [anoncap 2] || [anoncap 3]} {
209223
menulink /forum Forum
210224
}
211225
</verbatim>
212226
213227
These rules say that any logged-in user with any forum-related
214
-capability (2-6 inclusive, as of this writing) or an anonymous user with
228
+capability (2-7 inclusive, as of this writing) or an anonymous user with
215229
read or write capability on the forum (2, 3) will see the "Forum" navbar
216230
link, which just takes you to <tt>/forum</tt>.
217231
218232
The exact code you need here varies depending on which skin you're
219233
using. Follow the style you see for the other navbar links.
@@ -242,10 +256,36 @@
242256
}
243257
</verbatim>
244258
245259
That overlays the background with 5% white to lighten it slightly.
246260
261
+Another new forum-related CSS style you might want to reflect into your
262
+existing skin is:
263
+
264
+<verbatim>
265
+ div.forumPosts a:visited {
266
+ color: #6A7F94;
267
+ }
268
+</verbatim>
269
+
270
+This changes the clicked-hyperlink color for the forum post links on the
271
+main `/forum` page only, which allows your browser's history mechanism
272
+to show which threads a user has read and which not. The link color will
273
+change back to the normal link color — indicating "unread" — when a
274
+reply is added to an existing thread because that changes where the link
275
+from the `/forum` page points, taking you to the newest post in the
276
+thread.
277
+
278
+The color given above is suitable for the stock skin.
279
+
280
+Beware that when changing this example, there are some [stringent
281
+restrictions][vpriv] in modern browsers to prevent snoopy web sites from
282
+brute-forcing your browsing history. (See the link for the method, which
283
+explains the restrictions.)
284
+
285
+[vpriv]: https://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/
286
+
247287
248288
<h3 id="search">Enable Forum Search</h3>
249289
250290
One of the underlying assumptions of the forum feature is that you will
251291
want to be able to search the forum archives, so the <tt>/forum</tt>
252292
--- www/forum.wiki
+++ www/forum.wiki
@@ -198,22 +198,36 @@
198
199 If you create a new Fossil repository with version 2.7 or newer, its
200 default skin is already set up correctly for typical forum
201 configurations.
202
203 Those upgrading existing repositories will need to edit the Header part
204 of their existing Fossil skin in Admin &rarr; Skins, adding something
205 like this to create the navbar link:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
207 <verbatim>
208 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
209 menulink /forum Forum
210 }
211 </verbatim>
212
213 These rules say that any logged-in user with any forum-related
214 capability (2-6 inclusive, as of this writing) or an anonymous user with
215 read or write capability on the forum (2, 3) will see the "Forum" navbar
216 link, which just takes you to <tt>/forum</tt>.
217
218 The exact code you need here varies depending on which skin you're
219 using. Follow the style you see for the other navbar links.
@@ -242,10 +256,36 @@
242 }
243 </verbatim>
244
245 That overlays the background with 5% white to lighten it slightly.
246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
248 <h3 id="search">Enable Forum Search</h3>
249
250 One of the underlying assumptions of the forum feature is that you will
251 want to be able to search the forum archives, so the <tt>/forum</tt>
252
--- www/forum.wiki
+++ www/forum.wiki
@@ -198,22 +198,36 @@
198
199 If you create a new Fossil repository with version 2.7 or newer, its
200 default skin is already set up correctly for typical forum
201 configurations.
202
203 If you have an existing repository, you have two choices if you want its
204 skin to be upgraded to support forums:
205
206 1. Go into Admin &rarr; Skins and switch from your current skin to one
207 of the stock skins. If you were on a stock skin, just switch away
208 from your current one to the actual stock skin, since they will be
209 different after the upgrade.
210
211 2. If you have local customization that you do not want to throw away,
212 you can use the diff feature of Fossil's skin editor to show how the
213 skins differ.
214
215 The remainder of this section summarizes the differences you're expected
216 to see when taking option #2.
217
218 The first thing is that you'll need to add something like the following
219 to the Header part of the skin to create the navbar link:
220
221 <verbatim>
222 if {[anycap 234567] || [anoncap 2] || [anoncap 3]} {
223 menulink /forum Forum
224 }
225 </verbatim>
226
227 These rules say that any logged-in user with any forum-related
228 capability (2-7 inclusive, as of this writing) or an anonymous user with
229 read or write capability on the forum (2, 3) will see the "Forum" navbar
230 link, which just takes you to <tt>/forum</tt>.
231
232 The exact code you need here varies depending on which skin you're
233 using. Follow the style you see for the other navbar links.
@@ -242,10 +256,36 @@
256 }
257 </verbatim>
258
259 That overlays the background with 5% white to lighten it slightly.
260
261 Another new forum-related CSS style you might want to reflect into your
262 existing skin is:
263
264 <verbatim>
265 div.forumPosts a:visited {
266 color: #6A7F94;
267 }
268 </verbatim>
269
270 This changes the clicked-hyperlink color for the forum post links on the
271 main `/forum` page only, which allows your browser's history mechanism
272 to show which threads a user has read and which not. The link color will
273 change back to the normal link color — indicating "unread" — when a
274 reply is added to an existing thread because that changes where the link
275 from the `/forum` page points, taking you to the newest post in the
276 thread.
277
278 The color given above is suitable for the stock skin.
279
280 Beware that when changing this example, there are some [stringent
281 restrictions][vpriv] in modern browsers to prevent snoopy web sites from
282 brute-forcing your browsing history. (See the link for the method, which
283 explains the restrictions.)
284
285 [vpriv]: https://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/
286
287
288 <h3 id="search">Enable Forum Search</h3>
289
290 One of the underlying assumptions of the forum feature is that you will
291 want to be able to search the forum archives, so the <tt>/forum</tt>
292

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button