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

All posts by LarsDW223 (421)

topic: Spam Alerts  in the forum: Offtopic Forum Help
Avatar
LarsDW223 #1
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
https://forum.dokuwiki.org/post/66924, User DEWAPOKERBOS
topic: Greetings to the Well of Knowledge!  in the forum: Community User Introductions
Avatar
LarsDW223 #2
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66886
There are some plugins allowing the export in another format:
- https://www.dokuwiki.org/plugin:text - export as plain text
- https://www.dokuwiki.org/plugin:dw2pdf - export as pdf
- https://www.dokuwiki.org/plugin:odt - export as odt or odt-->pdf
- https://www.dokuwiki.org/plugin:epub - export as ebook
topic: Changing a config setting from PHP  in the forum: General Help and Support Development
Avatar
LarsDW223 #3
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66872
IMHO it would be better to place it in a file.

But you can just write into the config array. But then you need to think about what setting you are changing and to what time. Also no user can see that your plugin changed a setting if it is only in the code so it might be hard to troubelshoot if something is not reacting as it should and it's caused by your config change maybe.
topic: Sprache/Textanpassungen Plugins - Updatesichere Anpassungen  in the forum: Non-English Discussion German discussion
Avatar
LarsDW223 #4
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66857
Hallo Chris,

das beste wäre natürlich wenn deine Änderung offiziell über https://translate.dokuwiki.org/ vorgenommen werden würde und somit im offiziellen Code des Plugins landet. Oder ist das nur eine individuell anwendbare Änderung?

Grüße,
Lars
topic: Greetings to the Well of Knowledge!  in the forum: Community User Introductions
Avatar
LarsDW223 #5
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66833
Hi Ken,

welcome to DokuWiki!

Yes I think DokuWiki meets your requirements:

(1) the Wiki must be internal and not visible on the WWW because of regulatory requirements

Well, I think this is more a requirement of the installation and done via a corresponding webserver setup.

(2) the Wiki must be able to distinguish between who can view content, who can edit content, and who can approve content.

DokuWiki's ACLs (Access Control List) decide if a user may only read or also edit a page. Approveing of pages is not a functionality which exists in the DokuWiki core but it can be added via plugins (e.g. see https://www.dokuwiki.org/plugin:publish).

So good luck with DokuWiki. If you face any problems or questions then make another post in the forum.

Greetings,
Lars
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #6
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66806
A little update:
I installed the current phpdoc master via composer. Now it also works with PHP7.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #7
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66804
One additional remark:
Of course style names MUST be unique. So it would make sense to add a plugin name as a prefix or something. But you could have duplicate style-display-names. That would be confusing for the user but would not break anything.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #8
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66803
//FIXME: are styles looked up by style-display-name?

No, because the style-display-name is only present/set for common styles which you then e.g. also see in the LibreOffice GUI. But styles generated from direct formatting also need to be referenceable. So every style has got a style-name. And common styles additionally have a style-display-name which can be presented to the user.

E.g. see below the ODT element defining the paragraph style for preformatted text:

<style:style style:name="Preformatted_20_Text" style:display-name="Preformatted Text" style:family="paragraph" style:parent-style-name="Standard" style:class="html">
    <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.199cm" loext:contextual-spacing="false" style:join-border="false"/>
    <style:text-properties style:font-name="Bitstream Vera Sans Mono" fo:font-family="&apos;Bitstream Vera Sans Mono&apos;" style:font-family-generic="modern" style:font-pitch="fixed" style:font-name-asian="Bitstream Vera Sans Mono" style:font-family-asian="&apos;Bitstream Vera Sans Mono&apos;" style:font-family-generic-asian="modern" style:font-pitch-asian="fixed" style:font-name-complex="Bitstream Vera Sans Mono" style:font-family-complex="&apos;Bitstream Vera Sans Mono&apos;" style:font-family-generic-complex="modern" style:font-pitch-complex="fixed"/>
</style:style>

And now see below the style for underlined text spans (direct formatting, not editable in the LibreOffice GUI - so NO style:display-name attribute):

<style:style style:name="underline" style:family="text">
  <style:text-properties style:text-underline-style="solid"
     style:text-underline-width="auto" style:text-underline-color="font-color"/>
</style:style>

In ODTDefaultStyles::getStyleName() you can see the mapping from known internal aliases to real ODT-XML style names defined in styles.xml.

In your example you wrote:

    if(!$renderer->styleExists('Command Line Interface')) { //FIXME: are styles looked up by style-display-name?
     $style=array('style-display-name' => 'Command Line Interface',
                  'background-color' => '#feacdc' // some kind of pink
                         );
     $renderer->createParagraphStyle( $style );
    }
    $options['p_style']='Command Line Interface';
    ....
    generateCode....

This will not work as you only specified the style-display-name but not the style-name used for referencing a style. As it is not given, the ODT plugin will generate one dynamically. So you should change your code to:

    if(!$renderer->styleExists('Command Line Interface')) { //FIXME: are styles looked up by style-display-name?
     $style=array('style-name' => 'Command Line Interface',
                  'style-display-name' => 'Command Line Interface',
                  'background-color' => '#feacdc' // some kind of pink
                         );
     $renderer->createParagraphStyle( $style );
    }
    $options['p_style']='Command Line Interface';
    ....
    generateCode....
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #9
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66802
In your branch I added a function comment block to ODTUtility::generateODTfromHTMLCode(). Please have a look.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #10
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66801
There is also some more documentation in the github wiki but I fear it might be outdated, see https://github.com/LarsGit223/dokuwiki-plugin-odt/wiki/dok….
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #11
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66800
But it seems to be more complex, documentation would be welcome.

I did write some phpDoc documentation blocks long time ago. If you install and start phpDoc in the odt plugin folder it will write the documentation of the functions comment blocks into sub-dir /documentation/phpDoc/index-html. Unfortunately phpDoc seems to be broken with my PHP version. I only get the main page and it seems to abort at some point.
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #12
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66795
generateODTfromHTMLCode cannot parse <pre> tags.

I will try to improve that. I guess I can do some refactoring and share code between function preformatted() and generateODTfromHTMLCode().

But the block generated by generateODTfromHTMLCode() has no particular ODT style.

I think some style names could be passed in the options array. I need to review that and add some documentation.

Would you be willing to re-test it once I have got a new version?
topic: odt rendering, preformatted text and colors  in the forum: General Help and Support Development
Avatar
LarsDW223 #13
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66789
odt rendering, preformatted text and colors

Yes, I think exactly that is not possible at the moment. You can create preformatted text as you wrote but there is no way to insert colored text spans.

But I created a test branch for you in the ODT plugin called "schplurtz". Please install it and then try something like this:

    $html_code = '<pre><span style="color:red">prompt $</span><span style="color: green">command</span></pre>';
    $renderer->generateODTfromHTMLCode($html_code, null);

I did not test it. If it gives you a crash rather try:

    $html_code = '<pre><span style="color:red">prompt $</span><span style="color: green">command</span></pre>';
    $options = array();
    $renderer->generateODTfromHTMLCode($html_code, $options);

Please report the result. I could tweak the function ODTUtility::generateODTfromHTMLCode a bit if the result is not what you expect.
topic: How to add a modal popup with terms and conditions when user login?  in the forum: General Help and Support Development
Avatar
LarsDW223 #14
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66770
Regarding JavaScript usage in DokuWiki this page may help you: https://www.dokuwiki.org/devel:javascript.
topic: Modifying ODT Plugin  in the forum: General Help and Support Plugins
Avatar
LarsDW223 #15
Member since Sep 2014 · 421 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66762
First, it should be noted that this doesn't generate a doc file.

Well it should generate a real doc file. Better said the ODT plugin will first generate a ODT file and then the command line

$conf['convert_to_pdf'] = 'libreoffice --headless --convert-to doc --outdir %outdir% %sourcefile% 2>&1';

should convert it from .odt to a .doc file (using LibreOffice in this case).
This post was edited on 2019-07-04, 18:40 by LarsDW223.
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  3 ... 27  28  29  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:30:39 (UTC +02:00)