todo plugin

Compatible with DokuWiki

2009-02-14b, 2009-12-25c

plugin Create a simple, Checkbox based Todo List

Last updated on
2010-08-16
Provides
Syntax, Action

Tagged with todo

By Babbage

Download and Installation

Download and install the plugin using the Plugin Manager using the following URL. Refer to Plugins on how to install plugins manually.

Using this URL, you can now use the “Update” button in Manage Plugins to get the latest version.

ChangeLog

Version 08/16/2010:
[*] Fixed another bug where javascript would not decode the action text properly (replaced unescape with decodeURIComponent).

For a full changelog, please visit http://www.digitalbrink.com/programs/dokuwiki_plugin_todo/?page=vhistory

Instructions

Creating Lists

After installing the plugin, simply enter this information on the page you wish to create the todo list:

<todo>Title of todo Action</todo>

Each <todo> tag will create one checkbox for the action.

To create a checkbox that is check by default, create your todo like this:

<todo #>Title of todo Action</todo>

Using bulleted lists (*) or newline formatting (\\) is recommended, as it will allow you to more easily make a 'list' out of your items to do.

Formatting

Formatting is not allowed inside of the <todo></tags>. However, if you wish for your text to be bold or have some other type of style (other than the default one provided), you can surround the todo tag with the formatting of your choice. The resulting action text should then be displayed with your choice of formatting when your changes have been saved.

QuickButton

As of version 2-27-10, I have added a quickbutton to the editor toolbar. You can click the button (which is pictured as a checked-checkbox) or you can use the keyboard shortcut of [T].

AJAX

The todo plugin makes use of background Ajax, so you don't have to edit the page each time you want to check off an action.

When you go to the page with a list of actions on it, you can check off each action that is completed. In the background, your file will be automatically updated with a '#' to denote that the action has been completed. Each time this happens, a new revision is added to your Old revisions section of that page. It will show up as a minor edit, with the subject “Checkbox Change”.

Plugin Settings

Current Settings

Allow actions to also link to pages with the same name?

Default: Off
This option (when enabled) will allow your actions to also link to a page with the same name. This way, if you have important details about an action, you can place them in this link.

What namespace should your actions be created in (".:" = Current NS, Blank = Root NS)

Default: [Empty]
This option allows you specify where actions links should be placed. Using ”.:” will cause the actions to link to whatever namespace you are currently in. Leaving it blank or typing ”:” will cause all actions to link to the root namespace. Using something like ”.:actions:” will cause the actions to link to whatever the current namespace is, plus an “actions” namespace. (Added with version 9-9-09)

Should the actions have strike-through applied when checked?

Default: On
This option (when enabled) will place a strike-through in the actions that have been completed. When disabled, an action can be checked, but the text will not have strike-through applied.

If AllowLinks is disabled, should clicking the actions' text mark the action complete?

Default: On
When this option is enabled, and the links option is disabled, then clicking on the text of an action will mark that action as being complete. (Added with version 10-14-09)

Deprecated Settings

Should links be created in the current namespace? (if no, then they will be created in the root NS)

Default: Off
This option (when enabled) will create the aforementioned links to actions in the current namespace. If this option is disabled, then pages will be created in the root namespace.
NOTE: This setting was removed as of version 9-9-2009.

Tips

  • Because of the 'Dynamic' nature of this plugin, you may want to consider using the ~~NOCACHE~~ tag on your page to make sure things get updated correct.

Known Problems and Solutions

  • If you check off a bunch of boxes then immediately click on another link, DokuWiki may not have enough time to update the cached version of the page to the latest edition. The pages source code will be correct, but the cached version that you normally look at will not look correct.
    • Solution: To fix, simply wait half a second to a second after checking off the last action to allow the cache to generate the correct version of the page. -Babbage
  • The “nextElementSibling” method used in the Ajax JavaScript is only implemented in gecko 1.9.1 used in Firefox 3.5. In previous versions of Firefox doesn't work.
    • Solution: As of version 10-1-2009, I have updated the JavaScript to use .nextSibling instead of .nextElementSibling. I have verified that this works with Firefox 3.0.10, Firefox 3.5.3, and Internet Explorer 6. Please let me know if this version does not work for you. -Babbage
  • On some servers, when you click the checkbox of a todo action, you will receive a pop-up of the PHP code from the ajax.php script (and the checkbox never gets checked).
    • Solution: This has been fixed as of version 10-8-09. In the ajax.php file, I was using the short open PHP tag (<?) instead of the full PHP tag (<?php). If a server had the short_open_tag feature turned off in their php.ini file, then my ajax.php file would not get processed. With version 10-8-09, I have changed this to use the full PHP tag. Thanks to Marcus and Tero for pointing this out to me :-D -Babbage
  • When checking off an action and then refreshing the page, I notice that some of the information on my page has been removed and mangled.
    • Solution: As of version 3-31-2010, this bug has been fixed. If you are using a previous version of the ToDo plugin and this has happened to you, it is recommended that you rollback your page to a revision before the information was mangled, and then upgrade to version 3-31-2010 or greater. Thanks to Freaky for bringing this bug to my attention! -Babbage
  • How come I an unable to use ampersands (&) or HTML entities in my ToDo actions?
    • Solution: As of version 3-31-2010, this feature has been implemented. Enjoy! -Babbage
  • When clicking the checkbox, I get the following JS error: Error: todo is not defined. -Sherri
    • Hi Sherri, it sounds as though the JavaScript that comes with this plugin was not registered properly with your DokuWiki installation. You might want to try reinstalling the plugin through the plugin manager, or force the recaching of all pages (instructions can be found here: purging_the_cache). Please let me know if any of these options work for you. -Babbage
  • Todo produces invalid markup: “there is no attribute 'onClick'”. See line 205 in syntax.php. → http://validator.w3.org/ -max

Suggested Modifications

FIXME FIXEDME Mod
  • allows you to use the TODO plugin together with the FIXME icon so you can easily keep track of completed tasks using the SearchPattern Plugin
  • Add the following codes after line 46 of ajax.php
#_____________________ change FIXME to FIXEDME plugin mod

  $valuePos2 = strpos($newContents, $origVal);
  $valuePosFIX = strpos($newContents, "FIX",$valuePos2);
      if($checked == 1){
        $newContents = substr_replace($newContents, "FIXEDME ", $valuePosFIX, 5);
      }else{
        $newContents = substr_replace($newContents, "FIXME ", $valuePosFIX, 7);
      }
#_______________________ end of change FIXME to FIXEDME plugin mod
  • Add the following codes to line 42 of script.js
    window.location.reload(true);
  • make an icon for the keywords FIXEDME explained here Smileys
  • Add a new page as follows to keep track of new and completed todo items using FIXMEandFIXEDME icons
~~NOCACHE~~
====Open Tasks====

~~SEARCHPATTERN:'FIXME'~~

====Completed Tasks====

~~SEARCHPATTERN:'FIXEDME'~~
  • If you do not want to use the FIXMEandFIXEDME icons, you may install the SearchPattern Plugin
  • and make the following page to keep track of new and completed todo items
~~NOCACHE~~
====Open Tasks====

~~SEARCHPATTERN:'<todo>'~~

====Completed Tasks====

~~SEARCHPATTERN:'<todo #>'~~

alwinalwin

2010/09/06 05:11

plugin/todo.txt · Last modified: 2011/06/18 16:07 by ach
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate