/[drupal]/contributions/modules/tablemanager/README.txt
ViewVC logotype

Contents of /contributions/modules/tablemanager/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.13 - (show annotations) (download)
Thu Nov 23 10:35:42 2006 UTC (3 years ago) by pobster
Branch: MAIN
CVS Tags: DRUPAL-5--1-4, DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.12: +0 -2 lines
File MIME type: text/plain
Some "To-Do's" are now "Have-Dones"...
1 ---------
2 Overview:
3 ---------
4
5 A simple module which automates the creation of tables and
6 allows you and permissioned users to add to them and maintain
7 them. The tables can be displayed in any node simply by typing:
8
9 [tablemanager:1]
10
11 The best thing about it is that the tables it creates are Drupal
12 themed tables and so easily fit in with the look and feel of
13 your site. It's also possible to use this module to display nice
14 looking themed bar charts.
15
16 Tablemanager supports pagination (splitting the results into pages
17 - NOTE the default is to display ALL the results). For instance,
18 to display table 2 limited to 25 results per page you'd type:
19
20 [tablemanager:2, 25]
21
22 If you write your own php snippets you can display your tables
23 from within your code:
24
25 <?php
26 ...
27 $output .= "This is table '4':<p>";
28 $output .= tablemanager_display(4, 20);
29 $output .= "</p>";
30 ...
31 return $output;
32 ?>
33
34 If you are providing your users with certain administrative
35 privileges you can also display links to allow them to add new
36 rows and edit/ delete their own entries. This is set by either
37 a TRUE (add, edit and delete links ON) or FALSE (links OFF
38 which is the default).
39
40 [tablemanager:1, 35, TRUE]
41
42 If you wish to restrict the rows displayed you can do so by
43 passing arguments to the filter like this:
44
45 [tablemanager:1, NULL, FALSE, column = 2 | start = "a" | end = "h"]
46
47 If you wish to only show rows which match a particular string
48 you can omit the 'end' key:
49
50 [tablemanager:1, NULL, FALSE, column = 1 | start = "New 2006"]
51
52 For an advanced example; how to show everyone in a 'date
53 of birth' table who is under 25 years of age using the php
54 input filter:
55
56 <?php print tablemanager_display(1, NULL, FALSE, array('column' => 3, 'start' => date('Y/m/d', mktime(0, 0, 0, date('m'), date('d'), date('Y')-25)), 'end' => date('Y/m/d'))); ?>
57
58 You can also pass parameters to the filter for the <table>
59 tag, such as setting borders (and border rules), frame rules,
60 cellspacing/ cellpadding and alignment. Experiment with
61 these parameters on one of your own tables:
62
63 ------------------------------------------------------------------------------------------------------
64 [tablemanager:1, NULL, FALSE, NULL, border = 2 | cellpadding = 5]
65 [tablemanager:1, NULL, FALSE, NULL, border = 5 | bgcolor = yellow]
66 [tablemanager:1, NULL, FALSE, NULL, border = 20 | frame = hsides]
67 [tablemanager:1, NULL, FALSE, NULL, title = My Table | bgcolor = yellow | border = 5 | frame = vsides]
68 ------------------------------------------------------------------------------------------------------
69
70 For more information please visit this page:
71
72 http://www.w3schools.com/tags/tag_table.asp
73
74 Whilst its easy enough to create tables manually, this module
75 allows you to avoid writing any code at all (so great for
76 non-programmers) and inserts your tables into the database so
77 any changes you make to a table will reflect on whatever pages
78 you have the table displayed on - which can be however many
79 pages you like. You can create as many tables as you like and
80 manage all of them in the admin screen.
81
82 It's now also possible to automatically create bar charts with
83 this module. When you create a new table you're given the option
84 to create it as a bar chart. There are several settings you can
85 apply as well, such as the high and low values acceptable to each
86 bar chart you create, plus the colour of the bars and theming/
87 display options.
88
89 You can edit your tables however you like;
90
91 o edit the header, table name and description
92 o allow end user to sort only on specified columns
93 (or have no sorting at all)
94 o set a column to be default for sorting when table
95 is first displayed (also set default for which
96 direction to sort in)
97 o add more rows
98 o edit all your data
99 o delete rows
100 o add and remove columns
101
102 In admin/menu you can enable a menu item which will list all
103 tables when a permissioned user/ administrator goes to:
104
105 http://www.yoursite.com/tablemanager
106
107 The user can then click on the links to be taken to the table
108 they wish to view. If you're permissioning users to be able to
109 create their own tables, this is where they'll appear - you
110 should also enable 'Display Administrative Links' in
111 admin/settings/tablemanager under 'Table List Screen Settings'
112 so these users can then manage the tables they have created.
113
114 ------
115 To do:
116 ------
117
118 o Add an 'invisible' setting so that a row isn't displayed in main display function but is still
119 present when a row is added/ edited (useful for comments? hiding old rows?)
120 o Perhaps add an automatic column of 'Submitted by' (if wanted? maybe as a data type?)
121 o Remove the requirement that a column *must* be sortable to be sorted - it's no longer necessary
122 and a nice feature to sort on a default column and not have to allow it be changed by an end user
123
124 Pobster

  ViewVC Help
Powered by ViewVC 1.1.2