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

All posts by schplurtz (444)

topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #1
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Well, no more luck with composer. the phar version worked. At least it did not crash, but there were still tons of PHP warning. The resulting doc is hard to read and navigate...
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #2
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66810
good to know. I'll try that. My current phpdoc installation (with pear) crashes.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66805
That's a lot to process. I'm going to pull your commit and try the phpdoc. I did not notice the github wiki, going to read that too. I almost never check wiki on github and my first reflex was of course dokuwiki.org ;-)

Thanks for the details about the styles.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #4
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66796
I think some style names could be passed in the options array. I need to review that and add some documentation.
Ah ah. Ok, I took a more indepth look at the ODT code and I could get a basic understanding of how style works. But it seems to be more complex, documentation would be welcome.
  1. if(!$renderer->styleExists('Command Line Interface')) { //FIXME: are styles looked up by style-display-name?
  2.  $style=array('style-display-name' => 'Command Line Interface',
  3.               'background-color' => '#feacdc' // some kind of pink
  4.                      );
  5.  $renderer->createParagraphStyle( $style );
  6. }
  7. $options['p_style']='Command Line Interface';
  8. ....
  9. generateCode....

Would you be willing to re-test it once I have got a new version?
Of course.
The author has attached one file to this post:
cli-style.png 52.1 kBytes
You have no permission to open this file.
This post was edited on 2019-07-08, 19:57 by schplurtz.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #5
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66791
generateODTfromHTMLCode cannot parse <pre> tags.
$options = array();
$renderer->generateODTfromHTMLCode($html_code, $options);
[Image: https://framapic.org/dfn5c2EGisme/wutYeTmetnjM.png]


But if I copy some options from renderer_plugin_odt_page::_highlight() and remove the <pre> and </pre> tags, then generateODTfromHTMLCode produces some nice results :

A monospace font is used, spaces are preserved and, the CSS has been automagically loaded and font colors are applied. This is great.
$options=array();
$options ['escape_content'] = 'false';
$options ['space'] = 'preserve';
$options ['media_selector'] = 'screen';
$options ['element'] = 'pre';
$renderer->generateODTfromHTMLCode($this->html, $options);

I am pleased with these results, so no need to do anything more.

One very minor point, maybe for later (or never). <code> blocks have an ODT style of "preformatted text" and thus a light blue background. But the block generated by generateODTfromHTMLCode() has no particular ODT style.

Anyway, thanks again.

[Image: https://framapic.org/eTKRQcoZ4ypq/wA4tAmLxKjVd.png]
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #6
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66790
Thank you LarsDW223.
Such quick answer is really appreciated. And also it's fun to have a branch by my name.

I'll certainly report results.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #7
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66787
Hi Michaelsy,
I know you want to help, but please don't post noise when you don't have the answer. Magic functions have nothing to do with my question.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
schplurtz (Moderator) #8
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Subject: odt rendering, preformatted text and colors
Hi,

I'm trying to add odt rendering to the cli syntax plugin. In the end I'll need to get the odt equivalent of this html snippet :
<pre><span style="color:red">prompt $</span><span style="color: green">command</span></pre>
There is a bit of documentation in https://www.dokuwiki.org/plugin:odt:implementodtsupport and I tried to understand the code in renderer/page.php, but I still don't know how to properly style preformatted text in this renderer.

First question. There are methods whose name start with an underscore. What does it mean ? are these methods special in any way ?

Second, I don't seem to be able to add colored spans whith renderer_plugin_odt_page->preformatted() nor with renderer_plugin_odt_page->_preformatted() and there is no method to open a preformatted paragraph. Did I miss something ?

So far, I can't use preformatted text, so I resort to using standard paragraph, with monospace font. But this collapses multiple spaces into one single space (just like html does with spaces), which is not good. So I also replace all pairs of spaces by <space><non-breakable-space>. spaces are visually preserved, but this is just a hack. I'm looking for something nicer that wouldn't modify the data.  Current code looks like this :
$renderer->_odtParagraphOpenUseProperties(array('font-family' => 'Bitstream Vera Sans Mono',....));
$renderer->_odtSpanOpenUseProperties(array('color' => 'red'));
$renderer->cdata(str_replace('  ', $sp_and_nbsp, $line[0]));
$renderer->_odtSpanClose();
$renderer->_odtSpanOpenUseProperties(array('color' => 'green'));
$renderer->cdata(str_replace('  ', $sp_and_nbsp, $line[1]));
$renderer->_odtSpanClose();
etc...

Any idea how I could do this correctly ?
topic: Installation Problems with the current dokuwiki version  in the forum: General Help and Support Installation and Configuration
Avatar
schplurtz (Moderator) #9
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66547
Sorry, I have no more idea.
topic: AuthAD and Local admin/user  in the forum: General Help and Support Installation and Configuration
Avatar
schplurtz (Moderator) #10
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66546
Hi,

Quote by cziehr:
As far as I know, it is not possible to use users from an ActiveDirectory and local users in DokuWiki at the same time.
It is possible to do that. There are 2 auth plugins that you can combine to do all sorts of funny things.
The first one is authchained, you can use it to try first authplain, then if it fails, authad. This means you can define local users and still use AD users.
The second one is authsplit. It separates user validation (password check) from user info (real name, email, groups). With this one, you can have users from an external source, such as AD, and still define your own groups locally.

Combined together those 2 auth plugins are very powerfull. I have been using this kind of setup flawlessly for years.
// auth method. Allow both ldap and local users
$conf['authtype']       = 'authchained';

// list of authtypes, eg 'authldap:authplain'
$conf['plugin']['authchained']['authtypes'] = 'authsplit:authplain';
// which of the authtypes should be checked for capabilities when no user is logged on.
$conf['plugin']['authchained']['usermanager_authtype'] = 'authplain';

$conf['plugin']['authsplit']['primary_authplugin'] = 'authldap';
$conf['plugin']['authsplit']['secondary_authplugin'] = 'authplain';
$conf['plugin']['authsplit']['autocreate_users'] = 1;

Of course, if AD groups are OK, or the wiki does not need groups, then there is no need for authsplit.
topic: How do I create the sidebar?  in the forum: General Help and Support Server Setup
Avatar
schplurtz (Moderator) #11
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66526
Edit #3:  I found the correct way to enable the sidebar.  In Configuration Settings, at the bottom, there is a section for the template, and there you can enable a flag called dokuwikiSidebar.  As far as I can tell, this is not mentioned in any of the documentation linked above.
I agree this (and the logo thing) should be documented, please, do not hesitate to modify https://www.dokuwiki.org/template:material , letting others benefit from your experience.
topic: How do I create the sidebar?  in the forum: General Help and Support Server Setup
Avatar
schplurtz (Moderator) #12
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66526
Hi,

You don't need to edit any .php file. I think you missed the configuration parameters.

1) Go to admin ⚙ -> config parameters, then near the bottom of the page, you'll find the material template options. Make sure "tpl material dokuwikiSidebar" is checked and save the settings

2) create or edit a page named sidebar,  http://your-wiki.com/doku.php?id=sidebar .

