1 <?xml version="1.0" encoding="UTF-8" ?>
3 This template is for other "list templates" and serves aas an example and most
4 of it is not yet implemented (e.g. the table join part).
6 @author Roland Haeder <webmaster@mxchange.org>
8 @copyright (c) 2003 - 2009 by Roland Haeder
9 @copyright (c) 2009 - 2011 by Mailer Developer Team
10 @license GNU GPL 2.0 or any newer version
11 @link http://www.mxchange.org
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
30 Call-back function, the extracted data from this XML will then be re-read
31 from that function. The most common function this XML uses is
32 adminListEntries() so mostly you can leave this alone unless you have JOINs.
33 Use adminListJoinEntries for JOINs:
35 <callback-function type="string" value="adminListEntries" />
39 Now we need information which template should be loaded and which functions
40 shall be called back. So lets start with the main list template. This mostly
41 requires no call-back function.
43 <list-template type="string" value="admin_list_foo_data" />
45 The template for all rows, mostly this name has a '_row' suffix and again,
46 no call-back function is usually required.
48 <list-row-template type="string" value="admin_list_foo_data_row" />
50 Message id to display if no entry could be found
52 <no-entry-found-message type="string" value="ADMIN_FOO_404" />
54 The table(s) we shall grab the data from, all as list.
58 A single table entry, with alias and without the configurable
59 _MYSQL_PREFIX. You can specify the table's name or alias later on.
61 <data-table type="string" alias="dt" value="data_table" />
63 A join condition to merge data from two or more tables, leave out
64 if you want to do simple SELECTs.
66 <table-join-condition>
68 The joining type, can be any valid SQL statement. Here it is an
69 INNER JOIN (from both tables the data must exist).
71 <table-join-type type="INNER JOIN" />
73 Name (and alias) of the table we want to join
75 <table-join-name name="foo_data" alias="fd" />
77 On which condition these tables should join
81 The left table, name can also be an alias, column is the column
84 <join-on-left-table type="string" name="dt" column="userid" />
86 Condition how these two tables should be joined.
88 <join-on-condition type="string" conditiion="EQUALS" />
90 And the corresponding right part.
92 <join-on-right-table type="string" name="fd" column="foo_userid" />
94 </table-join-condition>
96 Columns to perform the SELECT statement on, with alias and name plus which table.
98 <select-data-from-list>
100 A single entry with table name (can be left empty), value (must
101 always be set), alias (again can be left empty) and SQL function
102 (can also be left empty) which shall be applied on the column.
104 <select-data-from-list-entry type="string" table="dt" value="gender" alias="" function="" />
105 <select-data-from-list-entry type="string" table="dt" value="surname" alias="" function="" />
106 <select-data-from-list-entry type="string" table="dt" value="family" alias="" function="" />
107 <select-data-from-list-entry type="string" table="dt" value="last_online" alias="" function="" />
108 </select-data-from-list>
110 And the column list to perform the WHERE statement on.
112 <where-select-from-list>
114 A single entry to perform the WHERE statement on:
115 - table = table name (or alias)
116 - value = column name
117 - condition = look-up condition
118 - look-for = What to look for
120 <where-select-from-list-entry type="string" table="dt" value="userid" condition="EQUALS" look-for="$userid" />
122 How the next described column shall be logical linked to the above.
124 <where-condition type="string" condition="AND" />
126 The second column to perform the WHERE statement on. NOT-EQUALS is an alias for '!='.
128 <where-select-from-list-entry type="string" table="dt" name="status" condition="NOT-EQUALS" look-for="CONFIRMED" />
129 </where-select-from-list>
131 Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
135 A isingle entry to perform the ORDER BY statement on, see above WHERE entry for details.
137 <order-by-list-entry type="string" table="dt" order="userid" value="ASC" />
139 ORDER BY does also support more than one column, so we allow it here, too
141 <order-by-list-entry type="string" table="dt" order="foo_column" value="DESC" />
145 List all column names from the 'select-data-from-list' node here, but now
146 with call-back informations. The list must only contain those entries where
147 a call-back function shall be called for.
149 <column-callback-list>
151 A single entry for call-back informations. In this example we want to
152 "translate" the gender information into human-readable.
154 <column-callback-list-entry>
158 <column-callback-data type="string" value="gender" callback="translateGender" />
159 </column-callback-list-entry>
161 Another column, now we need a second parameter here because
162 generateDateTime() expects two parameters (first is always the data
165 <column-callback-list-entry>
167 The actual data, again.
169 <column-callback-data type="string" value="last_online" callback="generateDateTime" />
171 More parameters, remember that the first parameter is always given
172 and that it is the data from column.
174 <callback-extra-parameter-list>
176 A single parameter, 'type' can be one of 'float', 'int',
177 'bool', 'string'. 'array' is not yet supported.
179 <callback-extra-parameter-list-entry type="int" column="last_online" value="2" />
180 </callback-extra-parameter-list>
181 </column-callback-list-entry>
182 </column-callback-list>