DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:fbde

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:fbde [2013-06-09 23:52] – [Configuration and Settings] 91.0.93.6plugin:fbde [2021-03-05 00:41] (current) Klap-in
Line 1: Line 1:
 ====== fbde Plugin ====== ====== fbde Plugin ======
  
-include match table from fussball.de +Includes a match table from fussball.de in your wikipage if you use Dokuwiki as a homepage for a soccer club in germany
  
 ---- plugin ---- ---- plugin ----
Line 9: Line 9:
 type       : syntax type       : syntax
 lastupdate : 2013-06-09 lastupdate : 2013-06-09
-compatible : weatherwax +compatible : Weatherwax 
-depends    : - +depends    :  
-conflicts - +conflicts  :  
-similar    : -+similar    : 
 tags       : football, soccer, fussball, fussball.de, tabelle, standings, match tags       : football, soccer, fussball, fussball.de, tabelle, standings, match
  
-downloadurl: # eg. http://github.com//dokuwiki-plugin-fbde/zipball/master +downloadurl: # eg. https://github.com//dokuwiki-plugin-fbde/zipball/master 
-bugtracker : # eg. http://github.com//dokuwiki-plugin-fbde/issues +bugtracker : # eg. https://github.com//dokuwiki-plugin-fbde/issues 
-sourcerepo : # eg. http://github.com//dokuwiki-plugin-fbde/+sourcerepo : # eg. https://github.com//dokuwiki-plugin-fbde/
 donationurl:  donationurl: 
  
Line 23: Line 23:
 ---- ----
  
-//:!This template contains various hints on how to fill in data (formatted in italics)Be sure to remove the hints and unwanted sections (Egthe Syntax/Example section for non-syntax plugins.//+ 
 +Screenshot[[http://www.bv09.de/_media/hauptverein/fbde_plugin1.png]] {{http://www.bv09.de/_media/hauptverein/fbde_plugin1.png}}
  
 ===== Installation ===== ===== Installation =====
- 
-//[First, last and only chance to warn users before installing (some has already done that before reading this)]// 
  
 :!: **External requirements:** This plugin requires the following additional components that must be installed separately:  :!: **External requirements:** This plugin requires the following additional components that must be installed separately: 
-  * [[A banana]] +  * Account on www.fussball.de with a personal key for the JavaScript Code
-  * [[Another banana]] +
- +
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. +
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
Line 46: Line 41:
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
  
-<script type="text/javascript" src="http://static.fussball.de/fbdeAPI/js/fbdeAPIFunctions.js?schluessel=A8901EDDAEE4ACB5DD95D85270F3F0CF9195AF3A"></script>+Register at www.fussball.de and get your personal key to access the data. 
 +Put this two lines at the bottom of the ''<head></head>''-block in your ''/lib/tpl/<TPLNAME>/main.php'' file. Remember to change the XXXXX with your personal key.
  
-<link rel="stylesheet" media="screen" type="text/css" href="<?php echo DOKU_TPL; ?>fbde.css" />+  <script type="text/javascript" src="http://static.fussball.de/fbdeAPI/js/fbdeAPIFunctions.js?schluessel=XXXXX"></script> 
 +  <link rel="stylesheet" media="screen" type="text/css" href="<?php echo DOKU_TPL; ?>fbde.css" />
  
-put this into your tpl dir +put this .css file into your /lib/tpl/<TPLNAME>/ directory: 
-<file fbde.css>+<file css fbde.css>
 #fussballdeAPI {width: 100%; border-color:#fff; } /*make it filling the page width*/ #fussballdeAPI {width: 100%; border-color:#fff; } /*make it filling the page width*/
 #fussballdeAPI table {width:100%} /*table too*/ #fussballdeAPI table {width:100%} /*table too*/
Line 57: Line 54:
 #fussballdeAPI iframe {height:0px; }/*hide ad*/ #fussballdeAPI iframe {height:0px; }/*hide ad*/
 </file> </file>
-===== Development ===== 
  
-//[downloadable blocks, development comments]//+and create a folder ''fbde'' in ''/lib/plugins/'' to save the ''syntax.php''
  
-=== Change Log ===+<file php syntax.php> 
 +<?php 
 +/** 
 + * Plugin fbde: Displays match tables from fussball.de" 
 + * 
 + * Syntax: <fbde|SAISON|ID> - will be replaced with output from fussball.de  
 + *  
 + * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html) 
 + * @author     Manuel Krischer <m.krischer@bv09.de> 
 + */ 
 +  
 +if(!defined('DOKU_INC')) die(); 
 +  
 +class syntax_plugin_fbde extends DokuWiki_Syntax_Plugin { 
 +   
 +    function getType() { return 'substition';
 +    function getPType(){ return 'stack';
 +    function getSort() { return 999; } 
 +     
 +    /*search for pattern*/ 
 +    function connectTo($mode) { 
 +      $this->Lexer->addSpecialPattern('<fbde.*?>',$mode,'plugin_fbde'); 
 +    }
  
-//[preferable GitHub RSS feed or similar]//+    /*what to do with pattern*/ 
 +    function handle($match, $state, $pos, Doku_Handler $handler){ 
 +        return  explode('|', $match); 
 +    }
  
-  * **2009-01-01**+    function render($mode, Doku_Renderer $renderer, $data) { 
 +        if($mode != 'xhtml'
 +  return false; 
 + 
 +          $renderer->doc .= "\n\t\t<div style=\"clear:both\" /><div id=\"meinWettbewerb0\">\n\t\t 
 + <script type=\"text/javascript\"> 
 + var wettbewerb0 = new fussballdeAPI(); 
 + wettbewerb0.setzeSaison('".$data[1]."'); 
 +  wettbewerb0.setzeWettbewerbID('".rtrim($data[2], '>')."'); 
 + wettbewerb0.zeigeTabelle('meinWettbewerb0'); 
 + </script></div>\n\t\t"; 
 +        return true; 
 +  
 +  
 +    } 
 +
 +</file> 
 + 
 + 
 +=== Change Log === 
 + 
 +  * **2013-06-15**
     * Initial release     * Initial release
  
 === Known Bugs and Issues === === Known Bugs and Issues ===
  
-//[this section might not be needed in case of external bug manageror use RSS feed]//+Not the nicest plugin designbut it's my first plugin and I don't have internal knowledge and understanding of the dokuwiki code yet
  
 === ToDo/Wish List === === ToDo/Wish List ===
  
-//[developers roadmap]//+ * downloadable
  
 ===== FAQ ===== ===== FAQ =====
Line 83: Line 125:
  
 //Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs// //Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs//
- 
- 
plugin/fbde.1370814725.txt.gz · Last modified: 2013-06-09 23:52 by 91.0.93.6

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