3) visite any other page, your sidebar should be there.

You may revert your changes to sidebar.php, or not.


The logo.

There is no documentation about the logo, neither on DW page nor on Github. But inspection of the code shows that it will use :wiki:logo.svg or :logo.svg if they exist. So try this :
1)  revert your changes to main.php
2) Create your logo as an SVG file. Eventually, convert your jpeg or png logo to svg format
3) upload that media as :wiki:logo.svg
topic: Installation Problems with the current dokuwiki version  in the forum: General Help and Support Installation and Configuration
Avatar
schplurtz (Moderator) #13
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66519
You may try to manually create a user with the instructions in
https://www.dokuwiki.org/faq:forgotten_password

As for the log message,  there is no /data/SFB1102TWO/ directory in a default DW installation. The message you are seeing is not from a default dokuwiki installation, and you can probably ignore it as long as DokuWiki is concerned.
topic: doublons dans index nspages  in the forum: Non-English Discussion French discussion
Avatar
schplurtz (Moderator) #14
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66468
Bonjour,

J'observe le même comportement. Ça s'appelle un bug; et il faudrait le rapporter à l'auteur du greffon nspages.

Un peu moins joli -- car il ne groupe pas par première lettre lorsqu'on trie par titre --  le greffon pagequery effectue des recherches et ne présente pas cette anomalie


{{pagequery>*;
sort=title;
cols=2;
display={title} ({date:created});
maxns=2
natsort
}}
topic: Authentication with Drupal Accounts (Having a lot of difficulty doing this, what's the best path?)  in the forum: General Help and Support Plugins
Avatar
schplurtz (Moderator) #15
Member since Nov 2009 · 447 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post ID 66375
Quote by bradtem:
It would be worth integrating at some point.  Drupal is of course a very popular CMS, and most notably, all of its wiki modules are of low quality and not well maintained, so drupal sites that want to pair with a wiki are on the looking for something.
Thank you for your feedbacks. Now that it's confirmed it works, I will prepare a pull request on github to integrate this hash method in DW; but I'll have to clean up the code first. Probably next weekend.

Happy DokuWiki
Schplurtz.
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  3 ... 28  29  30  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-07-21, 02:38:13 (UTC +02:00)