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

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

  • Показать исходный текст
  • История страницы
  • Ссылки сюда
  • Оставить на чай
  • Экспорт в PDF
  • Наверх

  • wiki:plugin:blog

    Blog для «ДокуВики»

    Плагин блога делает блоги в вашей вики легко возможными. Компонент блога показывает последние записи (страницы) из пространства имен в обратном хронологическом порядке. В этой новой версии дата создания является ключом сортировки — больше не дата последней не незначительной модификации, как в предыдущих версиях. Компонент архива перечисляет все записи, которые были написаны (созданы) в указанном месяце.

    Совместимость

    Сообщайте об ошибках или просьбах о новых функциях в системе отслеживания ошибок

    Монтаж

    Используйте менеджер плагинов для установки или…

    1. скачать zip-файл
    2. распаковать его в<dokuwiki>/lib/plugins/
    3. войдите как администратор и измените плагин в менеджере конфигурации

    Installation

    Download plugin-blog.tgz
    BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
    BlogSuite BundleHub :!: The Bundle Hub is currently out of date and not updated any more, please install the plugins individually :!:
    FIXME Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features.
    Tips If you intend to use this plugin be sure to take a look at the blogging tips page

    Syntax

    Blog

    {{blog>[namespace]?[number]&[flags]}}
    [namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
    [number] number of entries to show per page optional; default is 5
    [flags] flags are delimited by &
    all Include plugin flags are supported optional
    Form placement: topform/bottomform/noform optional, default is topform
    Custom new-entry form title: newentrytitle=Custom title optional, can also be set as a configuration option
    Hide paging controls: nopagingcontrols optional

    This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

    Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.

    Archive

    {{archive>[namespace]?[month]&[flags]&author=[username]}}
    [namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
    [month] the month for the archive list in YYYY-MM format; * for all pages required
    [flags] pagelist flags delimited by &, see flags optional
    [username] username of an author optional

    Shows a table with all pages of the given namespace that were created in the specified month.

    {{autoarchive>[namespace]}}

    Creates an automatic archive.

    Configuration and Settings

    The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

    namespace The default namespace which is used if no namespace was given in the syntax
    formposition You can choose to display the new entry form either above or below the blog entries
    newentrytitle Set a custom title for all new entry forms. This can also be set on individual blog forms.
    dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d
    sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
    sortorder Sort the blog entries ascending/descending
    excluded_pages Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings.
    To exclude both start and rightsidebar directly below :blog use
    !(^|:)blog:(start|rightsidebar)$!
    showhistogram Display a histogram in normal archive mode (not for autoarchive)
    max_months Maximum number of months to show in the histogram
    histogram_height Height of the histogram (in pixels)

    Changes

    • 2013-10-20: Translation updates, fix cache handling for empty blog listings
    • 2013-03-27: Better cache handling for the archive syntax
      • the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
      • the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the ~~NOCACHE~~ macro can be used if this is needed.

    Development

    Change Log

    Bugs / Feature Requests

    Please report bugs or feature requests at the Bug tracker.

    FAQ

    Please also have a look at the blogging tips page!

    My dates are shown wrong. What can I do?

    Make sure you run the latest version of all required plugins and DokuWiki.

    Is it possible to change the way the date is displayed?

    Yes, the plugin uses the dformat option to format the date.

    How can I alter the date of a blog post?

    You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.

    Is it possible to show table of contents?

    The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.

    The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.

    Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?

    I think I solved myself. In the blog mark, use the following flags

    {{blog>?5&firstseconly&readmore}}

    This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link. If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines

    the excluded_pages does not work

    In the blog mark ,use the following flags

    {{blog>*?5&!(^|:)index$!}}
    or
    {{blog>*?5&excluded_pages=!(^|:)index$!}}

    all above flags does not work, the index pages in sub namespace is still included .

    This is global configuration, you should configure it in Configuration Manager. — Siyuan Liu 2023-08-17

    Discussion

    Please report bugs or feature requests at the Bug tracker.

    Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?

    Обновление

    Для обновления удалите исходную папку lib/plugins/displaywikipage и установите новую версию, как указано выше.

    Файл для загрузки

    Лицензия

    Это не обязательно, но, пожалуйста, рассмотрите возможность ссылки на эту страницу с вашего сайта, если вам нравится этот продукт.

    Только авторизованные участники могут оставлять комментарии.
    wiki/plugin/blog.txt · Последнее изменение: 2024/08/26 08:40 — 127.0.0.1