Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 14. október 2026

Rozdiely pre phpMyEdit/doc/sgml/configuration.fields.sgml medzi verziami 1.3 a 1.4

verzia 1.3, 2002/12/03 21:05:51 verzia 1.4, 2002/12/06 23:13:21
Riadok 1 
Riadok 1 
 <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.2 2002/11/07 20:52:10 nepto Exp $ -->  <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.3 2002/12/03 21:05:51 nepto Exp $ -->
   
   <!-- Categories:
   
   1. Basic options
   2. Booleans
   3. Input values restrictions
   4. Output control
   5. URL linking
   
   -->
   
 <sect1 id="configuration.fields-overview">  <sect1 id="configuration.fields-overview">
 <title id="configuration.fields-overview.title">Definition overview</title>  <title id="configuration.fields-overview.title">Definition overview</title>
 <para>  <para>
   
 Fields will be displayed in table columns left to right on the screen in the  Fields will be displayed in table columns left to right on the screen in the
 order in which they appear in the script.  order in which they appear in the script. Re-arrange the order of the arrays in
   order to alter the order in which columns are displayed.
   
 </para>  </para>
 <para>  <para>
   
 Re-arrange the order of the arrays in order to alter the order in which columns  Display of a particular column can also be suppressed. Below is an example of
 are displayed. Arrays look like this:  the array for a column named 'topic':
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Basic field definition</title>  <example><title>Basic field definition</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name'] = array(  $opts['fdd']['topic'] = array(
         'name'     => 'id',          'name'=>'Topic',
         'select'   => 'T',          'select'=>'T',
         'type'     => 'int',          'type'=>'string',
         'maxlen'   => 10,          'maxlen'=>100,
         'nowrap'   => false,          'nowrap'=>false,
         'required' => true,          'required'=>true,
         'sort'     => true          'sort'=>true
 );  );
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
Riadok 42  id when adding or updating records.
Riadok 53  id when adding or updating records.
   
 <example><title>Definition for autoincrement ID</title>  <example><title>Definition for autoincrement ID</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['options'] = 'R';  $opts['fdd']['col_name']['options'] = 'R';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect1>
   
 <sect1 id="configuration.name">  <sect1 id="configuration.basic-options">
   <title id="configuration.basic-options.title">Basic options</title>
   
   <sect2 id="configuration.name">
 <title id="configuration.name.title">Field name</title>  <title id="configuration.name.title">Field name</title>
 <para>  <para>
   
 The title used for column headings, etc.  When the MySQL column name is not appropriate for display as the title of the
   column in the displayed table, alternate text can be specified. To display the
   word 'Subject' instead of the name 'Topic' for the example column from previous
   chapter, add the following option to the script:
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Field name examples</title>  <example><title>Field name examples</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['name'] = 'ID';  $opts['fdd']['topic']['name'] = 'Subject';
 $fdd['col_name']['name'] = 'Editorial';  
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.select">  <sect2 id="configuration.type">
 <title id="configuration.select.title">Filter selection</title>  <title id="configuration.type.title">Field type</title>
 <para>  <para>
   
 Specify filter options for a field as text, drop-down, or multiple selection. If  This <varname>$opts['fdd']['col_name']['type']</varname> is generated by
 a column is a SET type, then this is automatically 'M'.  <filename>phpMyEditSetup.php</filename> and indicates the MySQL field type (best
   not edited). Type may appear as int, string, blob, etc., and should NOT be
   changed. Type 'int' is most common as the unique identifier is most often an
   integer value.
   
 </para>  </para>
   </sect2>
   
   <sect2 id="configuration.fields.select">
   <title id="configuration.fields.select.title">Selection boxes</title>
 <para>  <para>
   
   Specify field input type as text box, drop-down selection, or multiple
   selection. The same input type will be used also for table filtering.
   If a column is of type SET, ['select'] is automatically 'M'.
   
 <example><title>Filter selections</title>  <example><title>Filter selections</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['select'] = 'T'; // text  $opts['fdd']['col_name']['select'] = 'T'; // text
 $fdd['col_name']['select'] = 'D'; // drop down  $opts['fdd']['col_name']['select'] = 'D'; // drop down
 $fdd['col_name']['select'] = 'M'; // multiple selection  $opts['fdd']['col_name']['select'] = 'M'; // multiple selection
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.type">  <sect2 id="configuration.options">
 <title id="configuration.type.title">Field type</title>  <title id="configuration.options.title">Display options</title>
 <para>  <para>
   
 This $fdd['col_name']['type'] is generated by  An optional parameter to control whether a field is displayed in the add,
 <filename>phpMyEditSetup.php</filename> and indicates the MySQL field type (best  change, copy, delete, view, list, or filter views.
 not edited). Type may appear as int, string, blob, etc.  
   <simplelist type=horiz columns=2>
   <member> &nbsp; <constant>A</constant></><member> -- add</>
   <member> &nbsp; <constant>C</constant></><member> -- change</>
   <member> &nbsp; <constant>P</constant></><member> -- copy</>
   <member> &nbsp; <constant>V</constant></><member> -- view</>
   <member> &nbsp; <constant>D</constant></><member> -- delete</>
   <member> &nbsp; <constant>L</constant></><member> -- table list</>
   <member> &nbsp; <constant>F</constant></><member> -- table filter</>
   </simplelist>
   
   </para>
   <para>
   
   Additional column-specific options that apply to certain views or modes (add,
   change, delete, list) are:
   
   <simplelist type=horiz columns=2>
   <member> &nbsp; <constant>R</constant></><member> -- indicates a field is read only</>
   <member> &nbsp; <constant>P</constant></><member> -- indicates a field is a password field</>
   <member> &nbsp; <constant>H</constant></><member> -- indicates a field is to be hidden and marked as hidden</>
   </simplelist>
   
 </para>  </para>
   <para>
   
   <example><title>Another display options</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['options'] = 'H'; // hidden field
   $opts['fdd']['col_name']['options'] = 'P'; // password field
   $opts['fdd']['col_name']['options'] = 'R'; // read-only field
   ]]></programlisting>
   </example>
   
   </para>
   </sect2>
   
 </sect1>  </sect1>
   
 <sect1 id="configuration.required">  <sect1 id="configuration.booleans">
 <title id="configuration.required.title">Required fields</title>  <title id="configuration.booleans.title">Booleans</title>
 <para>  <para>
   
 If turned on, generate JavaScript to prevent null entries by the user.  All variables in following section should have only <constant>true</constant> or
   <constant>false</constant> value.
   
 </para>  </para>
   
   <sect2 id="configuration.required">
   <title id="configuration.required.title">Required fields</title>
 <para>  <para>
   
   By default, JavaScript will be generated to prevent null entries by the user. If
   an entry is not required for a particular field, change the setting to
   <constant>false</constant>.
   
 <example><title>Required fields</title>  <example><title>Required fields</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['required'] = true;  $opts['fdd']['col_name']['required'] = true;
 $fdd['col_name']['required'] = false;  $opts['fdd']['col_name']['required'] = false;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.sort">  <sect2 id="configuration.fields.sorting">
 <title id="configuration.sort.title">Field sorting</title>  <title id="configuration.fields.sorting.title">Sorting</title>
 <para>  <para>
   
 Allow users to sort the display on this column. Use "true" for enable, "false"  Allow users to sort the display on this column. Use "true" for enable, "false"
 for disable.  for disable.
   
   <example><title>Field sorting</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['sort'] = true;
   $opts['fdd']['col_name']['sort'] = false;
   ]]></programlisting>
   </example>
   
 </para>  </para>
   </sect2>
   
   <sect2 id="configuration.fields.strip-tags">
   <title id="configuration.fields.strip-tags.title">Striping tags</title>
 <para>  <para>
   
 <example><title>Field sorting</title>  If you are storing HTML and/or PHP content in you database columns, you may want
   to have <varname>$opts['fdd']['col_name']['strip_tags']</varname> variable
   turned on for particular fields. It will strip HTML and PHP tags from field
   content.
   
   <example><title>Striping tags</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['sort'] = true;  $opts['fdd']['col_name']['strip_tags'] = true;
 $fdd['col_name']['sort'] = false;  $opts['fdd']['col_name']['strip_tags'] = false;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
   </sect2>
   
 </sect1>  </sect1>
   
 <sect1 id="configuration.options">  <sect1 id="configuration.input-restrictions">
 <title id="configuration.options.title">Display options</title>  <title id="configuration.input-restrictions.title">Input restrictions</title>
 <para>  <para>
   
 An optional parameter to control whether a field is displayed in the A(dd),  You can restrict user input for selected fields to selected values. There are
 C(hange), (co)P(y), D(elete), V(iew), L(ist), or F(ilter) views.  several ways how to do it. All from them will be written in following section.
   
 </para>  </para>
   
   <!-- Subsections: Simple restriction | Table lookup | Column joining | Additional values -->
   
   <sect2><title>Simple restriction</title>
 <para>  <para>
   
 Another possible display options are:  Simple restriction means to restrict user input to the specified constants.
   Examples appear below.
   
   <example><title>Simple input restriction</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['values'] = array('','No','Yes'); // default is '' (nothing)
   $opts['fdd']['col_name']['values'] = array('','Yes','No'); // default is ''(nothing)
   $opts['fdd']['col_name']['values'] = array('0','1');       // default is 0
   $opts['fdd']['col_name']['values'] = array('A','B','C');   // default is A
   $opts['fdd']['col_name']['values'] = array('No','Yes');    // default is No
   $opts['fdd']['col_name']['values'] = array('Yes','No');    // default is Yes
   $opts['fdd']['col_name']['values'] = range(1,99);
   ]]></programlisting>
   </example>
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Another display options</title>  If a column is either SET or ENUM type, then the values are put in by
   <filename>phpMyEditSetup.php</filename> script.
   
   </para>
   </sect2>
   
   <sect2><title>Table lookup</title>
   <para>
   
   Variables <varname>$opts['fdd']['col_name']['values']['table']</varname> and
   <varname>$opts['fdd']['col_name']['values']['column']</varname> restricts user
   input to the values found in the specified column of another table.  The
   optional <varname>['values']['description']</varname> field allows the values
   displayed to the user to be different to those in the
   <varname>['values']['column']</varname> field.  This is useful for giving more
   meaning to column values.
   
   <example><title>Table lookup restriction</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['values']['table']       = 'extractTable';
   $opts['fdd']['col_name']['values']['column']      = 'extractColumn';
   $opts['fdd']['col_name']['values']['description'] = 'extractDescription'; // optional
   ]]></programlisting>
   </example>
   </para>
   </sect2>
   
   <sect2><title>Column joining</title>
   <para>
   
   It is also possible to have multiple fields in your description. For example to
   have two ones:
   
   <example><title>Advanced table lookup</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['options'] = 'H'; // hidden field  $opts['fdd']['col_name']['values']['description']['columns']['1'] = 'desc_column_1';
 $fdd['col_name']['options'] = 'P'; // password field  $opts['fdd']['col_name']['values']['description']['columns']['2'] = 'desc_column_2';
 $fdd['col_name']['options'] = 'R'; // read-only field  $opts['fdd']['col_name']['values']['description']['divs']['1']    = ' ';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
   <para>
   
   The 'div' component is what will be used as a divider between the columns in the
   display. You don't need to define the last 'div' field if it isn't required. So,
   for example if you have a series of people in a table, with a separate column
   for id, first name, and last name, you could use:
   
   <example><title>Complex table lookup example</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['values']['db'] = 'mydb'; // optional
   $opts['fdd']['col_name']['values']['table'] = 'mytable';
   $opts['fdd']['col_name']['values']['column'] = 'id';
   $opts['fdd']['col_name']['values']['description']['columns']['1'] = 'name_last';
   $opts['fdd']['col_name']['values']['description']['divs']['1']    = ', ';
   $opts['fdd']['col_name']['values']['description']['columns']['2'] = 'name_first';
   $opts['fdd']['col_name']['values']['filters'] = 'id in (1,2,3)'; // optional WHERE clause
   $opts['fdd']['col_name']['values']['orderby'] = 'last_name'; // optional ORDER BY clause
   ]]></programlisting>
   </example>
   
   </para>
   <para>
   
   Note that example above also contains another additional features, such as
   filtering values using <varname>['filters']</varname>, or ordering values using
   <varname>['orderby']</varname>.
   
   </para>
   </sect2>
   
   <sect2><title>Additional values</title>
   <para>
   
   Additional values to table lookup could be stored in
   <varname>['values2']</varname> array. The main difference between simple
   <varname>['values']</varname> usage is, that array keys will be stored into DB
   and array values will be printed out in input section boxes.
   
   </para>
   <para>
   
   <!-- TODO: REMOVE ME! -->
   Well, this need more clear description, but nobody except me understand how this
   works. :GRIN: -- Nepto
   
   </para>
   </sect2>
   
 </sect1>  </sect1>
   
 <sect1 id="configuration.width">  <sect1 id="configuration.output-control">
   <title id="configuration.output-control.title">Output control</title>
   
   <sect2 id="configuration.width">
 <title id="configuration.width.title">Field width</title>  <title id="configuration.width.title">Field width</title>
 <para>  <para>
   
