DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:fontsize

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:fontsize [2020-06-24 21:44] – [Discussion] Capbatplugin:fontsize [2024-12-23 03:57] (current) – [Discussion] 2601:85:c500:29ef:e981:1354:fb21:698
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2008-04-25 lastupdate : 2008-04-25
-compatible : >= 2005-07-01+compatible : !Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : style, typography+tags       : !broken, style, typography
  
-downloadurl: https://trello-attachments.s3.amazonaws.com/5af4815352fa15728c62aaae/5b05a6ddb3dd6d590cd2dac7/53aad4ab1ff696a76357d0537594ac97/fontsize.zip+downloadurl: https://trello.com/1/cards/5b05a6ddb3dd6d590cd2dac7/attachments/5b05a6f0f970d45e5a5e2f72/download/fontsize.zip
 bugtracker :  bugtracker : 
 sourcerepo :  sourcerepo : 
Line 47: Line 47:
 * @author     Jesús A. Álvarez <zydeco [at] namedfork [dot] net> * @author     Jesús A. Álvarez <zydeco [at] namedfork [dot] net>
 */ */
-  
-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'); 
    
 class  syntax_plugin_fontsize extends DokuWiki_Syntax_Plugin { class  syntax_plugin_fontsize extends DokuWiki_Syntax_Plugin {
Line 78: Line 74:
     }     }
  
- function handle($match, $state, $pos, &$handler){+ function handle($match, $state, $pos, Doku_Handler $handler){
  switch ($state) {  switch ($state) {
  case DOKU_LEXER_ENTER:  case DOKU_LEXER_ENTER:
Line 92: Line 88:
  }  }
  
- function render($mode, &$renderer, $data) {+ function render($mode, Doku_Renderer $renderer, $data) {
  if ($mode == 'xhtml') {  if ($mode == 'xhtml') {
  list($state, $match) = $data;  list($state, $match) = $data;
Line 179: Line 175:
 ---- ----
  
 +25/09/2020 08:05
 +I fixed this plugin for usage with HogFather, shown below:
 +<file php fontsize-hogfather.patch>--- syntax-before.php   2020-09-25 08:09:45.294662375 -0500
 ++++ syntax.php  2020-09-25 08:08:40.477774548 -0500
 +@@ -36,7 +36,7 @@
 +         $this->Lexer->addExitPattern(',,+', 'plugin_fontsize');
 +     }
 +
 +-       function handle($match, $state, $pos, &$handler){
 ++       function handle($match, $state, $pos, Doku_Handler $handler){
 +                switch ($state) {
 +                        case DOKU_LEXER_ENTER:
 +                                if ($match{1} == '#')
 +@@ -50,7 +50,7 @@
 +                return array();
 +        }
 +
 +-       function render($mode, &$renderer, $data) {
 ++       function render($mode, Doku_Renderer $renderer, $data) {
 +                if ($mode == 'xhtml') {
 +                        list($state, $match) = $data;
 +                        switch ($state) {
 +</file>
 +Apply using the following command: \\ ''patch syntax.php < fontsize-hogfather.patch''
 +
 +----
 +2024-12-23
 +
 +This plugin does not work with "Kaos" and will corrupt your conf\local.php file.
plugin/fontsize.1593027880.txt.gz · Last modified: by Capbat

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