[TYPO3-dev] RFC: sql where clauses in API for static_info_tables
Franz Holzinger
franz at fholzinger.com
Wed Sep 6 14:08:38 CEST 2006
Hello,
I am going to extend the API functions and enable SQL where clauses for
all static database tables.
Here is a modified version of static_info_tables which relies on
http://fholzinger.com/uploads/media/T3X_div-0_0_5-z-200609061346.t3x :
(_this must be installed first!_)
http://fholzinger.com/uploads/media/T3X_static_info_tables-2_0_0-z-200609061358.t3x
/**
* Buils a HTML drop-down selector of countries, country subdivisions,
currencies or languages
*
* @param string Defines the type of entries to be presented in the
drop-down selector: 'COUNTRIES', 'SUBDIVISIONS', 'CURRENCIES' or 'LANGUAGES'
* @param string A value for the name attribute of the <select> tag
* @param string A value for the class attribute of the <select> tag
* @param string The value of the code of the entry to be pre-selected
in the drop-down selector: value of cn_iso_3, zn_code, cu_iso_3 or lg_iso_2
* @param string The value of the country code (cn_iso_3) for which a
drop-down selector of type 'SUBDIVISIONS' is requested (meaningful only
in this case)
* @param boolean/string If set to 1, an onchange attribute will be
added to the <select> tag for immediate submit of the changed value; if
set to other than 1, overrides the onchange script
* @param string A value for the id attribute of the <select> tag
* @param string A value for the title attribute of the <select> tag
* @param string A where clause for the records
* @return string A set of HTML <select> and <option> tags
*/
function buildStaticInfoSelector($type='COUNTRIES', $name='', $class='',
$selected='', $country='', $submit=0, $id='', $title='', $where='',
$local=FALSE) {
result:
The entries in the select boxes with static_countries can be reduced to
show only those countries to which the SQL WHERE clause applies.
I have made similar changes to the other functions.
I want to put it soon into TER.
Greets,
Franz
More information about the TYPO3-dev
mailing list