Riadok 173  An optional display width specification
Riadok 361  An optional display width specification
   
 <example><title>Input field widths</title>  <example><title>Input field widths</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['width'] = '100px';  $opts['fdd']['col_name']['width'] = '100px';
 $fdd['col_name']['width'] = ($fdd['col_name']['trimlen'] * 8).'px';  $opts['fdd']['col_name']['width'] = ($opts['fdd']['col_name']['trimlen'] * 8).'px';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.maxlen">  <sect2 id="configuration.maxlen">
 <title id="configuration.maxlen.title">Maximum field length</title>  <title id="configuration.maxlen.title">Maximum field length</title>
 <para>  <para>
   
   <!-- OLD
 Maximum length of input boxes displayed for add/edit/search records.  Maximum length of input boxes displayed for add/edit/search records.
   -->
   
 <example><title>Field size</title>  Maximum length of input boxes displayed for Add / Change record mode may be set
   as pixels (px).
   
   <example><title>Field sizes</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['maxlen'] = '100px';  $opts['fdd']['col_name']['maxlen'] = '100px';
   $opts['fdd']['col_name']['maxlen'] = '150px';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 <para>  </sect2>
   
 <!-- This should have its own section, shouldn't it? -->  <sect2 id="configuration.textarea">
   <title id="configuration.textarea.title">Textarea sizes</title>
   <para>
   
 If the above setting does not work for you, you are probably trying to change  If the above setting does not work for you, you are probably attempting to
 textarea size. Than try something like:  change textarea size. It is also possible to specify the size of a textarea used
   to give multi-line input. Try something like:
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Textarea field height &amp; width</title>  <example><title>Textarea field height &amp; width</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['textarea']['rows'] = 1;  $opts['fdd']['col_name']['textarea']['rows'] = 1;
 $fdd['col_name']['textarea']['cols'] = 40;  $opts['fdd']['col_name']['textarea']['cols'] = 40;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.trimlen">  <sect2 id="configuration.trimlen">
 <title id="configuration.trimlen.title">Character length limit</title>  <title id="configuration.trimlen.title">Character length limit</title>
 <para>  <para>
   
   <!-- OLD
 Limit the number of characters displayed. This is useful when a table scrolls  Limit the number of characters displayed. This is useful when a table scrolls
 off the screen because many columns contain long strings.  off the screen because many columns contain long strings.
   -->
   
   If a table contains a number of text columns which each contain quite a bit of
   text, the table will likely scroll off the screen. This can be prevented by
   displaying only a portion of the content from a particular column.
   
 </para>  </para>
 <para>  <para>
   
   For example, to display only the first 30 characters from a column named
   'explanation', add the following:
   
 <example><title>Character length limit</title>  <example><title>Character length limit</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['trimlen'] = 100;  $opts['fdd']['explanation']['trimlen'] = 30;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 <para>  <para>
   
 This is the PHP equivalent of:  You may find it useful to limit the number of characters displayed for one or
 if strlen(value) > trimlen, display substr(,0,trimlen-3).'...';  more columns. This option is approximately equivalent to the following PHP
   statement:
   
   <screen>if(strlen($value) > $trimlen)) echo substr(,0,$trimlen-3).'...';</screen>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.nowrap">  <sect2 id="configuration.nowrap">
 <title id="configuration.nowrap.title">Wrapping</title>  <title id="configuration.nowrap.title">Wrapping</title>
 <para>  <para>
   
 Specify whether a field should get a NOWRAP when displayed in a table cell.  The 'nowrap' option essentially equivalent to the HTML markup &lt;td nowrap&gt;.
   
 </para>  
 <para>  
   
 <example><title>Wrapping</title>  <example><title>Wrapping</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['nowrap'] = true;  $opts['fdd']['col_name']['nowrap'] = true;
 $fdd['col_name']['nowrap'] = false;  $opts['fdd']['col_name']['nowrap'] = false;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.mask">  <sect2 id="configuration.mask">
 <title id="configuration.mask.title">Print mask</title>  <title id="configuration.mask.title">Print mask</title>
 <para>  <para>
   
