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.general.sgml medzi verziami 1.1 a 1.2

verzia 1.1, 2002/11/03 23:47:00 verzia 1.2, 2002/12/03 21:05:51
Riadok 1 
Riadok 1 
 <!-- $Platon: phpWebFileManager/doc/sgml/introduction.sgml,v 1.4 2002/10/16 21:19:21 nepto Exp $ -->  <!-- $Platon: phpMyEdit/doc/sgml/configuration.general.sgml,v 1.1 2002/11/03 23:47:00 nepto Exp $ -->
   
 <sect2 id="configuration.mysql-options">  <sect1 id="configuration.mysql-options">
 <title id="configuration.mysql-options.title">MySQL connection</title>  <title id="configuration.mysql-options.title">Database connection</title>
 <para>  <para>
   
 Various options are configured near the top of the script, most notably the  Various options are configured near the top of the script, most notably the
 database logon which you may want to copy/paste to a separate included file.  database logon. For security reasons, you may want to copy/paste the logon
   options to a separate, included file.
   
 </para>  </para>
 <para>  <para>
   
 MySQL logon options host name, user name, password, database, and table appear  MySQL logon options host name, user name, password, database, and table appear
 in the following format.  in the following format.
   
 </para>  </para>
 <para>  <para>
   
 <example><title>MySQL connection options</title>  <example><title>Database connection options</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['hn'] = 'localhost';  $opts['hn'] = 'localhost';
 $opts['un'] = 'username';  $opts['un'] = 'username';
Riadok 27  $opts['tb'] = 'table';
Riadok 28  $opts['tb'] = 'table';
 </example>  </example>
   
 </para>  </para>
 </sect2>  <para>
   
   It is recommended that the first four options shown above be moved to a
   separate, included file.
   
 <sect2 id="configuration.unique-key">  </para>
   </sect1>
   
   <sect1 id="configuration.unique-key">
 <title id="configuration.unique-key.title">Unique key</title>  <title id="configuration.unique-key.title">Unique key</title>
 <para>  <para>
   
   <!-- OLD
 The unique identifier, or record ID, chosen should appear as something like:  The unique identifier, or record ID, chosen should appear as something like:
   -->
   
   Assuming that 'id' is the name of the MySQL column selected as the unique
   identifier when <filename>phpMyEditSetup.php</filename> was run, the key
   will appear in the script as:
   
 </para>  </para>
 <para>  <para>
Riadok 46  $opts['key'] = 'id';
Riadok 59  $opts['key'] = 'id';
 </example>  </example>
   
 </para>  </para>
 </sect2>  
   
 <sect2 id="configuration.unique-key-type">  
 <title id="configuration.unique-key-type.title">Key type</title>  
 <para>  <para>
   
   <!-- OLD
 The column type of the ID field should appear something like:  The column type of the ID field should appear something like:
   -->
   
   The column type for the unique numeric identifier should appear as:
   
 </para>  </para>
 <para>  <para>
Riadok 67  $opts['key_type'] = 'int';
Riadok 80  $opts['key_type'] = 'int';
 </para>  </para>
 <para>  <para>
   
 The argument indicates whether the chosen column type is int, real, string,  The argument 'int' shown above indicates the column type is an integer. If the
 date, etc.  column type was a date then 'date' would appear above instead of 'int'. Other
   possible unique key types are 'real' or 'string'.
   
 </para>  </para>
 </sect2>  
   
 <sect2 id="configuration.permission-options">  <important><para>
 <title id="configuration.permission-options.title">Permission options</title>  
 <para>  
   
 Available user options include: A - Add, C - Change, P - Copy, V - View, D -  If you are using 'real' key type and some problems with record manipulaton have
 Delete, F - Filter (search), I - Initial sort suppressed.  occured, it is probably because you MySQL key datatype is 'float'.  Comparsions
   with this datatype is common problem in most computer languages (SQL including),
   because floating-point values are not exact values.  In most cases, changing
   MySQL datatype from 'float' to 'double' and preserving 'real' as &name; key type
   should solve this problem.
   
 </para>  </para>
 <para>  <para>
   
 Full privileges to manipulate records is configured as:  For more information about this issue, read "Solving Problems with No Matching
   Rows" chapter in MySQL manual (in version 3.23.47 it was A.5.6).
   
   </para></important>
   
   </sect1>
   
   <sect1 id="configuration.common-options">
   <title id="configuration.common-options.title">Common options</title>
   
   <sect2 id="configuration.displayed-records">
   <title id="configuration.displayed-records.title">Displayed records</title>
   <para>
   
   Option controls the number of records displayed on the screen. Change the
   argument for <varname>$opts['inc']</varname> in order to specify the maximum
   number of rows to display at one time. The default is 15 rows. To display all
   found records, specify a value of -1 (negative 1).
   
   <example><title>Displayed records</title>
   <programlisting><![CDATA[
   $opts['inc'] = 20;  // list 20 records per page
   
   $opts['inc'] = -1; // list all found records
   ]]></programlisting>
   </example>
   
 </para>  </para>
   </sect2>
   
   <sect2 id="configuration.multiple-selections">
   <title id="configuration.multiple-selections.title">Multiple selections</title>
 <para>  <para>
   
 <example><title>Full permissions</title>  <!-- OLD:
   Specifies the number of lines to display on multiple selection filters.
   -->
   
   This option affects the display of &lt;SELECT MULTIPLE&gt; boxes.  If the MySQL
   column type is <!-- ENUM or -->"set", the number of lines displayed on multiple
   selection filters is specified as:
   
   <example><title>Multiple selections option</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['options'] = 'ACPVDF';  $opts['multiple'] = '4'; // default is 4
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 <para>  <para>
   
 To deny the end user the ability to delete records use:  Setting <varname>$opts['multiple']</varname> to a large number may adversely
   affect the appearance of your form. Four (4) is the default.
   
 </para>  </para>
   </sect2>
   
   <sect2 id="configuration.page-elements">
   <title id="configuration.page-elements.title">Special page elements</title>
 <para>  <para>
   
 <example><title>Full permissions without delete</title>  There are some special page elements, that may be turned on or off by changing
   <varname>$opts['display']</varname> array.
   
   </para>
   <para>
   
   Setting the <varname>query</varname> or <varname>sort</varname> values to
   <constant>true</constant> will display the current query or sort order near the
   top of the table. To display the execution time of the query below the table,
   change the <varname>time</varname> value from <constant>false</constant> to
   <constant>true</constant>.  Setting <varname>sort</varname> to
   <constant>true</constant> is very helpful in understanding how cumulative
   sorting takes place.
   
   </para>
   <para>
   
   To display all these page elements use:
   
   <example><title>Special page elements</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['options'] = 'ACPVF';  $opts['display'] = array(
           'query' => true,
           'sort'  => true,
           'time'  => true
   );
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect2>  </sect2>
   
 <sect2 id="configuration.displayed-records">  <sect2 id="configuration.urls">
 <title id="configuration.displayed-records.title">Displayed records</title>  <title id="configuration.urls.title">Images URL</title>
 <para>  <para>
   
 Controls the number of records displayed on the screen.  If graphic links are selected with navigation (for example by setting
   <varname>$opts['navigation']</varname> to <constant>'GD'</constant>) then
   <varname>$opts['url']</varname> can be used to specify the folder containing
   images. The default image location is normally one folder (or directory level) below the
   location of the <filename>phpMyEdit.class.php</filename> file.
   
   <example><title>Images URL</title>
   <programlisting><![CDATA[
   $opts['url'] = array('images' => 'images/');
   ]]></programlisting></example>
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Displayed records</title>  Other URLs for another elements may be added into this array in future.
 <programlisting><![CDATA[  
   
 $opts['inc'] = -1; // list all found records  </para>
   </sect2>
   
 $opts['inc'] = 5;  // list 5 records per page  <sect2 id="configuration.code-execution">
   <title id="configuration.code-execution.title">Code execution</title>
   <para>
   
 ]]></programlisting>  Since version 4.0 &name; will automatically starts its execution.
 </example>  
   You can turn this feature off by setting:
   
   <example><title>Turning off default execution</title>
   <programlisting><![CDATA[
   $opts['execute'] = 0;
   ]]></programlisting></example>
   
   </para>
   <para>
   
   If variable <varname>$opts['execute']</varname> is not defined, its value is
   considered as <constant>1</constant>.
   
 </para>  </para>
 </sect2>  </sect2>
   
 <sect2 id="configuration.multiple-selections">  </sect1>
 <title id="configuration.multiple-selections.title">Multiple selections</title>  
   <sect1 id="configuration.permission-options">
   <title id="configuration.permission-options.title">Permission options</title>
 <para>  <para>
   
 Specifies the number of lines to display on multiple selection filters.  Commonly used options include:
   <!-- OLD
   A - add, C - change, P - copy, V - view, D - delete, F - filter (search), I - initial sort suppressed.
   -->
   
   <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>F</constant></><member> -- filter (search)</>
   <member> &nbsp; <constant>I</constant></><member> -- initial sort suppressed</>
   </simplelist>
   
 </para>  </para>
 <para>  <para>
   
 <example><title>Multiple selections option</title>  Table listing is always enabled, since all actions are executed from this
   screen. But it is possible to get specific behaviours without table listing
   using appropriate &name; extension. See <xref endterm="extensions.title"
   linkend="extensions"> chapter for more information.
   
   </para>
   <para>
   
   Full privileges to manipulate records are configured as:
   
   <example><title>Full permissions</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['multiple'] = '4'; // default is 4  $opts['options'] = 'ACPVDF';
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect2>  <para>
   
 <sect2 id="configuration.sort-field">  To deny the user the ability to delete records use:
 <title id="configuration.sort-field.title">Sort field</title>  
   <example><title>Full permissions without delete</title>
   <programlisting><![CDATA[
   $opts['options'] = 'ACPVF';
   ]]></programlisting>
   </example>
   
   </para>
 <para>  <para>
   
 The field to sort on is initially defined as 'id' in the example below.  To limit the user to view, sort, list, or filter records use this:
 Initially, this is set to the unique identifier or record ID column chosen  
 earlier. In the example below, you would change 'id' to the name of the column  <example><title>Read only permissions</title>
 that you'd prefer to sort on when the script is first loaded.  <programlisting><![CDATA[
   $opts['options'] = 'VFL';
   ]]></programlisting>
   </example>
   
 </para>  </para>
 <para>  <para>
   
   In a multi-user environment, it would be wise to only provide the system
   administrator with the ability to delete records.
   
   </para>
   </sect1>
   
   <sect1 id="configuration.sorting">
   <title id="configuration.sorting.title">Sorting</title>
   <para>
   
   &name; offers powerful default and/or additional sorting capabilities via
   <varname>$opts['sort_field']</varname> option. You can define column name or
   column field number you'd prefer to sort on when the script is first loaded. To
   get descending sort order, prefix column name or field number with dash (-)
   sign. Look at few following examples:
   
 <example><title>Sort field option</title>  <example><title>Sort field option</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['sort_field'] = 'id';  $opts['sort_field'] = 'company'; // sorting according company field
   $opts['sort_field'] = 3;         // sorting according 4th field
   $opts['sort_field'] = '-id';     // descending sorting according id field
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect2>  
   
 <sect2 id="configuration.navigation">  
 <title id="configuration.navigation.title">Navigation</title>  
 <para>  <para>
   
 The generated form will have various buttons (Next, Prev, Save, Cancel, etc.).  Now, let's assume you want to sort your table according to 'company' column, but
 Their location relative to the table can be changed.  in addition also according to 'department' column. So the default sort order
   should be by company first, then department. For this purpose, you can set array
   with column names and/or field numbers to <varname>$opts['sort_field']</varname>
   variable.
   
   <example><title>Multiple sort fields</title>
   <programlisting><![CDATA[
   $opts['sort_field'] = array('company', 'department');
   ]]></programlisting>
   </example>
   
 </para>  </para>
 <para>  <para>
   
 Button positions are U (up / above table) or D (down / below table is the  Also note, that &name; sorting feature is cumulative. This exactly mean, that if
 default)  default sort fields are specified and user selects (clicks) to sort by another
   column in table listing screen, resulting screen will be sorted by user selected
   column first and than by specified default sort fields. Next click on another
   sort column will again force to sort table by selected column first. Previously
   selected fields or default ones will follow up in sorting sequence.
   
 </para>  </para>
 <para>  <para>
   
 - combined with -  This feature enables selecting more than one sort field on the fly. To clear
   sort fields sequence and to initialize default ones, click on
   <GUIlabel>Clear</GUIlabel> link in left upper corner. This link could be enabled
   by setting <varname>$opts['display']['sort']</varname> to
   <constant>true</constant>. See <xref linkend="configuration.page-elements"
   endterm="configuration.page-elements.title"> section for more information. We
   also recommend you to enable this option to see how this described sorting
   feature works.
   
 </para>  </para>
   </sect1>
   
   <sect1 id="configuration.navigation">
   <title id="configuration.navigation.title">Navigation</title>
 <para>  <para>
   
 navigation style: B (buttons, default) or T (text links) or G (graphic links).  The style and location of navigational links is a combined setting. The
   generated form will have various buttons, such as <GUIbutton>Next</GUIbutton>,
   <GUIbutton>Prev</GUIbutton>, <GUIbutton>Save</GUIbutton>,
   <GUIbutton>Cancel</GUIbutton>, etc. Their location relative to the table can be
   changed. Button positions are:
   
   <simplelist type=horiz columns=2>
   <member> &nbsp; <constant>U</constant></><member> -- up / above table</>
   <member> &nbsp; <constant>D</constant></><member> -- down / below table (default)</>
   </simplelist>
   
 </para>  </para>
 <para>  <para>
   
 Possible combinations include:  Button possitions should be combined with navigation styles. The style of
   navigational links may be text, buttons, or graphic images (icons):
   
   <simplelist type=horiz columns=2>
   <member> &nbsp; <constant>B</constant></><member> -- buttons (default)</>
   <member> &nbsp; <constant>T</constant></><member> -- text links</>
   <member> &nbsp; <constant>G</constant></><member> -- graphic links</>
   </simplelist>
   
 </para>  </para>
 <para>  <para>
   
   Possible combinations include:
   
 <example><title>Navigation possibilities</title>  <example><title>Navigation possibilities</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['navigation'] = 'DB'; // buttons below table  $opts['navigation'] = 'DB'; // buttons below table
Riadok 211  $opts['navigation'] = 'DG'; // graphics
Riadok 405  $opts['navigation'] = 'DG'; // graphics
 $opts['navigation'] = 'UB'; // buttons above table  $opts['navigation'] = 'UB'; // buttons above table
 $opts['navigation'] = 'UT'; // text links above table  $opts['navigation'] = 'UT'; // text links above table
 $opts['navigation'] = 'UG'; // graphics above table  $opts['navigation'] = 'UG'; // graphics above table
   
   $opts['navigation'] = 'UDBTG' // all navigations styles
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect2>  
   
 <sect2 id="configuration.page-elements">  
 <title id="configuration.page-elements.title">Special page elements</title>  
 <para>  
   
 Display special page elements.  
   
 </para>  
 <para>  <para>
   
 <example><title>Special page elements</title>  As you can see from the last example in box above, all navigation styles can be
 <programlisting><![CDATA[  mixed up together to fit your needs. There is no functionality difference
 $opts['display'] = array(  between navigation with graphic/text links and navigation using radio buttons
         'query' => false,  selection.
         'sort'  => false,  
         'time'  => false  
 );  
 ]]></programlisting>  
 </example>  
   
 </para>  </para>
 </sect2>  </sect1>
   
 <sect2 id="configuration.filters">  <sect1 id="configuration.filters">
 <title id="configuration.filters.title">Filters</title>  <title id="configuration.filters.title">Filters</title>
 <para>  <para>
   
