Giter Club home page Giter Club logo

dokuwiki_note's People

Contributors

abompard avatar gerardnico avatar jonhenhs avatar larsgit223 avatar lpaulsen93 avatar mischatheevil avatar rfde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dokuwiki_note's Issues

Font color issue in lists

Hi,

In notes, the text is displayed in black by default (over the color background corresponding to each type of notes).
However, when creating lists in notes, the font color for the listed entries changes to the color defined as "Main text color" in DW Template Style Settings.

This is problematic when this settings is white, for instance for dark themes wikis, since it makes the text (for lists placed into notes) unreadable when the background color is too similar to the text color.

A good solution would be to make sure that the text in notes is ALWAYS black, even for lists (since the background of notes is probably never going to be set to black.

Thanks
-a-

Error log dokuwiki Release 2023-04-04 "Jack Jackrum"

E_WARNING: Undefined array key 1
.../lib/plugins/note/syntax.php(103)
#0 .../lib/plugins/note/syntax.php(103): dokuwiki\ErrorHandler::errorHandler(2, 'Undefined array...', '/www/htdocs/w00...', 103)
#1 .../inc/parser/renderer.php(119): syntax_plugin_note->render('xhtml', Object(Doku_Renderer_xhtml), Array)
#2 .../inc/parserutils.php(700): Doku_Renderer->plugin('note', Array, 4, '')
#3 .../inc/parserutils.php(158): p_render('xhtml', Array, NULL)
#4 .../inc/parserutils.php(96): p_cached_output('/www/htdocs/w00...', 'xhtml', 'start')
#5 .../inc/Ui/PageView.php(68): p_wiki_xhtml('start', 0, true, '')
#6 .../inc/Action/Show.php(37): dokuwiki\Ui\PageView->show()
#7 .../inc/template.php(100): dokuwiki\Action\Show->tplContent()
#8 [internal function]: tpl_content_core('show')
#9 .../inc/Extension/Event.php(133): call_user_func_array('tpl_content_cor...', Array)
#10 .../inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger('tpl_content_cor...', true)
#11 .../inc/template.php(85): dokuwiki\Extension\Event::createAndTrigger('TPL_ACT_RENDER', 'show', 'tpl_content_cor...')
#12 .../lib/tpl/dokuwiki/main.php(59): tpl_content()
#13 .../inc/actions.php(27): include('/www/htdocs/w00...')
#14 .../doku.php(126): act_dispatch()
#15 {main}

Notes are unreadable on dark theme setups

Notes are unreadable on dark theme setups due to missing color set in CSS which in case of dark theme is usually white (or light) and all the texts blends in light notes backgrounds.

I created PR #1 that fixes that.

PHP 8 Warning: Undefined array key

The following warning appears with the example and PHP 8.1.11:

[Thu Oct 13 11:46:36.623754 2022] [proxy_fcgi:error] [pid 29956] [client 127.0.0.1:45224] AH01071: Got error 'PHP message: PHP Warning:  Undefined array key 1 in /var/www/dokuwiki/lib/plugins/note/syntax.php on line 103'

Example code:

<note>
This is my note ! Remember it!!
</note>

Version information:

$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
$ php --version
PHP 8.1.11 (cli) (built: Sep 28 2022 09:08:05) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.11, Copyright (c) Zend Technologies
$ cat dokuwiki/VERSION 
2022-07-31a "Igor"
$ grep date dokuwiki/lib/plugins/note/plugin.info.txt 
date   2020-06-28

Maybe this will help: dokuwiki/dokuwiki#3754 (how to fix explode/list constructs)

Feature Request: make notes extensible without altering the distribution

As of currently (late 2020, what a year) and according to the official documentation, adding a new note type requires editing several files in the plugin:note distribution, such as syntax.php; meaning, those additions are lost when upgrading, downgrading or reinstalling the distribution.

Ideally, a mechanism should be in place so that notes customization can be done another way, without altering distribution files.

An example strategy that I can think of would be the following:

Notes customization would be picked from the one place (or few places) users are expected to customize - userstyle.css and related files. Users do this by adding a new specification such as what follows:

.plugin_note .notecustomnote {
    /* I loved <blink>, don't judge me */
    text-transform: wavy, blink, matrix, rotate, etc;
}

Notes are given the base CSS class plugin_note, which contains the base styling and is provided by the plugin's style.css, and the second style which is variable and depends on what the user inputs:

<div class="plugin_note ${note_tag}"> ...

If sanitizing the note tag listings is desired, the sanitized list can be built at page load time (or, if something like a service worker is available, at service start with an optional refresh) from the following two sources (this sourcing can also be used to build a toolbar menu):

  • The plugin's table list as provided by syntax.php
  • DOM parsing of userstyle.css to check all declarations that have the class plugin_note and a class that begins with note.

Optionally, to avoid runtime building as per option 2, users can be required to register their note types in a configuration file such as DOKU_CONF/notes.txt. Since the users of the plugin itself are expected to have access to userstyle.css anyway, this should pose no problem.

Feature Wish: Icon optionally centered on top instead of the left side

Hi,

I hope this project is still maintained, as the notes are so much nicer than the ones from the Wrap plugin :-)

