Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error: Call to undefined function tpl_js() #20

Open
kotadr opened this issue Feb 14, 2023 · 0 comments
Open

Fix error: Call to undefined function tpl_js() #20

kotadr opened this issue Feb 14, 2023 · 0 comments

Comments

@kotadr
Copy link

kotadr commented Feb 14, 2023

To solve the problem, you need to add the definition of the function to the main.php file:

--- main.php.orig 2020-11-03 23:10:29.000000000 +0200
+++ main.php 2023-02-14 08:43:39.558159311 +0200
@@ -12,6 +12,17 @@

+/**

    • Returns HTML string with script tag
  • */
    +function tpl_js($filename)
    +{
  • $filepath = DOKU_TPL . 'js' . DIRECTORY_SEPARATOR . $filename;
  • return "<script type="application/javascript" src="{$filepath}"></script>";
    +}

if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant