Code Monkey home page Code Monkey logo

template-by-name's People

Contributors

jvanopstal avatar klap-in avatar

Stargazers

 avatar  avatar

Watchers

 avatar

template-by-name's Issues

PHP Warning: Declaration of action_plugin_templatebyname_findtemplate

  • Ubuntu 16.04
  • PHP 7.0.33

[Wed Jul 24 11:17:07.590538 2019] [:error] [pid 29010] [client xxx] PHP Warning: Declaration of action_plugin_templatebyname_findtemplate::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /var/www/dokuwiki/lib/plugins/templatebyname/action/findtemplate.php on line 0

duplicated statements

A very minor issue, these lines are default set by DokuWiki at other places since some years. So it is not useful to set them again for this plugin.

if (!defined('DOKU_LF')) define('DOKU_LF', "\n");
if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');

require_once DOKU_PLUGIN.'action.php';

Do not parse the template by this plugin, but by DokuWiki

The last two lines of the findtemplate.php seems for me the same as the default actions of pageTemplate() ( https://github.com/splitbrain/dokuwiki/blob/master/inc/common.php#L877 )

...
            $event->data['tpl'] = io_readFile($event->data['tplfile']);
        }
        if($event->data['doreplace']) parsePageTemplate($event->data);
...

I guess this plugin can be simplified by removing them.

Additional advantage: when there is another plugin that like to set templatenames, and this plugin hasn't set them, that plugin keeps the possibility to do so.

Crashes HogFather RC2

The usual PHP warning has become a fatal error and now crashes dokuwiki. removing the plugin fixes the issue... but then you don't have the plugin anymore ;-)
error log says:
[04-Jun-2020 12:02:20 Asia/Singapore] PHP Fatal error: Declaration of action_plugin_templatebyname_findtemplate::register(Doku_Event_Handler &$controller) must be compatible with dokuwiki\Extension\ActionPlugin::register(Doku_Event_Handler $controller) in /home/wiki/lib/plugins/templatebyname/action/findtemplate.php on line 73
Thank you.

Issues with direcotry template in 2014-09-29 "Hrun"?

Im running the newest version of Doku- 2014-09-29 "Hrun", and having some issues, with what I think should be pretty easy.

I can get the file template to work __yourfilename.txt but I cant get the directory template to work ~~yourdirectoryname.txt. No matter where I put it, it doesnt seem to catch it.

  • MyProjectName
    • ~~Solutions.txt => Not Working => template for Project 1.txt under Solution 1
    • Solutions
      • __start.txt => Working => template for the start.txt under Solution 1
      • Solution 1
        • start.txt
        • Project 1.txt

Basically I want all files under the Solutions directory to inherit from a template UNLESS it is named start. If its named start then I want it to inherit from another template.

Am I doing something wrong, or is there a compatibility issue?

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.