Not logged in. · Lost password · Register
Page:  1  2  3  next 

All posts by dma_k (42)

topic: Fine-tuning ACL for media files  in the forum: General Help and Support Installation and Configuration
Avatar
dma_k #1
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Since you need to keep your namespace private by default, with only a few exceptions that are public, it seems your best choice is to create a public namespace dedicated to media files
Thanks for the advise. I this is reasonable trade-off. I will create "public" sub-namespace and move media there:
wiki:*        @ALL    0
wiki:*        @user    1
wiki:*        @writer    4
wiki:public-page        @ALL    1
wiki:public:*        @ALL    1
wiki:public:*        @writer   16
All media can be read with the media manager by anyone.
I see. That is why I will introduce sub-namespace everywhere I need, so not to put all media into one box. Unfortunately, as far as I can see, it is not possible to refer the "relative" namespace, e.g. on page wiki:public-page to have:
{{public:banner.png}}
which is resolved to absolute :wiki:public:banner.png
topic: Fine-tuning ACL for media files  in the forum: General Help and Support Installation and Configuration
Avatar
dma_k #2
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: Fine-tuning ACL for media files
Dear DokuWiki community,

I would like to achieve the following:
  • Have certain pages in the namespace open for reading to everyone. All others should have restricted access.
  • Have all media in the namespace open for reading to everyone.
For example:
wiki:*            @user 1
wiki:playground    @ALL 1
wiki:syntax        @ALL 1
...
wiki:*.png        @ALL 1
wiki:*.jpg        @ALL 1
...

Unfortunately it seems that current ACL implementation does not support this, at least I don't see a workaround. Moreover in general I don't understand how to grant access for a single file, e.g. the following does not seem to work as well:
wiki:banner.png    @ALL 1

The approach to open read access to everyone and then restrict the access to specific pages does not work for me, as I need newly created pages to be automatically not visible to the public, moreover the number of pages to restrict access to is much bigger than number of public pages. However media is not sensitive and can be granted read-only access to everyone.

Thanks in advance for further ideas.