Riadok 269  A string that is used by sprintf() to fo
Riadok 475  A string that is used by sprintf() to fo
   
 <example><title>Print mask field definition</title>  <example><title>Print mask field definition</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['mask'] = '';  $opts['fdd']['col_name']['mask'] = '';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.datemask">  <!--
   <sect2 id="configuration.datemask">
 <title id="configuration.datemask.title">Date mask</title>  <title id="configuration.datemask.title">Date mask</title>
 <para>  <para>
   
 A string that is used by date() to format date fields see PHP's date() for valid  A string that is used by PHP's date() command to format date fields. See PHP's
 formatting characters.  date() command for valid formatting characters.
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Date mask field definition</title>  <example><title>Date mask field definition</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['datemask'] = 'r';  $opts['fdd']['col_name']['datemask'] = 'r';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect1>  </sect2>
   
 <sect1 id="configuration.daterange">  <sect2 id="configuration.daterange">
 <title id="configuration.daterange.title">Date range</title>  <title id="configuration.daterange.title">Date range</title>
 <para>  <para>
   
 A range of numbers. Examples include:  A range of numbers which represent years. Examples include:
   
 </para>  
 <para>  
   
 <example><title>Date range field definition</title>  <example><title>Date range field definition</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['daterange']['start'] = 1996;  $opts['fdd']['col_name']['daterange']['start'] = 1996;
 $fdd['col_name']['daterange']['end'] = $fdd['col_name']['daterange']['start']+20;  $opts['fdd']['col_name']['daterange']['end']   = 2020;
   
   $opts['fdd']['col_name']['daterange']['start'] = 1996;
   $opts['fdd']['col_name']['daterange']['end'] = $opts['fdd']['col_name']['daterange']['start']+20;
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
   </sect2>
   -->
   
 </sect1>  </sect1>
   
 <sect1 id="configuration.URL">  <sect1 id="configuration.url-linking">
 <title id="configuration.URL.title">URL linking</title>  <title id="configuration.url-linking.title">URL linking</title>
 <para>  <para>
   
 Make a field 'clickable' in the display as "http://" or "mailto:".  Fields can be made 'clickable' in the display using <varname>['URL']</varname>
   variable. Primary examples follows:
   
 </para>  <example><title>Simple URL examples</title>
 <para>  
   
 <!-- TODO: should be rewritten, URLprefix and similar was forgotten -->  
 <example><title>URL linking examples</title>  
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['col_name']['URL'] = 'http:';  $opts['fdd']['col_name']['URL'] = 'http://$value';
 $fdd['col_name']['URLtarget'] ='_blank';  $opts['fdd']['col_name']['URL'] = 'mailto:$value';
 $fdd['col_name']['URL'] = 'mailto:';  
 $fdd['col_name']['URL'] is , e.g.:  
 $fdd['col_name']['URL'] = 'mailto:' or $fdd['col_name']['URL'] = 'http:';  
 $fdd['col_name']['URL'] = '$page?stuff';  
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  <!-- ANOTHER EXAMPLES:
 <para>  
   
 Note that the following are available as variables:  $opts['fdd']['col_name']['URL'] = 'http:';
   $opts['fdd']['col_name']['URLtarget'] ='_blank';
   $opts['fdd']['col_name']['URL'] = 'mailto:';
   $opts['fdd']['col_name']['URL'] is , e.g.:
   $opts['fdd']['col_name']['URL'] = 'mailto:' or $opts['fdd']['col_name']['URL'] = 'http:';
   $opts['fdd']['col_name']['URL'] = '$page?stuff';
   -->
   
 </para>  </para>
 <para>  <para>
   
 <variablelist><title>URL variables</title>  Note that the following are available as variables for usage in <varname>['URL']</varname>:
   
 <varlistentry>  
 <term><varname>$key</varname></term>  
 <listitem><para>key field for record</para></listitem>  
 </varlistentry>  
 <varlistentry>  
 <term><varname>$name</varname></term>  
 <listitem><para>name of the field</para></listitem>  
 </varlistentry>  
 <varlistentry>  
 <term><varname>$value</varname></term>  
 <listitem><para>value of the field</para></listitem>  
 </varlistentry>  
 <varlistentry>  
 <term><varname>$page</varname></term>  
 <listitem><para>this HTML page</para></listitem>  
 </varlistentry>  
 <varlistentry>  
 <term><varname>$row</varname></term>  
 <listitem><para>mysql_fetch_assoc() for this row</para></listitem>  
 </varlistentry>  
   
 </variablelist>  <simplelist type=horiz columns=2>
   <member> &nbsp; <varname>$key</varname></><member> -- key field for record</>
   <member> &nbsp; <varname>$name</varname></><member> -- name of the field</>
   <member> &nbsp; <varname>$value</varname></><member> -- value of the field</>
   <member> &nbsp; <varname>$page</varname></><member> -- this HTML page</>
   <member> &nbsp; <varname>$row</varname></><member> -- <function>mysql_fetch_assoc()</function> for this row</>
   
 </para>  </simplelist>
 </sect1>  
   
 <sect1 id="configuration.values">  </para>
 <title id="configuration.values.title">Field values</title>  
 <para>  <para>
   
 <!-- TODO: values2 -->  To open a link in a new web browser window use:
   
 Restricts user input to the specified constants. Examples appear below.  <example><title>URL target example</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['URLtarget'] ='_blank';
   ]]></programlisting>
   </example>
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Field values</title>  To display alternative link text use:
 <programlisting><![CDATA[  
 $fdd['col_name']['values'] = array('','No','Yes');  
 $fdd['col_name']['values'] = array('','Yes','No');  
 $fdd['col_name']['values'] = array('0','1'); // default is 0  
 $fdd['col_name']['values'] = array('A','B','C'); // default is A  
 $fdd['col_name']['values'] = array('No','Yes'); // default is No  
 $fdd['col_name']['values'] = array('Yes','No'); // default is Yes  
 $fdd['col_name']['values'] = range(1,99);  
   
 $fdd['thisTableName']['values']['table']  = 'extractTable';  
 $fdd['thisTableName']['values']['column'] = 'extractColumn';  
   
 // For selecting more than one column in table lookup use construction like  
 // this one. Note that you may specify separators (divs) between fields as well.  
 $fdd['col_name']['values']['description']['columns']['1'] = 'desc_column_1';  
 $fdd['col_name']['values']['description']['columns']['2'] = 'desc_column_2';  
 $fdd['col_name']['values']['description']['divs']['1'] = ' ';  
 ]]></programlisting>  
 </example>  
   
 <!-- this sh*t must be DocBook'ed  
   
 $fdd['col_name']['values']['table'] and $fdd['col_name']['values']['column'] restricts user  
 input to the values found in the specified column of another table.  
  The optional ['values']['description'] field allows the value(s) displayed  
  to the user to be different to those in the ['values']['column'] field.  
  This is useful for giving more meaning to column values.  There are two main  
  options when using the ['values']['description'] field. These are whether you  
  want to use a single, or multiple field in your description.  To apply single,  
  you need to use:  
  $fdd['col_name']['values']['description'] = 'desc_column'  
  This may be used, with no other options, and will simply display the description  
  for the corresponding value.  
  For Multiple, use:  
  $fdd['col_name']['values']['description']['columns']['1'] = 'desc_column_1'  
  $fdd['col_name']['values']['description']['divs']['1']    = ' '  
  $fdd['col_name']['values']['description']['columns']['2'] = 'desc_column_2'  
  The 'div' component is what will be used as a divider between the columns  
  in the display.  You don't need to define the last 'div' field if it isn't  
  required.  So, for example...if you have a series of people in a  
  table, with a separate column for id, first name, and last name, you could  
  use:  
 $fdd['col_name']['values']['db']='mydb' *optional if table is in another database*  
 $fdd['col_name']['values']['table']='mytable'  
  $fdd['col_name']['values']['column']='id'  
  $fdd['col_name']['values']['description']['columns']['1']='name_last'  
  $fdd['col_name']['values']['description']['divs']['1']   =', '  
  $fdd['col_name']['values']['description']['columns']['2']='name_first'  
 $fdd['col_name']['values']['filters']='idcolumn in (1,2,3)' *optional WHERE clause*  
  $fdd['col_name']['values']['orderby']='last_name' *optional ORDER BY clause*  
 if a column is either SET or ENUM type, then the values are put in  
 by PME Setup.  
   
 -->  <example><title>URL display example</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['URL']['URLdisp'] = 'Launch Page';
   ]]></programlisting>
   </example>
   
   </para>
   <para>
   
   Old 3.5 behaviour is also supported via <varname>['URLprefix']</varname>. It
   will prepend string before. Variable <varname>['URLpostfix']</varname> similary
   to <varname>['URLprefix']</varname> will append string after.
   
 </para>  </para>
 </sect1>  </sect1>
   
 <sect1 id="configuration.calculated-expressions">  <!-- ----- -->
   
   <!--
   <sect2 id="configuration.calculated-expressions">
 <title id="configuration.calculated-expressions.title">Calculated expressions</title>  <title id="configuration.calculated-expressions.title">Calculated expressions</title>
 <para>  <para>
   
 <example><title>Calculated expressions</title>  <example><title>Calculated expressions</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $fdd['other']['name']='Col Header';  $opts['fdd']['other']['name']='Col Header';
 $fdd['other']['expression']='onHand-ordered';  $opts['fdd']['other']['expression']='onHand-ordered';
 $fdd['other']['sort']='T:!';  $opts['fdd']['other']['sort']='T:!';
 $fdd['other']['select']='T';  $opts['fdd']['other']['select']='T';
 $fdd['other']['type']='int';  $opts['fdd']['other']['type']='int';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
Riadok 460  $fdd['other']['type']='int';
Riadok 617  $fdd['other']['type']='int';
   
 <itemizedlist>  <itemizedlist>
 <listitem><para>  <listitem><para>
 'other' can be anything, but needs to be unique within the list of $fdd keys  'other' can be anything, but needs to be unique within the list of $opts['fdd'] keys
 </para></listitem>  </para></listitem>
 <listitem><para>  <listitem><para>
 'expression' can be any valid MySQL expression  'expression' can be any valid MySQL expression
Riadok 477  All other options work as with other, no
Riadok 634  All other options work as with other, no
 always read-only.  always read-only.
   
 </para>  </para>
 </sect1>  </sect2>
   -->
   

Legend:
Odstranené z verzie1.3  
zmenené riadky
  Pridané vo verzii1.4

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok