plugin:avtaskbox
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:avtaskbox [2015-03-26 16:38] – 89.245.244.41 | plugin:avtaskbox [2022-08-08 20:46] (current) – [Changelog] sherri | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== AV Task Box Plugin |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
- | author | + | author |
- | email : (use my website to contact me) | + | email : |
type : syntax | type : syntax | ||
- | lastupdate : 2013-02-25 | + | lastupdate : 2022-08-08 |
- | compatible : 2012-10-13, 2008-05-05+ | + | compatible : 2018-04-22b+, 2020-07-29+, 2022-07-31+ |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
tags : task, pm, projects, userstory, boxes, GTD, todo | tags : task, pm, projects, userstory, boxes, GTD, todo | ||
- | + | downloadurl: | |
- | downloadurl: | + | bugtracker : https:// |
- | bugtracker : | + | sourcerepo : https:// |
- | sourcerepo : | + | |
donationurl: | donationurl: | ||
+ | |||
+ | screenshot_img: | ||
---- | ---- | ||
===== Description ===== | ===== Description ===== | ||
- | With this plugin you can format task or userstory information into nice tables for doing project management or keeping a todolist. | ||
- | Screenshot and info available here: [[http:// | + | With this plugin you can format task or user-story information into nice tables for doing project |
- | Updated Feb 25, 2013 to support latest version of Dokuwiki. Fixed image bug. --- [[user> | + | ===== Syntax and Usage ===== |
- | ===== Syntax and Usage ===== | ||
< | < | ||
< | < | ||
Line 44: | Line 43: | ||
* You can leave out any of the items(attributes), | * You can leave out any of the items(attributes), | ||
* The entire thing is wrapped in a span with the CSS class " | * The entire thing is wrapped in a span with the CSS class " | ||
+ | |||
===== Output ===== | ===== Output ===== | ||
- | {{http:// | ||
+ | {{https:// | ||
===== Installation ===== | ===== Installation ===== | ||
- | * **Plugin Manager:** Paste this URL into the Plugin Manager to install AVTaskBox automatically: | + | * **Plugin Manager:** Paste this URL into the Plugin Manager to install AVTaskBox automatically: |
- | * **Manually: | + | |
- | - Make a new directory '' | + | |
- | - Add the source code below to a file '' | + | |
===== Known Bugs ===== | ===== Known Bugs ===== | ||
Line 62: | Line 58: | ||
===== To Do ===== | ===== To Do ===== | ||
- | * Nothing. | + | * Make priorities colored. |
+ | * Support Dokuwiki syntax inside description box. | ||
+ | * Use a div instead of a table? | ||
===== Changelog ===== | ===== Changelog ===== | ||
- | * ** 2009-11-19 ** | + | * **2009-11-19** |
* created plugin. | * created plugin. | ||
- | * ** 2013-02-25 ** | + | * **2013-02-25** |
* Fixed image url and minor layout bugs. | * Fixed image url and minor layout bugs. | ||
* Image fix by user monoceros84. | * Image fix by user monoceros84. | ||
* Updated this wiki page to remove comments that have been fixed. | * Updated this wiki page to remove comments that have been fixed. | ||
+ | * **2020-02-07** | ||
+ | * Update for PHP v 7+ | ||
+ | * Add to GitHub repo. | ||
+ | * **2022-08-08** | ||
+ | * Fix broken blank image in progress bar. | ||
+ | * Confirmed support for 2022-07-31 " | ||
===== Source ===== | ===== Source ===== | ||
- | ==== syntax.php ==== | + | https://github.com/ |
- | <code php> | + | |
- | <?php | + | |
- | /* | + | |
- | * DokuWiki task box plugin | + | |
- | * Copyright (C) 2013 Sherri Wheeler | + | |
- | * Usage: | + | |
- | * | + | |
- | * < | + | |
- | * TITLE: A test task | + | |
- | * PRIORITY: High | + | |
- | * ESTIMATE: 4h | + | |
- | * PROGRESS: 10% | + | |
- | * ASSIGNED: Sherri | + | |
- | * DESCRIPTION: | + | |
- | * </task> | + | |
- | * | + | |
- | * This program is free software; you can redistribute it and/or modify | + | |
- | * it under the terms of the GNU General Public License as published by | + | |
- | * the Free Software Foundation; either version 2 of the License, or | + | |
- | * (at your option) any later version. | + | |
- | * | + | |
- | * This program is distributed in the hope that it will be useful, | + | |
- | * but WITHOUT ANY WARRANTY; without even the implied warranty of | + | |
- | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | |
- | * GNU General Public License for more details. | + | |
- | * | + | |
- | * You should have received a copy of the GNU General Public License | + | |
- | * along with this program; if not, write to the Free Software | + | |
- | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 | + | |
- | */ | + | |
- | + | ||
- | if(!defined(' | + | |
- | if(!defined(' | + | |
- | require_once(DOKU_PLUGIN.' | + | |
- | + | ||
- | class syntax_plugin_avtaskbox extends DokuWiki_Syntax_Plugin | + | |
- | { | + | |
- | + | ||
- | /** | + | |
- | * return some info | + | |
- | */ | + | |
- | function getInfo() | + | |
- | { | + | |
- | return array | + | |
- | ( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | + | ||
- | /** | + | |
- | * What kind of syntax are we? | + | |
- | */ | + | |
- | function getType() | + | |
- | { | + | |
- | return ' | + | |
- | } | + | |
- | + | ||
- | /** | + | |
- | * Where to sort in? | + | |
- | */ | + | |
- | function getSort() | + | |
- | { | + | |
- | return 999; | + | |
- | } | + | |
- | + | ||
- | + | ||
- | /** | + | |
- | * Connect pattern to lexer | + | |
- | */ | + | |
- | function connectTo($mode) { | + | |
- | $this-> | + | |
- | } | + | |
- | + | ||
- | function postConnect() { | + | |
- | $this-> | + | |
- | } | + | |
- | + | ||
- | + | ||
- | /** | + | |
- | * Handle the match | + | |
- | */ | + | |
- | function handle($match, | + | |
- | switch ($state) { | + | |
- | case DOKU_LEXER_ENTER : | + | |
- | return array($state, | + | |
- | case DOKU_LEXER_MATCHED : | + | |
- | break; | + | |
- | case DOKU_LEXER_UNMATCHED : | + | |
- | $resultStr | + | ==== Contributing |
- | + | ||
- | preg_match('/ | + | |
- | $title | + | |
- | + | ||
- | preg_match('/ | + | |
- | $priority | + | |
- | + | ||
- | preg_match('/ | + | |
- | $estimate | + | |
- | + | ||
- | preg_match('/ | + | |
- | $assigned | + | |
- | + | ||
- | preg_match('/ | + | |
- | $progress | + | |
- | + | ||
- | preg_match('/ | + | |
- | $description = (!empty($matches[1]) && strlen(trim($matches[1]))> | + | |
- | + | ||
- | if($progress< | + | |
- | if($progress> | + | |
- | $sizeLeft = 100-$progress; | + | |
- | + | ||
- | $progbar .= '< | + | |
- | + | ||
- | $resultStr .= '< | + | |
- | $resultStr .= '< | + | |
- | $resultStr .= '< | + | |
- | + | ||
- | + | ||
- | $resultStr .= '</ | + | |
- | + | ||
- | $match = $resultStr; | + | |
- | return array($state, | + | |
- | + | ||
- | + | ||
- | case DOKU_LEXER_EXIT : | + | |
- | return array($state, | + | |
- | case DOKU_LEXER_SPECIAL : | + | |
- | break; | + | |
- | } | + | |
- | return array(); | + | |
- | } | + | |
- | + | ||
- | + | ||
- | /** | + | |
- | * Create output | + | |
- | */ | + | |
- | function render($mode, | + | |
- | if($mode == ' | + | |
- | list($state, | + | |
- | + | ||
- | switch ($state) { | + | |
- | case DOKU_LEXER_ENTER : | + | |
- | $renderer-> | + | |
- | break; | + | |
- | + | ||
- | case DOKU_LEXER_MATCHED : | + | |
- | break; | + | |
- | + | ||
- | case DOKU_LEXER_UNMATCHED : | + | |
- | + | ||
- | $renderer-> | + | |
- | + | ||
- | case DOKU_LEXER_EXIT : | + | |
- | $renderer-> | + | |
- | break; | + | |
- | + | ||
- | case DOKU_LEXER_SPECIAL : | + | |
- | break; | + | |
- | } | + | |
- | return true; | + | |
- | } | + | |
- | return false; | + | |
- | } | + | |
- | } | + | |
- | + | ||
- | ?> | + | |
- | </ | + | |
+ | Please submit a PR to the GitHub repo. | ||
===== Comments / Discussion ===== | ===== Comments / Discussion ===== | ||
Line 262: | Line 94: | ||
//peter 2010/05/20 17:25//. | //peter 2010/05/20 17:25//. | ||
- | Hi everybody, I think it's an ice plugin. However, what I'm passionately missing is support of dokuwikis formatting options within the DESCRIPTION Field. This unfortunately limits the usability of this (and many other similar) plugin(s) for me. | ||
- | //jan 2010/09/30 17:52//. | ||
- | --- | ||
- | |||
- | ==== Coloured Priority Task List ==== | ||
- | |||
- | Having changed quite some stuff in the plug-in code a coloured list was created. The task tables are coloured in yellow by default. If a task is completed it appears green. If a high priority (' | ||
- | |||
- | For this reason, two dates are to be given for each task: the deadline and the creation date. Format: month/ | ||
- | |||
- | < | ||
- | < | ||
- | TITLE: A test task | ||
- | PRIORITY: High | ||
- | DEADLINE: 12/10/2010 | ||
- | OPENED: 10/29/2010 | ||
- | ESTIMATE: 4h | ||
- | PROGRESS: 10% | ||
- | ASSIGNED: Sherri | ||
- | DESCRIPTION: | ||
- | </ | ||
- | </ | ||
- | |||
- | |||
- | Copy the following and replace **syntax.php** to use it **(Warning: this code based on older version of this plugin)**: | ||
- | |||
- | <file php> | ||
- | <?php | ||
- | /* | ||
- | * DokuWiki task box plugin | ||
- | * Copyright (C) 2009 Sherri Wheeler | ||
- | * Usage: | ||
- | * | ||
- | * < | ||
- | * TITLE: A test task | ||
- | * PRIORITY: High | ||
- | * DEADLINE: 12/10/2010 | ||
- | * OPENED: 10/29/2010 | ||
- | * ESTIMATE: 4h | ||
- | * PROGRESS: 10% | ||
- | * ASSIGNED: Sherri | ||
- | * DESCRIPTION: | ||
- | * </ | ||
- | | ||
- | * This program is free software; you can redistribute it and/or modify | ||
- | * it under the terms of the GNU General Public License as published by | ||
- | * the Free Software Foundation; either version 2 of the License, or | ||
- | * (at your option) any later version. | ||
- | | ||
- | * This program is distributed in the hope that it will be useful, | ||
- | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
- | * GNU General Public License for more details. | ||
- | | ||
- | * You should have received a copy of the GNU General Public License | ||
- | * along with this program; if not, write to the Free Software | ||
- | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 | ||
- | */ | ||
- | |||
- | if(!defined(' | ||
- | if(!defined(' | ||
- | require_once(DOKU_PLUGIN.' | ||
- | |||
- | class syntax_plugin_avtaskbox extends DokuWiki_Syntax_Plugin | ||
- | { | ||
- | |||
- | /** | ||
- | * return some info | ||
- | */ | ||
- | function getInfo() | ||
- | { | ||
- | return array | ||
- | ( | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ); | ||
- | } | ||
- | |||
- | /** | ||
- | * What kind of syntax are we? | ||
- | */ | ||
- | function getType() | ||
- | { | ||
- | return ' | ||
- | } | ||
- | |||
- | /** | ||
- | * Where to sort in? | ||
- | */ | ||
- | function getSort() | ||
- | { | ||
- | return 999; | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Connect pattern to lexer | ||
- | */ | ||
- | function connectTo($mode) { | ||
- | $this-> | ||
- | } | ||
- | |||
- | function postConnect() { | ||
- | $this-> | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Handle the match | ||
- | */ | ||
- | function handle($match, | ||
- | switch ($state) { | ||
- | case DOKU_LEXER_ENTER : | ||
- | return array($state, | ||
- | case DOKU_LEXER_MATCHED : | ||
- | break; | ||
- | case DOKU_LEXER_UNMATCHED : | ||
- | |||
- | preg_match('/ | ||
- | $title = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $priority =(!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $deadline = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $opened = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $estimate = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $assigned = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $progress = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $description = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | if($progress< | ||
- | if($progress> | ||
- | $sizeLeft = 100-$progress; | ||
- | $progbar .= '< | ||
- | |||
- | |||
- | |||
- | #mark yellow as standard | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = false; | ||
- | $priority_reason_opened = false; | ||
- | $priority_reason_deadline = false; | ||
- | #mark red if high priority | ||
- | if ($priority==' | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = true; | ||
- | } | ||
- | #mark red if topic opened for over one year | ||
- | if (strtotime($opened)+31536000< | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_opened = true; | ||
- | } | ||
- | #mark red if deadline within 4 weeks | ||
- | if (strtotime($deadline)-2419200< | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_deadline = true; | ||
- | } | ||
- | #mark green if done | ||
- | if ($progress==100){ | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = false; | ||
- | $priority_reason_opened = false; | ||
- | $priority_reason_deadline = false; | ||
- | } | ||
- | |||
- | |||
- | $resultStr = '< | ||
- | |||
- | |||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | |||
- | |||
- | $resultStr .= '</ | ||
- | |||
- | $match = $resultStr; | ||
- | return array($state, | ||
- | |||
- | |||
- | case DOKU_LEXER_EXIT : | ||
- | return array($state, | ||
- | case DOKU_LEXER_SPECIAL : | ||
- | break; | ||
- | } | ||
- | return array(); | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Create output | ||
- | */ | ||
- | function render($mode, | ||
- | if($mode == ' | ||
- | list($state, | ||
- | | ||
- | switch ($state) { | ||
- | case DOKU_LEXER_ENTER : | ||
- | $renderer-> | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_MATCHED : | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_UNMATCHED : | ||
- | |||
- | $renderer-> | ||
- | |||
- | case DOKU_LEXER_EXIT : | ||
- | $renderer-> | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_SPECIAL : | ||
- | break; | ||
- | } | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | } | ||
- | ?> | + | wonderful plugin, thank you! \\ |
- | </file> | + | i'd like to link pages within the text. \\ |
+ | //dominique 2022/08/05// | ||
- | // | ||
- | 01/06/2011 - Thank you monoceros80 for adding the colors! | ||
- | <file php> | ||
- | <?php | ||
- | /* | ||
- | * DokuWiki task box plugin | ||
- | * Copyright (C) 2009 Sherri Wheeler | ||
- | * Usage: | ||
- | * | ||
- | * < | ||
- | * TITLE: A test task | ||
- | * PRIORITY: High | ||
- | * DEADLINE: 12/10/2010 | ||
- | * OPENED: 10/29/2010 | ||
- | * ESTIMATE: 4h | ||
- | * PROGRESS: 10% | ||
- | * ASSIGNED: Sherri | ||
- | * DESCRIPTION: | ||
- | * </ | ||
- | | ||
- | * This program is free software; you can redistribute it and/or modify | ||
- | * it under the terms of the GNU General Public License as published by | ||
- | * the Free Software Foundation; either version 2 of the License, or | ||
- | * (at your option) any later version. | ||
- | | ||
- | * This program is distributed in the hope that it will be useful, | ||
- | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
- | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
- | * GNU General Public License for more details. | ||
- | | ||
- | * You should have received a copy of the GNU General Public License | ||
- | * along with this program; if not, write to the Free Software | ||
- | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 | ||
- | */ | ||
- | |||
- | if(!defined(' | ||
- | if(!defined(' | ||
- | require_once(DOKU_PLUGIN.' | ||
- | |||
- | class syntax_plugin_avtaskbox extends DokuWiki_Syntax_Plugin | ||
- | { | ||
- | |||
- | /** | ||
- | * return some info | ||
- | */ | ||
- | function getInfo() | ||
- | { | ||
- | return array | ||
- | ( | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ' | ||
- | ); | ||
- | } | ||
- | |||
- | /** | ||
- | * What kind of syntax are we? | ||
- | */ | ||
- | function getType() | ||
- | { | ||
- | return ' | ||
- | } | ||
- | |||
- | /** | ||
- | * Where to sort in? | ||
- | */ | ||
- | function getSort() | ||
- | { | ||
- | return 999; | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Connect pattern to lexer | ||
- | */ | ||
- | function connectTo($mode) { | ||
- | $this-> | ||
- | } | ||
- | |||
- | function postConnect() { | ||
- | $this-> | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Handle the match | ||
- | */ | ||
- | function handle($match, | ||
- | switch ($state) { | ||
- | case DOKU_LEXER_ENTER : | ||
- | return array($state, | ||
- | case DOKU_LEXER_MATCHED : | ||
- | break; | ||
- | case DOKU_LEXER_UNMATCHED : | ||
- | |||
- | preg_match('/ | ||
- | $title = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $priority =(!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $deadline = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $opened = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $estimate = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $assigned = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $progress = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | preg_match('/ | ||
- | $description = (!empty($matches[1]) && strlen(trim($matches[1]))> | ||
- | |||
- | if($progress< | ||
- | if($progress> | ||
- | $sizeLeft = 100-$progress; | ||
- | $progbar .= '< | ||
- | |||
- | |||
- | |||
- | #mark yellow as standard | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = false; | ||
- | $priority_reason_opened = false; | ||
- | $priority_reason_deadline = false; | ||
- | #mark red if high priority | ||
- | if ($priority==' | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = true; | ||
- | } | ||
- | #mark red if topic opened for over one year | ||
- | if (strtotime($opened)+31536000< | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_opened = true; | ||
- | } | ||
- | #mark red if deadline within 4 weeks | ||
- | if (strtotime($deadline)-2419200< | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_deadline = true; | ||
- | } | ||
- | #mark green if done | ||
- | if ($progress==100){ | ||
- | $priority_color = '# | ||
- | $priority_color_dark = '# | ||
- | $priority_reason_priority = false; | ||
- | $priority_reason_opened = false; | ||
- | $priority_reason_deadline = false; | ||
- | } | ||
- | |||
- | |||
- | $resultStr = '< | ||
- | |||
- | |||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | $resultStr .= '< | ||
- | |||
- | |||
- | $resultStr .= '</ | ||
- | |||
- | $match = $resultStr; | ||
- | return array($state, | ||
- | |||
- | |||
- | case DOKU_LEXER_EXIT : | ||
- | return array($state, | ||
- | case DOKU_LEXER_SPECIAL : | ||
- | break; | ||
- | } | ||
- | return array(); | ||
- | } | ||
- | |||
- | |||
- | /** | ||
- | * Create output | ||
- | */ | ||
- | function render($mode, | ||
- | if($mode == ' | ||
- | list($state, | ||
- | |||
- | switch ($state) { | ||
- | case DOKU_LEXER_ENTER : | ||
- | $renderer-> | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_MATCHED : | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_UNMATCHED : | ||
- | |||
- | $renderer-> | ||
- | |||
- | case DOKU_LEXER_EXIT : | ||
- | $renderer-> | ||
- | break; | ||
- | |||
- | case DOKU_LEXER_SPECIAL : | ||
- | break; | ||
- | } | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | } | ||
- | |||
- | ?> | ||
- | </ | ||
- | 01/06/2011 - Zmartant |
plugin/avtaskbox.1427384306.txt.gz · Last modified: 2015-03-26 16:38 by 89.245.244.41