Fossil

Check-in [04d4bde1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Assorted improvements to the "Skin Setup" section of forum.wiki.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 04d4bde1706ea2464ff171183687392f2d23dbadfc7770cb81b606a895c4b487
User & Date: wyoung 2018-08-29 03:25:07.065
Context
2018-08-29
03:31
Fixed some Markdown-isms just checked into www/forum.wiki. ... (check-in: 34a3bc12 user: wyoung tags: trunk)
03:25
Assorted improvements to the "Skin Setup" section of forum.wiki. ... (check-in: 04d4bde1 user: wyoung tags: trunk)
03:13
Clarity fixes to the Email Alerts capability paragraph of forum.wiki ... (check-in: d6e5754d user: wyoung tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to www/forum.wiki.
196
197
198
199
200
201
202


203




204








205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

<h3 id="skin">Skin Setup</h3>

If you create a new Fossil repository with version 2.7 or newer, its
default skin is already set up correctly for typical forum
configurations.



Those upgrading existing repositories will need to edit the Header part




of their existing Fossil skin in Admin &rarr; Skins, adding something








like this to create the navbar link:

<verbatim>
  if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
    menulink /forum Forum
  }
</verbatim>

These rules say that any logged-in user with any forum-related
capability (2-6 inclusive, as of this writing) or an anonymous user with
read or write capability on the forum (2, 3) will see the "Forum" navbar
link, which just takes you to <tt>/forum</tt>.

The exact code you need here varies depending on which skin you're
using. Follow the style you see for the other navbar links.

The new forum feature also brings many new CSS styles to the table. If







>
>
|
>
>
>
>
|
>
>
>
>
>
>
>
>
|


|





|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

<h3 id="skin">Skin Setup</h3>

If you create a new Fossil repository with version 2.7 or newer, its
default skin is already set up correctly for typical forum
configurations.

If you have an existing repository, you have two choices if you want its
skin to be upgraded to support forums:

1.  Go into Admin &rarr; Skins and switch from your current skin to one
    of the stock skins.  If you were on a stock skin, just switch away
    from your current one to the actual stock skin, since they will be
    different after the upgrade.

2.  If you have local customization that you do not want to throw away,
    you can use the diff feature of Fossil's skin editor to show how the
    skins differ.

The remainder of this section summarizes the differences you're expected
to see when taking option #2.

The first thing is that you'll need to add something like the following
to the Header part of the skin to create the navbar link:

<verbatim>
  if {[anycap 234567] || [anoncap 2] || [anoncap 3]} {
    menulink /forum Forum
  }
</verbatim>

These rules say that any logged-in user with any forum-related
capability (2-7 inclusive, as of this writing) or an anonymous user with
read or write capability on the forum (2, 3) will see the "Forum" navbar
link, which just takes you to <tt>/forum</tt>.

The exact code you need here varies depending on which skin you're
using. Follow the style you see for the other navbar links.

The new forum feature also brings many new CSS styles to the table. If
240
241
242
243
244
245
246


























247
248
249
250
251
252
253
  div.forumSel {
    background-color: rgba(255, 255, 255, 0.05);
  }
</verbatim>

That overlays the background with 5% white to lighten it slightly.




























<h3 id="search">Enable Forum Search</h3>

One of the underlying assumptions of the forum feature is that you will
want to be able to search the forum archives, so the <tt>/forum</tt>
page always includes a search box. Since that depends on search being
enabled on the Fossil repository, Fossil warns that search is disabled







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
  div.forumSel {
    background-color: rgba(255, 255, 255, 0.05);
  }
</verbatim>

That overlays the background with 5% white to lighten it slightly.

Another new forum-related CSS style you might want to reflect into your
existing skin is:

<verbatim>
  div.forumPosts a:visited {
    color: #6A7F94;
  }
</verbatim>

This changes the clicked-hyperlink color for the forum post links on the
main `/forum` page only, which allows your browser's history mechanism
to show which threads a user has read and which not. The link color will
change back to the normal link color — indicating "unread" — when a
reply is added to an existing thread because that changes where the link
from the `/forum` page points, taking you to the newest post in the
thread.

The color given above is suitable for the stock skin.

Beware that when changing this example, there are some [stringent
restrictions][vpriv] in modern browsers to prevent snoopy web sites from
brute-forcing your browsing history. (See the link for the method, which
explains the restrictions.)

[vpriv]: https://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/


<h3 id="search">Enable Forum Search</h3>

One of the underlying assumptions of the forum feature is that you will
want to be able to search the forum archives, so the <tt>/forum</tt>
page always includes a search box. Since that depends on search being
enabled on the Fossil repository, Fossil warns that search is disabled