ssahara / dw-plugin-extlist Goto Github PK
View Code? Open in Web Editor NEWExtend writing style of lists in DokuWiki; multilined items, flexible number of ordered items, etc.
Home Page: https://www.dokuwiki.org/plugin:extlist
Extend writing style of lists in DokuWiki; multilined items, flexible number of ordered items, etc.
Home Page: https://www.dokuwiki.org/plugin:extlist
DokuWiki Release 2020-07-29 "Hogfather" or 2022.07.31 "Igor" (makes no difference)
Extended List syntax 2016-07-26
Template: DokuWiki standard or sprintDoc (makes no difference)
Hosted on OpenBSD 7.1 stable amd64, using OpenBSD httpd(8), PHP-FPM 7.4.30 (or PHP_FPM 8.0.22 for Igor, makes no difference)
Wrap Plugin installed and active (latest version, 2022-08-10)
Using the following test I could not see any difference between the two variants:
===== Description list (compact term) =====
; Term 1 — Let's add some extremely long additional text to the term of the item to see how this is handled for display purposes by the Extended List Syntax plugin on our DokuWiki test page
: Definition 1 — Let's add some extremely long additional text to the definition of the item to see how this is handled for display purposes by the Extended List Syntax plugin on our DokuWiki test page
; Term 2
: Definition 2
===== Description list (wide term) =====
;; Term 1 — Let's add some extremely long additional text to the term of the item to see how this is handled for display purposes by the Extended List Syntax plugin on our DokuWiki test page
: Definition 1 — Let's add some extremely long additional text to the definition of the item to see how this is handled for display purposes by the Extended List Syntax plugin on our DokuWiki test page
;; Term 2
: Definition 2
Did I misunderstand the purpose of the ;;
vs. ;
syntax?
I do see the HTML attribute class="compact“
when using the ;;
form, but there seems to be no CSS to actually change the display properties when I use a web inspector in the browser.
I am using the default plugin configuration:
Thx!
fiwswe
Using DW default line numbering - not a plugin.
I had to add to userall.css:
.extlist pre.code ol { list-style: decimal; }
.extlist pre.code ol li { display: list-item; }
My setup:
OpenBSD 7.1 release, all patches applied, amd64, httpd(8)
, PHP-FPM 8.0.22, HTTP Basic authentication configured, DokuWiki 2022-07-31 "Igor".
The Wiki is a copy of an existing Wiki based on Hogfather upgraded to Igor according to the instructions (https://www.dokuwiki.org/install:upgrade).
Extended List Syntax Plugin 2016-07-26 is installed.
I am getting lots of PHP warnings like these:
PHP message: PHP Warning: Undefined array key "div" in /dokuwiki-test/lib/plugins/extlist/syntax.php on line 588
PHP message: PHP Warning: Undefined array key "/div" in /dokuwiki-test/lib/plugins/extlist/syntax.php on line 588
My fix was to modify the method _tag_indent
in /lib/plugins/extlist/syntax.php
to this:
/**
* indent tags for readability if HTML source
*
* @param string $tag tag name
* @return array
*/
private function _tag_indent($tag)
{
// prefix and suffix of html tags
$indent = [
'ol' => ["\n","\n"], '/ol' => ['',"\n"],
'ul' => ["\n","\n"], '/ul' => ['',"\n"],
'dl' => ["\n","\n"], '/dl' => ['',"\n"],
'li' => [' ',''], '/li' => ['',"\n"],
'dt' => [' ',''], '/dt' => ['',"\n"],
'dd' => [' ',"\n"], '/dd' => ['',"\n"],
'p' => ["\n",''], '/p' => ['',"\n"],
'div' => ["\n",''], '/div' => ['',"\n"],
];
if (array_key_exists($tag, $indent))
return $indent[$tag];
return ['',''];
}
Note: This includes the fix for the issue, correction of a spelling mistake and more modern and compact array()
syntax. I also changed string literals to use '
instead of "
where possible.
Thanks!
fiwswe
Very handy plugin, thanks!
Hierarchical lists do not fit in width.
Here is example:
Example page content:
~~ol:hierarchical~~
- One
- Two
- We create a configuration file. Configuration file always depends on the tasks. Below are examples of configuration files for Apache:
- With SSL:
- Create ''/etc/httpd/conf.d/example.company.ru-ssl.conf''<code apache>
<VirtualHost *:443>
<IfModule !mod_headers.c>
LoadModule headers_module modules/mod_headers.so
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age= 31536000; includeSubdomains; preload"
Header always set X-Frame-Options DENY
</IfModule>
</code>
PHP Warning: Undefined array key "ol" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 185
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 276
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 278
PHP Warning: Undefined array key "ol" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 185
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 276
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 278
PHP Warning: Undefined array key "ol" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 185
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 276
PHP Warning: Undefined array key "num" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 278
PHP Warning: Undefined array key "ol" in /var/www/admin-wiki/lib/plugins/extlist/syntax.php on line 185
DokuWiki "Jack Jackrum" and "Kaos".
Extlist 2023-08-22
PHP 8.2.15
Though not mentioned on the plugin page, i found the example from the plugin’s css.
~~ol:alphabet~~
But it doesn’t seem to work. Is there a trick to it, or is it just not working?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.