However in many situations (esp. when they contain quite some text), the notes would look much better with the icon centerd on top instead of the left side:

image

vs.

image

It would be great, if you could make this possible and configurable by note e.g. like <note important>...</note> vs. <note important centertop>...</note>.

Undefined variable $state

hi
in my logs I have the following warning
blog/lib/plugins/note/syntax.php on line 106; PHP message: PHP Warning: Undefined variable $state
thks

thumbnails not displayed in the actions bar

Hi @LarsGit223 .

I've installed this plugin on a 2018-04-22b "Greebo" dokuwiki and when editing a page, the icons aren't displayed in the actions bar. See :

bogue-noteplugin-dokuwiki

The dark-grey rectangle is displayed when I click on the single white kind-of-dash on the right of the red-A icon.

I can get the code tags to display with clicking on the 4 little white kind-of-dash (in the dark-grey rectangle in the picture above).

Notes not appearing on some pages

After the update to Hogfather RC2, some notes work as expected, but on some pages they do not appear at all. I have not been able to find a pattern. When looking in the error log, I found these error messages:

PHP message: PHP Warning:  Use of undefined constant DOKU_LEXER_UNMATCHED - assumed 'DOKU_LEXER_UNMATCHED' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/note/syntax.php on line 110
PHP message: PHP Warning:  Use of undefined constant DOKU_LEXER_EXIT - assumed 'DOKU_LEXER_EXIT' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/note/syntax.php on line 114
PHP message: PHP Warning:  Use of undefined constant DOKU_LEXER_ENTER - assumed 'DOKU_LEXER_ENTER' (this will throw an Error in a future version of PHP) in /var/www/dokuwiki/lib/plugins/note/syntax.php on line 106

The server is using PHP 7.2, would that be a problem?

Thanks

warnings in logs

Hello :)

I have the following in Jack Jackrum:
(I don't know if it is related to #22)

2023-06-29 13:28:01require(syntax.php) is deprecated. It was called from require() in /var/www/html/usrnm-dokuwiki/lib/plugins/note/syntax.php:43 Autoloading should be used instead!

2023-06-29 13:28:16require(syntax.php) is deprecated. It was called from require() in /var/www/html/usrnm-dokuwiki/lib/plugins/note/syntax.php:43 Autoloading should be used instead!

2023-06-29 13:31:05require(syntax.php) is deprecated. It was called from require() in /var/www/html/usrnm-dokuwiki/lib/plugins/note/syntax.php:43 Autoloading should be used instead!

Best,
-a-

Content "pushed down" by TOC

Hi,

Re title: sorry, I don't know how to describe the problem better. Please feel free to change the title if required.

I was referred to here from dokuwiki/dokuwiki#2751.

Issue:

Notes are "pushed down" when they are "too near" the TOC. See this screenshot:

dockuwiki_toc_pushdown_2

Can this be changed in the note stylesheet in a way, that the TOC floats over the effective content instead of pushing it away?

f.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.