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 The table(s) we shall grab the data from, all as list.
54 A single table entry, with alias and without the configurable
55 _MYSQL_PREFIX. You can specify the table's name or alias later on.
57 <data-table type="string" alias="dt" value="data_table" />
59 A join condition to merge data from two or more tables, leave out
60 if you want to do simple SELECTs.
62 <table-join-condition>
64 The joining type, can be any valid SQL statement. Here it is an
65 INNER JOIN (from both tables the data must exist).
67 <table-join-type type="INNER JOIN" />
69 Name (and alias) of the table we want to join
71 <table-join-name name="foo_data" alias="fd" />
73 On which condition these tables should join
77 The left table, name can also be an alias, column is the column
80 <join-on-left-table type="string" name="dt" column="userid" />
82 Condition how these two tables should be joined.
84 <join-on-condition type="string" conditiion="EQUALS" />
86 And the corresponding right part.
88 <join-on-right-table type="string" name="fd" column="foo_userid" />
90 </table-join-condition>
92 Columns to perform the SELECT statement on, with alias and name plus which table.
94 <select-data-from-list>
96 A single entry with table name (can be left empty), value (must
97 always be set), alias (again can be left empty) and SQL function
98 (can also be left empty) which shall be applied on the column.
100 <select-data-from-list-entry type="string" table="dt" value="gender" alias="" function="" />
101 <select-data-from-list-entry type="string" table="dt" value="surname" alias="" function="" />
102 <select-data-from-list-entry type="string" table="dt" value="family" alias="" function="" />
103 <select-data-from-list-entry type="string" table="dt" value="last_online" alias="" function="" />
104 </select-data-from-list>
106 And the column list to perform the WHERE statement on.
108 <where-select-from-list>
110 A single entry to perform the WHERE statement on:
111 - table = table name (or alias)
113 - condition = look-up condition
114 - look-for = What to look for
116 <where-select-from-list-entry type="string" table="dt" name="userid" condition="EQUALS" look-for="$userid" />
118 How the next described column shall be logical linked to the above.
120 <where-condition type="string" condition="AND" />
122 The second column to perform the WHERE statement on. NOT-EQUALS is an alias for '!='.
124 <where-select-from-list-entry type="string" table="dt" name="status" condition="NOT-EQUALS" look-for="CONFIRMED" />
125 </where-select-from-list>
127 Columns to perform the ORDER BY statement (GROUP BY is not yet supported)
131 A isingle entry to perform the ORDER BY statement on, see above WHERE entry for details.
133 <order-by-list-entry type="string" table="dt" order="userid" value="ASC" />
135 ORDER BY does also support more than one column, so we allow it here, too
137 <order-by-list-entry type="string" table="dt" order="foo_column" value="DESC" />
141 List all column names from the 'select-data-from-list' node here, but now
142 with call-back informations. The list must only contain those entries where
143 a call-back function shall be called for.
145 <column-callback-list>
147 A single entry for call-back informations. In this example we want to
148 "translate" the gender information into human-readable.
150 <column-callback-list-entry>
154 <column-callback-data type="string" value="gender" callback="translateGender" />
155 </column-callback-list-entry>
157 Another column, now we need a second parameter here because
158 generateDateTime() expects two parameters (first is always the data
161 <column-callback-list-entry>
163 The actual data, again.
165 <column-callback-data type="string" value="last_online" callback="generateDateTime" />
167 More parameters, remember that the first parameter is always given
168 and that it is the data from column.
170 <callback-extra-parameter-list>
172 A single parameter, 'type' can be one of 'float', 'int',
173 'bool', 'string'. 'array' is not yet supported.
175 <callback-extra-parameter-list-entry type="int" column="last_online" value="2" />
176 </callback-extra-parameter-list>
177 </column-callback-list-entry>
178 </column-callback-list>
180 Message id to display if no entry could be found
182 <no-entry-found-message type="string" value="ADMIN_SURFBAR_NO_URLS_FOUND" />