P.S. I've read the following related topics:
This post was edited on 2018-09-25, 11:38 by dma_k.
topic: Extended formatting in links / alternative text  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #3
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 54612
Quote by s.sahara:
I have been trying to develop a plugin that allows formatting link text.
For example [[http://www.dokuwiki.org|**DokuWiki** home]] that rendered as "DokuWiki home".

Currently I am testing my hyperlink plugin to implement the feature as my hobby. It works fine with Release 2016-06-26a "Elenor of Tsort" but the plugin is not documented at all. I hope you can find some idea to get better solution for link text formatting from plugin source code.
That plugin is actually what I would love to have. Few questions:

I wonder if Dokuwiki core is ready to accept few patches to make life of this plugin easier (if my suggestions make sense and are at all applicable).
topic: How to use square brackets in link texts?  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #4
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 54580
Quote by sloars on 2016-11-18, 15:37:
I realize this was from more than two years ago, but it appears to me that this is still a bug in release 2016-06-26 "Elenor of Tsort".

Update:  a bug report already exists - https://github.com/splitbrain/dokuwiki/issues/829

The problem actually relates also to footnotes (want to use braces?), and media (want to use curly braces?). There is no perfect solution for the problem (wiki grammar can be interpreted differently) but I have defined the following rules (which work fine for the cases you've mentioned):

$this->Lexer->addSpecialPattern("[[.+?\]\](?!\])",$mode,'internallink');

$this->Lexer->addSpecialPattern("\{\{.+?\}\}(?!\})",$mode,'media');

$this->Lexer->addExitPattern('\x29\x29(?!\x29)','footnote');

See also issue#1609.
topic: Extended formatting in links / alternative text  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #5
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 8494
After many years of using DokuWiki… I still wonder how to implement the formatting in links. I have read in this thread that is possible using the plugin. At the end of the day the plugin should basically call the code in function handler.php:internallink($match, $state, $pos). The handler delegates calls to the renderer, which hopefully does not HTML-escape the link name. The problem is in re-using entry/exit patters defined in class Doku_Parser_Mode_internallink, class Doku_Parser_Mode_media, class Doku_Parser_Mode_externallink – all that does not seem to be trivial.

In fact this functionality could be supported by DokuWiki the same way as formatting on footnotes (see class Doku_Parser_Mode_footnote): instead of "addSpecialPattern()" mentioned classes should use "addEntryPattern()"/"addExitPattern()". The problem is that "DOKU_LEXER_ENTER" event should delegate rendering of "<a href=...>" in HTML to the renderer (which currently requires all information about the link and renders it completely), and "DOKU_LEXER_EXIT" event should simply render "</a>".

Currently I don't see a proper way of re-using all DokuWiki features (e.g. interwiki support) without modifying renderer interface.

Any suggestions are warmly welcomed.
topic: Horizontal line after the list does not work  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #6
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 52664
... known issue since 2006 :) Maybe it's time to make a "grand cleanup"? In any case, my playground (it includes the fix I mentioned above) is opened for tests.
This post was edited on 2016-06-24, 00:07 by dma_k.
topic: Horizontal line after the list does not work  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #7
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 52652
The line (hr) does break lists. As it should.
Perhaps yes, but from user's perspective this is empty that breaks the list. "----" should break the list without empty line

It is possible, and valid to create a(n indented) hr within a li (but not between li's)
That's is not my intention. "nice to have" but not "basic". And irritating newline before "----" is something basic.

Anyway, this trivial patch had satisfied all my needs. Strangely after I have applied it the input "para1 ---- para2" should have resulted two paragraphs, but it does not (as I would expect, so I am happy).

--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -353,7 +353,7 @@ class Doku_Parser_Mode_eol extends Doku_Parser_Mode {
 class Doku_Parser_Mode_hr extends Doku_Parser_Mode {
 
     function connectTo($mode) {
-        $this->Lexer->addSpecialPattern('\n[ \t]*-{4,}[ \t]*(?=\n)',$mode,'hr');
+        $this->Lexer->addSpecialPattern('[ \t]*-{4,4}[ \t]*(?=\n)',$mode,'hr');
     }
 
     function getSort() {
topic: Horizontal line after the list does not work  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #8
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 52649
Thanks for reply. From your message it's clear why this cannot be processed correctly...
"\n   *" and "\n   -" creates <ol> and <ul> lists
That story is not complete: renderer creates <li> as well. It also tracks what kind of list was before, e.g. correctly handles this situation:
  * one
  - two
but valid HTML will not allow a <hr> inside a <ol> or <ul>.
Well, <li> allows any block element, however my intention is not to put a line into list: the line should break lists.

I still think this is a bug, because it does not work after the table as well (expected: the horizontal line is drawn after the table):
|one|two|
----
topic: Can't make plugin:authchained working  in the forum: General Help and Support Installation and Configuration
Avatar
dma_k #9
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 52621
After resetting the permissions it worked fine. The issue is gone.
topic: Best type for <code> for various configuration files  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #10
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: Best type for <code> for various configuration files
Hi everyone,

DokuWiki contains pre-build code formatters for certain configuration files, like "apache", "proftpd", "xorg_conf". I wonder what would be the best match for configs like Samba (/etc/samba/smb.conf, actually "key=value" syntax) and Squid (/etc/squid/squid.conf, generally "key value" syntax)? Is there any way to define an alias for the type?

Thanks!
topic: Horizontal line after the list does not work  in the forum: General Help and Support Syntax and Usage
Avatar
dma_k #11
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: Horizontal line after the list does not work
Example which does not work (expected to draw a horizontal line between two lists):
  * item 1
----
  * item 2
I think this is a bug.

Workaround (extra new line):
  * item 1

----
  * item 2
topic: Can't make plugin:authchained working  in the forum: General Help and Support Installation and Configuration
Avatar
dma_k #12
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
Subject: Can't make plugin:authchained working
Dear all,

I am migrating from DokuWiki 2010-11-07 "Anteater" to latest DokuWiki which I checked out few days ago from git. Previously I was using "chained" build-in authentication and it worked smoothly.

In new DokuWiki setup I have installed plugin:authchained plugin and made the following changes to configuration:
$conf['authtype'] = 'authchained';
$conf['plugin']['authchained']['authtypes'] = 'authplain';
In principle the changes should be transparent, as conceptually nothing in changed in authentication. However when I try to open a page that does not require authentication (and used to work before I modified configuration file) the following error is shown
User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.
and I am asked to authenticate.
What went wrong? Where can I see more detailed error message?
topic: PAM Authentication  in the forum: General Help and Support Plugins
Avatar
dma_k #13
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 44895
/etc/passwd does not contain any emails, at least I would find it strange. The solution for "combined" authentication is actually plugin:authsplit.
topic: Is there interest in a user meeting in the Netherlands? (is er interesse voor een meeting in Nederland?)  in the forum: Community User Meetings
Avatar
dma_k #14
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 48433
Quote by Klap-in:
I personally prefer to start in time.

@dma_k and others who have time constraints: If you have topics that you prefer to join, please share these, probably the talks and discussions can be ordered that you don't miss too much.

That's absolutely fine. My excuses if I will be late. I have no preferences for talks, so let it be how it is planned.
topic: Is there interest in a user meeting in the Netherlands? (is er interesse voor een meeting in Nederland?)  in the forum: Community User Meetings
Avatar
dma_k #15
User title: Dmitry Katsubo
Member since Aug 2008 · 42 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 47261
Quote by feed on 2015-02-24, 14:35:
1. Is Enschede too far away for ppl from e.g. Noord-Holland or the Flevopolder?
Dear all,

I would love to be present and meet other Dokuwiki users, however as I will be travelling from The Hague the start time at 14:00 is a bit sharp for me (I would need to do something else in the morning on 12th of June). Would it be possible to shift the timeframe to 15:00-18:00?

P.S. As the addendum, will somebody be interested in exchanging the PGP signatures?
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  3  next 
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-24, 09:23:04 (UTC +02:00)