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

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


wiki:syntax

Различия

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

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

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
Следующая версия Следующая версия справа и слева
wiki:syntax [2020/12/06 04:17]
62.210.188.222 старая версия восстановлена (2014/12/01 21:51)
wiki:syntax [2020/12/15 09:16]
kot старая версия восстановлена (2020/11/22 11:42)
Строка 78: Строка 78:
 Примечания: Примечания:
  
-  * Ссылки на [[wiki:syntax|существующие статьи]] отображаются иначе, чем ссылки на [[nonexisting|несуществующие]].+  * Ссылки на [[doku>ru:wiki:syntax|существующие статьи]] отображаются иначе, чем ссылки на [[nonexisting|несуществующие]].
   * «Докувики» по умолчанию не использует [[wp>ru:CamelCase|CamelCase]] (ВерблюжийРегистр) для автоматического создания ссылок, но эту возможность можно включить в файле [[config]]. Проверка: если DokuWiki --- ссылка, значит эта возможность включена.   * «Докувики» по умолчанию не использует [[wp>ru:CamelCase|CamelCase]] (ВерблюжийРегистр) для автоматического создания ссылок, но эту возможность можно включить в файле [[config]]. Проверка: если DokuWiki --- ссылка, значит эта возможность включена.
   * Если меняется название раздела, ссылки на него не меняются автоматически. Так что не очень полагайтесь на ссылки на разделы.   * Если меняется название раздела, ссылки на него не меняются автоматически. Так что не очень полагайтесь на ссылки на разделы.
Строка 178: Строка 178:
  
 Узнать, как вставить картинку со ссылкой можно в [[#картинки-ссылки|разделе выше]]. Узнать, как вставить картинку со ссылкой можно в [[#картинки-ссылки|разделе выше]].
 +
 +==== Галерея картинок ====
 +
 +A basic gallery can be added by selecting a [[:namespaces|namespace]] like this:
 +
 +  {{gallery>:namespace}}
 +
 +All image files in the selected namespace will be added to the image gallery. Don't forget the ":" in front of the namespace.
 +
 +Instead of using a whole namespace of images, you can also specify a single image -- this makes more sense when combined with the lightbox mode (see below).
 +
 +  {{gallery>:namespace:someimage.jpg}}
 +
 +The created gallery can be aligned by using white space (defaults to centered):
 +
 +  {{gallery> namespace}} (right aligned)
 +  {{gallery>namespace }} (left aligned)
 +  {{gallery> namespace }} (centered)
 +
 +Instead of a namespace, you can also give an HTTP(s) URL to any [[wp>Media RSS]] or ATOM feed with enclosures (as produced by most photo sharing sites like Flickr). The images will then be pulled from that feed instead:
 +
 +  {{gallery>http://www.23hq.com/rss/schabloni}}
 +
 +Note: since the question mark is used to separate the parameters (see next section) the URL can not contain any question mark. To use such a feed URL with the gallery plugin, just use one of the many short URL services like [[http://bit.ly]].
 +
 +E.g. instead of ''%%http://api.flickr.com/services/feeds/photos_public.gne?id=22019303@N00&lang=en-us&format=rss_200%%'' use a shortened URL like ''%%http://bit.ly/HurZM%%''.
 +
 +Additionally, to have thumbnail creation correctly working you need to set [[config:fetchsize]] big enough to get the remote images downloaded.
  
 ===== Списки ===== ===== Списки =====
Строка 363: Строка 391:
 </file> </file>
  
-===== Вставка HTML и PHP ===== 
- 
-Чистый HTML- или PHP-код можно вставлять в документ с помощью тэгов ''html'' ((''html'' --- для строчного кода; ''HTML'' --- для блочного кода)) и ''php'': 
- 
-<code html> 
-<html> 
-Тут вставлен <font color="red" size="+1">HTML-код</font> 
-</html> 
-</code> 
- 
-<html> 
-Тут вставлен <font color="red" size="+1">HTML-код</font> 
-</html> 
- 
-<code php> 
-<php> 
-echo 'Логотип, сгенерированный PHP:'; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="Логотип PHP!" />'; 
-</php> 
-</code> 
- 
-<php> 
-echo 'Логотип, сгенерированный PHP:'; 
-echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="Логотип PHP!" />'; 
-</php> 
- 
-**Примечание**: по умолчанию вставка HTML и PHP запрещена. Когда она запрещена, код не исполняется, а выводится в исходном виде. 
  
 ===== Управляющие макросы ===== ===== Управляющие макросы =====
Строка 399: Строка 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.) 
 + 
 +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):
  
-~~INFO:syntaxplugins~~+^ 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