DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:btable

BTable Plugin

Compatible with DokuWiki

No compatibility info given!

plugin Helps to note the attendance of people for meetings or courses.

Last updated on
2007-12-08
Provides
Syntax

Similar to doodle

Tagged with calculation, calendar, csv, form, poll, tables, todo

:!: File URL is dead :!:

This plugin is based on the doodle plugin and extends it with support for CSV export and the ability to predefine not only columns, but also rows.

Description

This plugin can help your team to schedule meetings or making other decisions in a team. The syntax looks like this:

<btable [id]>
  <columns>
    ^ [column] ^ [column] ^ ... ^
  </columns>
  <rows>
    ^ [row] ^ [row] ^ ... ^
  </rows>
</btable>

That means, you can simply put a <btable> tag on the page and gets a fully selectable boolean table with export functionality.

[id] the ID of the btable; must be unique1); appears as title required
[column] an option for which users can tick a checkbox whether it's 'true' or not ('false') required
[row] an option which users can select from a combobox to insert boolean values for it required

You can see this plugin in action here.

Download & Installation

You can download and install the btable.zip (16 KB) with the plugin manager.

Source Code

As the source code is included in the file above, please download this to view the source code.

Languages

Currently only German (de), English (en) and Italian (it) translations are available. Feel free to translate it to another language and send it back to me and I will add it to the release!

Revision History

  • 2007-12-08:
    • added Italian translation - thanks a lot to Hirzel Settantacinque
    • added plugin configuration section
      • allow only some groups of users to change/add columns
      • choose the percentage above which a 'ratio' column entry gets green
      • choose to display the 'ratio' column and/or the export link
  • 2007-10-15:
    • first version

Discussion

Question: \\

How can I close the poll? (remove the check Buttons)? (2010-12-20)

Feedback

  • Great Plugin! Thank you! Fred - 20071130
  • Agreed! Is it possible to modify to include non-predefined rows?
    And could there be an option to limit the user to one check box per row? Thanks Bob - 20071209

  • Bug with dokuwiki 2008-05-05 FIXME

Warning: ksort() expects parameter 1 to be array, boolean given in /../wiki/lib/plugins/btable/syntax.php on line 192

used code:

 \\
<btable Testanfrage: Palmenfest in der Karibik am 16.06 bis 29.08>
  <columns>
    ^ JA ^ NEIN ^ unsicher ^
  </columns>
  <rows>
    ^ siggi ^ Andreas ^ Tomatensaft ^
  </rows>
</btable>

I have the same problem. I can see it when I create new tables, old ones do not show it anymore, I do not why. —Ayla 14/09/08

Same problem. I commented out the ksort so the error went away but the rows appear as a single combo-box rather than multiple rows. Looks like it would be a great pluging for what I need :-( Andy 26-Sep-08

  • Deleting entries does not seem to work for anything except Mozilla Firefox.
    Tried Internet Explorer and Opera Marcin - 20080707

  • A fix for 'Bug with dokuwiki 2008-05-05'

The array $boolean is not created until needed, that is, when a first entry into the table is made. Hence, it is false, causing ksort() to complain because it expects parameter 1 to be array, boolean given. A quick fix is to call ksort() only if $boolean exists. For this, replace lines 191-192

// sort rows
ksort($doodle);

in file ~/plugins/btable/syntax.php with

// sort rows
if ($doodle) {
  ksort($doodle);
}

Hope this helps Miquel 2008-11-26


  • Is the syntax above the right one?

I have a problem when using the <btable> syntax mentioned above: the extra carets (^) before the first column label and after the last column label translate into two extra unlabeled columns, but when removing those extra carets the table displays correctly. Accordingly, with the present code the syntax seems to be,

<btable [id]>
  <columns>
    [column] ^ [column] ^ ... 
  </columns>
  <rows>
    [row] ^ [row] ^ ...
  </rows>
</btable>

* Feature request: multi-valued entries instead of boolean flags

This is a great plugin and almost what I have been searching for. Almost because a boolean table does not suffice for my problem. I need to coordinate a (fixed) bunch of people who are regularly attending to events. Now every single person of this bunch of people may bring additional people to the event. So instead of a boolean tick-box I would need a drop-down box with a selectable integer. Preferably the content of this drop-down box would be configurable (but could be the same for the whole table). I would set the possible values to 0, 1, 2, 3, 4, 5, 6, 7, 8 - indicating the person count in my case.

Martin 2008-11-27

  • I wanna support this message: great plugin, but drop-down box instead of (or additionally to) check box would really be very helpful for me.
    [Stefan] 2009-03-08
  • I also would very much like the ability to select from a drop-down box. If anyone can add this feature it would be greatly appreciated.
    [Larry] 2009-04-08
  • Seems like a good idea. Why not let the user enter free text as a comment?
    [jolz] 2009-08-04

—————————— * Show row options as text instead of a drop-down box?
Is this possible? On the demo at http://home.edo.uni-dortmund.de/~horst/btable/doku.php the rows are shown as buttons. The current version renders them as a dropdown box. I'd like just to have plain text in the row down the left hand side. Any hints please email Laurence 2008-12-16-

1) If it is not, metadata of the btable with the same id gets mixed up, i.e. answers to choices in a previous btable appear in the new when the choices are the same.
plugin/btable.txt · Last modified: 2012/09/24 16:28 by 94.101.33.114