Not logged in. · Lost password · Register

All posts by gilcot (12)

topic: Move "not maintained anymore" plugins to a separate section ?  in the forum: Community dokuwiki.org
Avatar
gilcot #1
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
Quote by Samana Johann:
My person got a little familar with another software maintaining of mods/plugin use. They used to have a topic for each mod in their forum which was also linked in the "plugin"-page. [...] Since Wiki is the heart here and not a forum, it's maybe interesting to make the central place of exchange, contributions, discussion on a wiki-diskussion page at the plugin page itself, possible leading also to more contributions on the DW-wiki.
I also use web-app that works that way: there's are comments attached to each extension page.
That's possible with DW using comment plugin or similar :-)

Quote by Samana Johann:
[...] By viewing it, it always gave a good overview about the status and problems, since it was very central. Any fix but also contributions have been very accessable for the whole community. Maintaining and feedback seems to be very decentralized, focusing possible more on the plugin-contributors ease (causing on the other side to possible limited feedback). [...]
The approche used by DW is due to the fact that plugins may come from different repositories (in the case I mentionned earlier they are in a common/central repository.)
But each repository (hosted a GitHut or GitLab or BitBucket or other) is often attached to a bug tracking system... where you can view the status and the problems.  So DW avoid reinventing the wheel...
topic: Move "not maintained anymore" plugins to a separate section ?  in the forum: Community dokuwiki.org
Avatar
gilcot #2
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62958
Quote by ryan.chappelle on 2018-10-08, 16:37:
Also would someone be able to explain to me the syntax that can be used for the pluginrepo data table when editing pages? I've seen this works

compatible : Frusterick, Lemming, Anteater, rincewind, angua

But I'm also looking for some sort of glob syntax and as I've mentioned above I've never been able to make it work correctly. And I can't find information on how extensible it is, for example I'd like to point out a plugin works with ">= Binky" or "PHP <= 5.6".

It's based on plugin just called repository:
Multiple versions can be given and code names can be used. Eg: 2009-02-14, lemming, anteater.

    - Use a plus sign + if you think it's safe to assume that the plugin will be compatible with future releases of DokuWiki.
    - Use an exclamation mark ! if the plugin is not compatible to a DokuWiki release (e.g. “!Greebo”).
topic: Move "not maintained anymore" plugins to a separate section ?  in the forum: Community dokuwiki.org
Avatar
gilcot #3
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 55700
Quote by andi on 2017-03-02, 08:50:
Quote by dinsdale:
I think, one could gather semi-automatic compatilibility info from the popularity feedback

This sounds like a more useful approach. Trying to figure out compatibility by seeing if plugins are installed and used in certain DokuWiki releases could work. The installed part is easy to get from the current popularity data. The used part is harder. I might have a syntax plugin installed that for some reason no longer works (that rarely happens btw) but as long as I'm not using that syntax I will never notice that it doesn't work and thus will not uninstall it.

A note on compatibility: most compatibility problems arise in the following areas:

  • plugins are incompatible with newer PHP versions (especially 7.0 and 7.1) - this is unrelated to the DokuWiki version
  • plugins are incompatible with newer (JavaScript) library versions (eg. the new jQuery3 in the recent release)
  • action plugins use an event that no longer exists or provides different data now - we try to avoid that but it happens from time to time
  • plugins are incompatible with other plugins - this affects mostly JavaScript heavy plugins but is not restricted to them
  • plugins rely on DokuWiki internals that changed - mostly more sophisticated plugins are affected (not the mass of the plugins)
  • bit rot ;-)

Many of these problems will happen on some installation while not happening on others. So even when we get the info from the popularity data that a plugin is used on one particularly DokuWiki version, it doesn't mean it will always work on that version.
That's why compatibility tag, as used now, is the best way to go.
Popularity feedback doesn't report internal DokuWiki functions used, then cannot say real compatibility...
topic: HTML not allowed (tag not rendered here)  in the forum: Community dokuwiki.org
Avatar
gilcot #4
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62492
Thanks for the reply.
I have to found some other way to express my idea.
topic: HTML not allowed (tag not rendered here)  in the forum: Community dokuwiki.org
Avatar
gilcot #5
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
Subject: HTML not allowed
Hello,

I've just add a plugin documentation with some HTML inside.
I tested on my local installation before, and it was oK.
But here, it acts as if I type code instead of html :-(

Am I missing something?
topic: how to index content injected into page?  in the forum: General Help and Support Development
Avatar
gilcot #6
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62062
This one plugin:tagging or this one plugin:tag or something else ? I'll look at them deeper, but at first it's like I'll have to add my data again (as tag) :-/
topic: How to know if a page exist on the wiki ?  in the forum: General Help and Support Development
Avatar
gilcot #7
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62061
Thanks for all those advices. I end up with this:
    function setAAttr($url_in) {
        $url_out = "<a href='$url_in' class='" ;
        $_href = parse_url($url_in, PHP_URL_SCHEME) ;
        if ($_href['scheme']) { // absolute URL
            if ($_href['scheme'] == 'mailto') {
                $url_out .= "mail' title='" . substr($url_in, 6) ;
            } elseif ($_href['scheme'] == 'smb') {
                $url_out .= "windows' title='" . substr($url_in, 3) ;
            } elseif ($_href['scheme'] == 'file') {
                $url_out .= "windows' title='" . substr($url_in, 4) ;
            } else {
                $_wiki = '' ;  // current InterWiki
                foreach (getInterWiki as $_key => $_val) {
                    if (strpos($url_in, strtok($_val, '{'), 0) !== false) {
                        $_wiki = $_key ;
                        break ;
                    }
                }
                if ($_wiki == 'this') {
                    if ($_href['path'] == '/doku.php') {
                        parse_str($_href['query'], $_arg) ;
                        $url_out .= 'wikilink' . (page_exists($_arg['id']) ? '1' : '2') ;
                        $url_out .= "' title='" . $_arg['id'] ;
                        unset($_arg) ;
                    } else {
                        if (file_exists(DOKU_INC . 'data/pages' . $_href['path'] . '.txt')) {
                            $url_out .= "wikilink1' title='" . str_replace('/', ':', ltrim($_href['path'], '/')) ;
                        } elseif (file_exists(rtrim(DOKU_INC, '/') . $_href['path'])) {
                            $url_out .= "interwiki iw_this' title='" . $_href['path'] ;
                        } else {
                            $url_out .= "wikilink2' title='" . str_replace('/', ':', ltrim($_href['path'], '/')) ;
                        }
                    }
                } else {
                    $url_out .=  ($_wiki ? "interwiki iw_$_wiki" : 'urlextern') ;
                }
            }
        } else { // relative URL
            if ($_href['path'] == '/doku.php') {
                parse_str($_href['query'], $_arg) ;
                $_page = $_arg['id'] ;
            } else {
                $_page = str_replace('/', ':', $_href['path'], $_nbr) ;
            }
            $url_out .= 'wikilink' . (page_exists($_page) ? '1' : '2') ;
            $url_out .= "' title='$_page" ;
        }
        $url_out .= "'>" ;
        return "$url_out" ;
    }

I'm posting it here as example to help those who will read the thread later, but I didn't test it yet...
Let me know if you find some logical error or some misuse of DokuWiki internals.
topic: how to index content injected into page?  in the forum: General Help and Support Development
Avatar
gilcot #8
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62048
Thanks a lot: your answer makes things clear for me.

Well, is it possible to "inject" needed words in the indexation and refer to the page I'm doing that from?
(hmm maybe I should also change my subject from here?)
topic: How to know if a page exist on the wiki ?  in the forum: General Help and Support Development
Avatar
gilcot #9
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 62047
Thanks @turnermm

I undestood page_exists uses "namespace:pagename" and that's why I was in trouble... The values in the database are full URL...

Some of them look like "http://wiki.our.domain.name/doku.php?id=blah:foo:baz#duh" So I extracted "blah:foo:baz#duh" and pass it to page_exists without success. I've just found why: I have to strip the part starting with "#" (anchor in page) and it's good...

Some others look like "http://wiki.our.domain.name/blah/foo/baz#duh" That newer form because we switch later to nice URL rewriting. So, according to your reply, I have to extract "blah/foo/baz" then convert it to "blah:foo:baz" before. I'll try and let you know. Not sure file_exists will help here as it's not a true path to the file (saying that, where DokuWiki store the pages?)

Warm regards.
This post was edited on 2018-08-16, 01:32 by gilcot.
topic: how to index content injected into page?  in the forum: General Help and Support Development
Avatar
gilcot #10
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
Subject: how to index content injected into page?
Hello,

I'm writing a plugin that pull data from database tables into DokuWiki.
But I'm facing a problem: the content pulled into the wiki cannont be found in search.

To reproduce, copy the NOW example so:
    <?php
    /**
     * Plugin Now: Inserts a timestamp.
     *
     * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
     * @author     Christopher Smith <chris@jalakai.co.uk>
     */
    
    // must be run within DokuWiki
    if(!defined('DOKU_INC')) die();
    
    /**
     * All DokuWiki plugins to extend the parser/rendering mechanism
     * need to inherit from this class
     */
    class syntax_plugin_now extends DokuWiki_Syntax_Plugin {
    
        public function getType() { return 'substition'; }
        public function getSort() { return 32; }
    
        public function connectTo($mode) {
            $this->Lexer->addSpecialPattern('\[lorem\]',$mode,'plugin_now');
        }
    
        public function handle($match, $state, $pos, Doku_Handler $handler) {
            return array($match, $state, $pos);
        }
    
        public function render($mode, Doku_Renderer $renderer, $data) {
        // $data is what the function handle return'ed.
            if($mode == 'xhtml'){
                /** @var Doku_Renderer_xhtml $renderer */
                $renderer->doc .= "Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet.";
                return true;
            }
            return false;
        }
    }

...Then put "[lorem]" in a page, save it, then search for "nisl" or "massa" for example. Even days after, it won't be found... How to solve it? How to inject my data in the indexer?

Thanks a lot.
topic: How to know if a page exist on the wiki ?  in the forum: General Help and Support Development
Avatar
gilcot #11
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 61802
I have a similar issue...

I'm writing a plugin to grab data from our database.
There's a field with links to our DokuWiki.
So, when I retrieve those links back in the wiki, I want them to integrate correctly. :-)

But I don't understant how to use resolved_pageid or page_exists I must be missing some point.

Thanks.
topic: Authentification en ligne de commande  in the forum: Non-English Discussion French discussion
Avatar
gilcot #12
Member since Aug 2018 · 12 posts · Location: France
Group memberships: Members
Show profile · Link to this post
In reply to post ID 61482
XML RPC ?
Close Smaller – Larger + Reply to this post:
Special characters:
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-04-26, 00:16:22 (UTC +02:00)