DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pagetemplate:listing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:pagetemplate:listing [2015-05-27 22:22] Klap-inplugin:pagetemplate:listing [2023-09-01 15:16] (current) Klap-in
Line 1: Line 1:
- +<sup>[[plugin:pagetemplate|← Back]]</sup>
  
 ==== Manual Installation === ==== Manual Installation ===
Line 17: Line 16:
  */  */
    
-if(!defined('DOKU_INC')) die(); 
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 
-require_once(DOKU_PLUGIN.'action.php'); 
-require_once(DOKU_INC.'inc/parserutils.php'); 
-require_once(DOKU_INC.'inc/search.php'); 
-require_once(DOKU_INC.'inc/parser/parser.php'); 
 require_once('pagetemplate_backlinks.php'); require_once('pagetemplate_backlinks.php');
    
Line 31: Line 24:
    */    */
   function getInfo(){   function getInfo(){
-    return array( +    return [ 
-  'author' => 'Luke Howson', +        'author' => 'Luke Howson', 
-  'email'  => 'mail@lukehowson.com', + 'email'  => 'mail@lukehowson.com', 
-  'date'   => '2007-07-25', + 'date'   => '2007-07-25', 
-  'name'   => 'Page Template', + 'name'   => 'Page Template', 
-  'desc'   => 'Generates a template when Create this Page is clicked.', + 'desc'   => 'Generates a template when Create this Page is clicked.', 
- );+    ];
   }   }
    
Line 48: Line 41:
   }   }
      
-  function _removeTemplate(&$event, $param) {+  function _removeTemplate($event, $param) {
     $page = getID();     $page = getID();
     $theTemplate = _templateFN($page);     $theTemplate = _templateFN($page);
Line 65: Line 58:
    * Hooked into a newly created page (as editor boots up).    * Hooked into a newly created page (as editor boots up).
    */    */
-  function _generateTemplate(&$event, $param) {+  function _generateTemplate($event, $param) {
         // page already exists?         // page already exists?
         $page = getID();         $page = getID();
Line 158: Line 151:
  
   //add modes to parser   //add modes to parser
-  $pagetemplate_obj =plugin_load('syntax','pagetemplate');+  $pagetemplate_obj = plugin_load('syntax','pagetemplate');
   $std_modes = array('listblock','preformatted','notoc','nocache',   $std_modes = array('listblock','preformatted','notoc','nocache',
                      'header','table','linebreak','footnote','hr',                      'header','table','linebreak','footnote','hr',
Line 189: Line 182:
 // subsystem // subsystem
 // @author 'Luke Howson' // @author 'Luke Howson'
- 
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 
  
 class PageTemplateBacklink { class PageTemplateBacklink {
Line 293: Line 284:
      
     //add modes to parser     //add modes to parser
-    $pagetemplate_obj =plugin_load('syntax','pagetemplate');+    $pagetemplate_obj = plugin_load('syntax','pagetemplate');
     $std_modes = array('listblock','preformatted','notoc','nocache',     $std_modes = array('listblock','preformatted','notoc','nocache',
                        'header','table','linebreak','footnote','hr',                        'header','table','linebreak','footnote','hr',
Line 328: Line 319:
  * @author     Luke Howson <mail@lukehowson.com>  * @author     Luke Howson <mail@lukehowson.com>
  */  */
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); 
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 
-require_once(DOKU_PLUGIN.'syntax.php'); 
 require_once('pagetemplate_backlinks.php'); require_once('pagetemplate_backlinks.php');
  
plugin/pagetemplate/listing.1432758155.txt.gz · Last modified: 2015-05-27 22:22 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki