Инструменты пользователя

Инструменты сайта


wiki:syntax

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
Следующая версия Следующая версия справа и слева
wiki:syntax [2020/12/12 16:44]
62.210.188.222 старая версия восстановлена (2014/12/02 20:14)
wiki:syntax [2021/02/24 01:01]
62.210.188.222 старая версия восстановлена (2021/01/29 04:49)
Строка 78: Строка 78:
 Примечания: Примечания:
  
-  * Ссылки на [[wiki:syntax|существующие статьи]] отображаются иначе, чем ссылки на [[nonexisting|несуществующие]]. +  * Ссылки на [[doku>ru:wiki:syntax|существующие статьи]] отображаются иначе, чем ссылки на [[nonexisting|несуществующие]]. 
-  * «Докувики» по умолчанию не использует [[wp>ru:CamelCase|CamelCase]] (ВерблюжийРегистр) для автоматического создания ссылок, но эту возможность можно включить в файле [[config]]. Проверка: если DokuWiki --- ссылка, значит эта возможность включена.+  * «Докувики» по умолчанию не использует [[wp>ru:CamelCase|CamelCase]] (ВерблюжийРегистр) для автоматического создания ссылок, но эту возможность можно включить в конфигурации. Проверка: если DokuWiki --- ссылка, значит эта возможность включена.
   * Если меняется название раздела, ссылки на него не меняются автоматически. Так что не очень полагайтесь на ссылки на разделы.   * Если меняется название раздела, ссылки на него не меняются автоматически. Так что не очень полагайтесь на ссылки на разделы.
   * Ссылки на разделы делаются именно на [[#Разбивка на разделы|разделы]].   * Ссылки на разделы делаются именно на [[#Разбивка на разделы|разделы]].
Строка 179: Строка 179:
 Узнать, как вставить картинку со ссылкой можно в [[#картинки-ссылки|разделе выше]]. Узнать, как вставить картинку со ссылкой можно в [[#картинки-ссылки|разделе выше]].
  
-===== Галерея: синтаксис =====+==== Галерея картинок ====
  
 A basic gallery can be added by selecting a [[:namespaces|namespace]] like this: A basic gallery can be added by selecting a [[:namespaces|namespace]] like this:
Строка 206: Строка 206:
  
 Additionally, to have thumbnail creation correctly working you need to set [[config:fetchsize]] big enough to get the remote images downloaded. Additionally, to have thumbnail creation correctly working you need to set [[config:fetchsize]] big enough to get the remote images downloaded.
- 
-==== Parameters ==== 
- 
-A number of parameters can be set by appending them with ''?'' character to the namespace or image. Each parameter needs to be separated with a ''&'' character. Defaults for all parameters can be set in the config manager. If a parameter is enabled by default it can be disabled in the syntax by prefixing it with the syllable ''no''. E.g. the parameter ''cache'' is usually enabled and can be disabled using the keyword ''nocache''. Below is a list of all recognized parameters 
- 
-^ Parameter                      ^ Default         ^ Description    ^ 
-| ''//<number>//x//<number>//''  | ''%%120x120%%'' | Sets the size for thumbnails. Unless the crop option is set, this is a boundary box into which the thumbnail will be fitted, maintaining the correct aspect ratio. | 
-| ''//<number>//X//<number>//''  | ''%%800X600%%'' | Sets the size for the linked images in ''direct'' mode. This is a boundary box into which the image will be fitted, maintaining the correct aspect ratio. Note the uppercase ''X''.| 
-| ''//<number>//''               | ''5''           | The number images per row in the gallery table. If you specify a 0 no table is used instead all thumbnails are added in a sequence. | 
-| ''=//<number>//''              | ''=0''          | Limits the output to the given number of images. ''0'' means all. | 
-| ''+//<number>//''              | ''+0''          | Skip the first number of images. Useful with the option above. | 
-| ''~//<number>//''              | ''~0''          | Add a pagination for the thumbnails displaying the number of given thumbnails per page. ''0'' disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed | 
-| ''cache''                      | enabled         | Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's [[:caching|cache]]. To disable the cache for the page showing the gallery, set ''nocache'' as option. | 
-| ''crop''                       | disabled        | Make thumbnails the exact given thumbnail size big, cropping when needed. | 
-| ''direct''                     | disabled        | Link thumbnails with the bigger sized images not with their detail page | 
-| ''lightbox''                   | disabled        | Show images in a fancy JavaScript modal browsing window, see below for details. Setting this option automatically implies the ''direct'' mode | 
-| ''reverse''                    | disabled        | Reverse the order of the displayed images | 
-| ''recursive''                  | enabled         | Find images in the given namespace and all sub namespaces | 
-| ''random''                     | disabled        | Sort images randomly. You might want to use ''nocache'' as well | 
-| ''modsort''                    | disabled        | Sort images by file modification date | 
-| ''datesort''                   | disabled        | Sort images by EXIF date | 
-| ''titlesort''                  | disabled        | Sort images by EXIF title | 
-| ''showname''                   | disabled        | Show filename below thumbnails | 
-| ''showtitle''                  | disabled        | Show the EXIF tag ''Headline'' as title below thumbnails | 
-| anything containing a ''*''    | jpg,gif,png images | This can be used to filter the list of files found in the given namespace. ''*'' work as simple wildcard symbol. | 
- 
-__Example__: 
- 
-  {{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}} 
- 
-This displays all images beginning with ''image_'' and ending in ''.jpg'' from the namespace ''images:vacation''. Thumbnails are cropped to 80x80 pixels and images will be opened in lightbox mode. 
- 
-__Example__: 
- 
-  {{gallery>?crop&lightbox}} 
- 
-This displays all images in the current namespace using 2 parameters. Parameterlist begins with ''?'' additional ones are concatenated with ''&''. 
  
 ===== Списки ===== ===== Списки =====
Строка 437: Строка 400:
 | %%~~NOCACHE~~%% | «Докувики» помещает всё выводимое в кэш по умолчанию. Иногда это нежелательно (например, когда выше был использован синтаксис %%<php>%%), добавление этого макроса заставит «Докувики» обрабатывать статью при каждом вызове.  | | %%~~NOCACHE~~%% | «Докувики» помещает всё выводимое в кэш по умолчанию. Иногда это нежелательно (например, когда выше был использован синтаксис %%<php>%%), добавление этого макроса заставит «Докувики» обрабатывать статью при каждом вызове.  |
  
-===== Комментирование страниц =====+===== Синтаксические плагины =====
  
 +Синтаксис «Докувики» может быть расширен за счёт [[doku>ru:plugins|плагинов]]. Как их устанавливать и использовать --- описывается на страницах плагинов. Следующие плагины доступны в инсталляции «Докувики» на этом сайте:
  
-По умолчанию включено комментирование всех вики-страниц. Если это не так, можно включить комментирование добавив на страницу инструкцию ''%%~~DISCUSSION~~%%''. Для выключения возможности комментирования используйте ''%%~~DISCUSSION:off~~%%''. Если вы не хотите скрывать существующие комментарии, однако хотите запретить добавление новых, используйте ''%%~~DISCUSSION:closed~~%%''.+~~INFO:syntaxplugins~~
  
-  ~~DISCUSSION~~ +===== NSPages =====
-  ~~DISCUSSION:off~~ +
-  ~~DISCUSSION:closed~~+
  
-Собственный заголовок секции комментирования может быть указан после разделителя %%|%%. +**NSPages** -- плагин для создания удобного сортированного списка страниц в [[doku>ru:namespaces|пространстве имён]]. Основное использование с помощью соответствующей кнопки редактора, подробности синтаксиса либо [[https://www.dokuwiki.org/plugin:nspages|здесь]] (англ), либо ниже по тексту, опять же на английском.
-  ~~DISCUSSION|Мой собственный заголовок~~ +
-  ~~DISCUSSION:closed|Мой собственный заголовок~~+
  
-===== Синтаксические плагины =====+This plugin nicely displays a table of content of the pages -and optionally the subnamespaces- of a given (sub)namespace.
  
-Синтаксис «Докувики» может быть расширен за счёт [[doku>ru:plugins|плагинов]]Как их устанавливать и использовать --- описывается на страницах плагиновСледующие плагины доступны в инсталляции «Докувики» на этом сайте:+Using this plugin is easy: just write 
 +  <nspages> 
 +and see the result. (You may also use the button {{http://wiki.scooterclub.by/lib/images/toolbar/../../plugins/nspages/images/tb_nspages.png}} from the toolbar.)
  
-~~INFO:syntaxplugins~~+The general syntax is 
 +  <nspages path_to_a_namespace -option1 -option2 ...> 
 +where: 
 +  *path_to_a_namespace represents the path to the wanted namespace. It can be an absolute (ex: namespace1:subnamespace) or a relative path (ex: .:subnamespace). If no path is specified, the current namespace is selected. 
 +  *-option may be one of the following (it is possible to specify several options): 
 + 
 +^ Common options ^^ 
 +|  <code>-subns</code>  |displays the subnamespaces of the selected namespace (and provide links to their main page) | 
 +|  <code>-nopages</code>  |do not list the pages of the selected namespace (of course this option is useful only if you use -subns) | 
 +|  <code>-exclude:nameOfPage</code>  |won't include the page nameOfPage. This option may be use several times in order to exclude several pages | 
 +|  <code>-exclude:subNs:</code>  |won't include the subnamespace subNs. This option may also be used more than once | 
 +|  <code>-exclude</code>  |won't include the current page | 
 +|  <code>-h1</code>  |will display the first h1 title found. If a page doesn't contain such a title, the name of the page  is used instead | 
 +|  <code>-textPages="some text"</code>  |//some text// will be displayed instead of the default text, to introduce the pages list | 
 +|  <code>-textNS="some text"</code>  |//some text// will be displayed instead of the default text, to introduce the namespaces list | 
 +|  <code>-title</code>  | alias of -h1 | 
 +|  <code>-simpleList</code>  | display the list on a single column | 
 +|  <code>-numberedList</code>  | display the list on a single column, as an ordered list | 
 +|  <code>-simpleLine</code>  | display the list on a single line (incompatible with -simpleList) | 
 +|  <code>-simpleLineBreak</code>  | display the list on a single column, separated only by line breaks (incompatible with the previous flags) | 
 +|  <code>-nbCol=3</code>  | Change the number of columns to use (default is 3)  | 
 +|  <code>-sortId</code>  | Sort the pages according to their id, even if -title is used | 
 + 
 +^ Less common options ^^ 
 +|  <code>-reverse</code>  | Sort the pages in reverse order | 
 +|  <code>-naturalOrder</code>  | Sort the pages in [[http://stackoverflow.com/q/5167928/1796345|natural order]] | 
 +|  <code>-pagesInNs</code>  | The pages will appear among the namespaces | 
 +|  <code>-r</code>  | recurse : display elements of the subnamespaces. You may use just "-r" to check every subnamespace, or e.g. "-r=3" to have a depth limit to 3 levels 
 +|  <code>-exclude:[page1 subNs: page2]</code>  |an easier syntax to exclude several pages/subnamespaces| 
 +|  <code>-pregPagesOn 
 +-pregPagesOff 
 +-pregNSOn 
 +-pregNSOff</code>  | Enable the use of regex to select the documents that should be displayed. Eg: -pregPagesOn="/doku/i" will display only pages which contains "doku" in their id.\\ Several options may be used, and each of them may be used several times. | 
 +|  <code>-anchorName=myName</code>  | Add anchors on each title-letters, to let link directly to them. Anchors will look like, e.g. for the letter A: nspages_myName_A | 
 +|  <code>-actualTitle</code>  |print an actual html title (not just a bold and underlined text) | 
 +|  <code>-actualTitle=n</code>  |print an actual html title <hn> | 
 +|  <code>-idAndTitle</code>  |Use the format "id of the item - title of the item" | 
 +|  <code>-nbItemsMax=n</code>  |Display at most n pages or subnamespaces 
 + 
 +  ex: <nspages path_to_a_namespace -exclude>  or <nspages -subns -nopages> will work.
  
/home/motowiki.by/www/data/pages/wiki/syntax.txt · Последнее изменение: 2021/12/20 18:25 — kot