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

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


wiki:plugin:repository:manual_repository_my_edit

Репозиторий расширений

Руководство по правке плагина репозитория

lib/plugin/pluginrepo/helper/repository.php

repository.php
  1. /** строка 867
  2.   * render internallink to plugin/template, templates identified by having namespace
  3.   *
  4.   * @param Doku_Renderer_xhtml $R
  5.   * @param string $plugin pluginname
  6.   * @param string|null $title Title of plugin link
  7.   * @return string rendered internallink
  8.   */
  9. public function pluginlink(Doku_Renderer_xhtml $R, string $plugin, string $title = null): string
  10. {
  11. if (!getNS($plugin)) {
  12. // return $R->internallink(':plugin:' . $plugin, $title, null, true);
  13. // чтобы работала ссылка из папки второго уровня :wiki:plugin
  14. return $R->internallink(':wiki:plugin:' . $plugin, $title, null, true);
  15. } else {
  16. if (!$title) {
  17. $title = noNS($plugin);
  18. }
  19. // в эту строку добавили ":wiki" return $R->internallink(':' . $plugin, $title, null, true);
  20. // чтобы работала ссылка из папки второго уровня :wiki:template
  21. return $R->internallink(':wiki:' . $plugin, $title, null, true);
  22. }
  23. }

lib/plugin/pluginrepo/syntax/table.php включить скриншоты в таблице (строка 84)

table.php
  1. public function handle($match, $state, $pos, Doku_Handler $handler)
  2. {
  3. $initialData = [
  4. 'cloudmin' => 0,
  5. 'showscreenshot' => true,//false -> true

lib/plugin/pluginrepo/syntax/table.php убать фильтр по типу перед таблицей (строка 195)
закомментируем строки со строки 196 по 199 и с 201 по 225 в блоке Output plugin TYPE filter selection.

table.php
  1. /**
  2.   * Output plugin TYPE filter selection
  3.   *
  4.   * @param Doku_Renderer_xhtml $R
  5.   * @param array $data
  6.   */
  7. public function showPluginTypeFilter($R, $data)
  8. {
  9. global $ID;
  10. /* Убираем фильтр по типу
  11.   $R->doc .= '<h3>';
  12.   $R->doc .= $this->getLang('t_filterbytype');
  13.   $R->doc .= '</h3>';
  14.   */
  15. $R->doc .= '<ul class="types">';
  16. /* $R->doc .= '<li><div class="li">';
  17.   $R->doc .= sprintf($this->getLang('t_typesyntax'), $this->hlp->listtype(1, $ID));
  18.   $R->doc .= '</div></li>';
  19.   $R->doc .= '<li><div class="li">';
  20.   $R->doc .= sprintf($this->getLang('t_typeaction'), $this->hlp->listtype(4, $ID));
  21.   $R->doc .= '</div></li>';
  22.   $R->doc .= '<li><div class="li">';
  23.   $R->doc .= sprintf($this->getLang('t_typeadmin'), $this->hlp->listtype(2, $ID));
  24.   $R->doc .= '</div></li>';
  25.   $R->doc .= '<li><div class="li">';
  26.   $R->doc .= sprintf($this->getLang('t_typehelper'), $this->hlp->listtype(16, $ID));
  27.   $R->doc .= '</div></li>';
  28.   $R->doc .= '<li><div class="li">';
  29.   $R->doc .= sprintf($this->getLang('t_typerender'), $this->hlp->listtype(8, $ID));
  30.   $R->doc .= '</div></li>';
  31.   $R->doc .= '<li><div class="li">';
  32.   $R->doc .= sprintf($this->getLang('t_typeremote'), $this->hlp->listtype(64, $ID));
  33.   $R->doc .= '</div></li>';
  34.   $R->doc .= '<li><div class="li">';
  35.   $R->doc .= sprintf($this->getLang('t_typeauth'), $this->hlp->listtype(128, $ID));
  36.   $R->doc .= '</div></li>';
  37.   $R->doc .= '<li><div class="li">';
  38.   $R->doc .= sprintf($this->getLang('t_typecli'), $this->hlp->listtype(256, $ID));
  39.   $R->doc .= '</div></li>';
  40.   */
  41. if ($data['includetemplates']) {
  42. $R->doc .= '<li><div class="li">';
  43. $R->doc .= sprintf($this->getLang('t_typetemplate'), $this->hlp->listtype(32, $ID));
  44. $R->doc .= '</div></li>';
  45. }
  46. $R->doc .= '</ul>';
  47. }

Дополнения и Файлы

Только авторизованные участники могут оставлять комментарии.
wiki/plugin/repository/manual_repository_my_edit.txt · Последнее изменение: VladPolskiy

Если не указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki