The "To Keep Up" Wiki

A collection of information we find useful

User Tools

Site Tools


dokuwiki_annoyances

This page last changed 2023.10.26 17:52 visits: 6 times today, 10 times yesterday, and 2182 total times

Dokuwiki Annoyances

These are notes for Dokuwiki functions that I find helpful and that I've used throughout this wiki. This information is not intended to replace the plugin and Dokuwiki documentation, as that is the basis for what I've extracted here.

The dropdowns in upper-right don't work

When you select the person-dropdown and others in upper right to right of Search, nothing happens. You expect to see your name, update profile, and admin, but the dropdown doesn't drop down.

This is because a flag defer_js is set.

To undo this:

On the config page, the setting is in Feature Flags, after Advanced and before Network

Inserting Picture Files

If you upload a jpg and can't get it to be inserted, this is why. You need to rename its extent to jpeg, upload, and reference it with .jpeg extent.

So you need to rename something.jpg to be something.jpeg, upload and reference it as something.jpeg: {{something.jpeg?linkonly}} (the 'linkonly' is optional, it links to the picture, click-to-see-it, rather than insert-the-picture-here)

Tables

Including | in Table Entry

Using | in a table
Normally, when you use a | inside a table, it's treated as start-next-column. If you want it to be treated as a regular character (for example: ls | more in Linux, where the | is the pipe command, then surround the | with a double % or surround it with <nowiki>.

|paging file listing | ls -lt %%|%% more | ls -lt <nowiki>|</nowiki> more |
paging file listing ls -lt | more ls -lt | more

Coloring a cell

| @palegreen:cell1 | @:cell2 | @#FF00FF:cell3 |
cell1 cell2 cell3

Coloring text

<color /#ccccff> text-1 </color> <color green> text-2 </color> <color #00FFFF> text-3 </color> <color red/green> text-4 </color>

text-1 text-2 text-3 text-4

Specifying column widths

Put this on the line before the start of the table. This example shows a spec for a 4-column table. 100% means the table will fill the page horizontally. The 14%, 10%, and 1% specify the relative width for those three columns; the - means to use whatever is left in that column (in this case it will be 100-14-10-1 or about 75%).

|< 100% 14% - 10% 1%>|
|Col1|Column 2, the wordy column.|Column 3|4th|
Col1Column 2, the wordy column.Column 34th

This example is for a 3-column table, that's only using 3/4 of page width. The first two columns are smaller and the remainder of the table is taken by the contents of the 3rd column.

|< 75% 10% 13% ->|
|July 4, 2023|watch fireworks|Now is the time for all good people to view fireworks. From a safe distance.|
July 4, 2023watch fireworksNow is the time for all good people to view fireworks. From a safe distance.

Hiding text

The Hidden plugin does the job.

<hidden click to show>the text to be shown or hidden</hidden>

click to show

click to show

the text to be shown or hidden


If you want to control initial state visible/not and change text shown depending on visible/not, use:

<hidden initialState="visible" onVisible="Click to hide" onHidden="click to show ">Text initially visible</hidden>
<hidden initialState="hidden" onVisible="Click to hide" onHidden="click to show ">Text starts off hidden</hidden>

click to show

Click to hide

Text initially visible

click to show

Click to hide

Text starts off hidden


Insert spreadsheet contents to wiki

Use the CSV Plugin. Insert using CSV or reference a CSV file that's in the wiki.

Inline CSV
Save the spreadsheet page as a CSV file, then open the file using text editor, copy all and paste between the csv's:

<csv>
copied,csv,file,goes,here
</csv>

use file in media area
You copy the CSV file to your media area. Maybe it's in namespace abc and file is named mystuff.csv.

<csv abc:mystuff.csv></csv>

Options of note

  • Format first (eg) 2 rows as column headers: hdr_rows=2
  • Format first (eg) 1 column as column header: hdr_cols=1
  • Limit result to 12 rows: maxlines=12
  • Skip first 7 rows in file: offset=7

For example

<csv hdr_rows=1>
abc,def,ghi
jkl,mno,pqr
</csv>
abcdefghi
jklmnopqr

Add photos by using a namespace
{{gallery>:namespace}}

All image files in that namespace will be added to the gallery. Don't forget the colon, :

Options of note

Aligning the pictures

{{gallery> :namespace?options go here}}    (right aligned)
{{gallery>:namespace?options go here }}    (left aligned)
{{gallery> :namespace?options go here }}   (centered)
Option name examplenote
thumbnail size 150×150 lower-case x
lightbox size 1024×768capital X
limit to 10 images =10
sort pix randomly random
sort by mod date modsort
sort by create datedatesort
show filename below thumbnailsshowname
don't crop pix nocropcropping is enabled by default
don't search subdirsnorecursiverecursive search enabled by default

Example: Photos with name, not cropped, reasonable expanded size, landscape thumbnails:

{{gallery>:namespace?showname&nocrop&1024X768&200x150}}

Add text from a file with wrapping

You have text you want to add to a wiki page, and you want to make sure that it's inserted with line wraps.

For example if you have the text

11:29:43 message to everyone:
	Sabine Hossenfelder (born 1976) is a German professional YouTuber, theoretical physicist, science communicator, author, musician, and singer. She is the author of Lost in Math: How beauty leads physics astray, which explores the concept of elegance in fundamental physics and cosmology, and of Existential Physics: A scientist’s guide to life’s biggest questions.

But you want it to look like this, note that you don't have to scroll left and right to read the whole line:

11:29:43 message to everyone:
	Sabine Hossenfelder (born 1976) is a German professional YouTuber, theoretical physicist, science communicator, author, musician, and singer. She is the author of Lost in Math: How beauty leads physics astray, which explores the concept of elegance in fundamental physics and cosmology, and of Existential Physics: A scientist’s guide to life’s biggest questions.

You surround the lines as follows:

<WRAP prewrap>
<code>
11:29:43 message to everyone:
	Sabine Hossenfelder (born 1976) is a German professional YouTuber, theoretical physicist, science communicator, author, musician, and singer. She is the author of Lost in Math: How beauty leads physics astray, which explores the concept of elegance in fundamental physics and cosmology, and of Existential Physics: A scientist’s guide to life’s biggest questions.
</code>
</WRAP>

When the wiki processes this, it'll do the line wrapping on the Sabine line.

dokuwiki_annoyances.txt · Last modified: 2023.10.26 20:52 by Steve Isenberg