Riadok 252  from table.
Riadok 434  from table.
   
 <example><title>Filter examples</title>  <example><title>Filter examples</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
   
 $opts['filters'] = 'column1 like '%11%' AND column2 < 17';  $opts['filters'] = 'column1 like '%11%' AND column2 < 17';
   
 $opts['filters'] = 'section_id = 9';  $opts['filters'] = 'section_id = 9';
   
 $opts['filters'] = 'Table0.sessions_count > 200';  $opts['filters'] = 'Table0.sessions_count > 200';
   
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
 </sect2>  </sect1>
   
 <sect2 id="configuration.triggers">  <sect1 id="configuration.triggers">
 <title id="configuration.triggers.title">Triggers</title>  <title id="configuration.triggers.title">Triggers</title>
 <para>  <para>
   
Riadok 336  $opts['triggers']['delete']['after'] ='c
Riadok 516  $opts['triggers']['delete']['after'] ='c
 </example>  </example>
   
 </para>  </para>
 </sect2>  </sect1>
   
 <sect2 id="configuration.logging">  <sect1 id="configuration.logging">
 <title id="configuration.logging.title">Logging user actions</title>  <title id="configuration.logging.title">Logging user actions</title>
 <para>  <para>
   
Riadok 370  CREATE TABLE changelog (
Riadok 550  CREATE TABLE changelog (
 </example>  </example>
   
 </para>  </para>
 </sect2>  </sect1>
   
 <sect2 id="configuration.languages">  <sect1 id="configuration.languages">
 <title id="configuration.languages.title">Languages</title>  <title id="configuration.languages.title">Languages</title>
 <para>  <para>
   
 Get the user's default language and use it if possible or you can specify  The default language setting is the user's web browser language setting and use
 language particular one you want to use. Available languages are: DE EN-US EN FR  it if possible. The following example forces the English language version, and
 IT NL PG SK SP.  the last forces the Slovak language version.
   
 </para>  
 <para>  
   
 <example><title>Log table schema</title>  <example><title>Languages selection</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[
 $opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']; // server language  // client language (default)
 $opts['language'] = 'EN'; // english language  $opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
 $opts['language'] = 'SK'; // slovak language  
   $opts['language'] = 'EN'; // forces english language
   $opts['language'] = 'SK'; // forces slovak language
 ]]></programlisting>  ]]></programlisting>
 </example>  </example>
   
 </para>  </para>
   <para>
   
   Available languages are:
   
   <simplelist type=horiz columns=2>
   <member><constant>DE</constant></><member> &nbsp; german (standard)</>
   <member><constant>EN-US</constant></><member> &nbsp; english (United States)</>
   <member><constant>EN</constant></><member> &nbsp; english</>
   <member><constant>FR</constant></><member> &nbsp; french (standard)</>
   <member><constant>IT</constant></><member> &nbsp; italian (standard)</>
   <member><constant>NL</constant></><member> &nbsp; dutch (standard)</>
   <member><constant>PG</constant></><member> &nbsp; ??? (does someone know?)</>
   <member><constant>PL</constant></><member> &nbsp; polish</>
   <member><constant>RU</constant></><member> &nbsp; russian</>
   <member><constant>SK</constant></><member> &nbsp; slovak</>
   <member><constant>SP</constant></><member> &nbsp; spanish</>
   </simplelist>
   
   </para>
   </sect1>
   
   <sect1 id="configuration.cgi-variables">
   <title id="configuration.cgi-variables.title">CGI variables</title>
   <para>
   
   You can optionally append or overwrite particular variables returned from CGI
   environment (GET/POST HTTP protocol data). Use these two arrays for this
   purpose, where array key mean CGI variable name and value means CGI variable
   value.
   
   </para>
   <para>
   
   This will cause descending sorting according first field if other type of sort
   was not specified/selected by user.
   
   <example><title>CGI variables appending</title>
   <programlisting><![CDATA[
   $opts['cgi']['append'] = array('sfn' => '-0');
   ]]></programlisting></example>
   
   </para>
   <para>
   
   This will cause the same sort allways in all cases.
   
   <example><title>CGI variables overwriting</title>
   <programlisting><![CDATA[
   $opts['cgi']['overwrite'] = array('sfn' => '-0');
   ]]></programlisting></example>
   
   </para>
   <para>
   
   Support for preserving some CGI variables using
   <varname>$opts['cgi']['persist']</varname> is planned in near future.
   
   </para>
   </sect1>
   
   <!--
   
   <sect1 id="configuration.other-options">
   <title id="configuration.other-options.title">Other options</title>
   
   <sect2 id="configuration.multiple-selections">
   <title id="configuration.multiple-selections.title">Action depended field
   configuration</title>
   <para>
   
   </para>
 </sect2>  </sect2>
   
   </sect1>
   
   -->
   

Legend:
Odstranené z verzie1.1  
zmenené riadky
  Pridané vo verzii1.2

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