| verzia 1.48, 2004/12/13 21:12:54 |
verzia 1.49, 2005/04/03 09:55:43 |
|
|
| <!-- $Platon: phpMyEdit/doc/sgml/configuration.general.sgml,v 1.47 2004/12/08 16:21:17 nepto Exp $ --> |
<!-- $Platon: phpMyEdit/doc/sgml/configuration.general.sgml,v 1.48 2004/12/13 21:12:54 nepto Exp $ --> |
| |
|
| <sect1 id="configuration.mysql-options"> |
<sect1 id="configuration.mysql-options"> |
| <title id="configuration.mysql-options.title">Database connection</title> |
<title id="configuration.mysql-options.title">Database connection</title> |
| Riadok 199 top of the table. To display the executi |
|
| Riadok 199 top of the table. To display the executi |
|
| change the <varname>time</varname> value from <constant>false</constant> to |
change the <varname>time</varname> value from <constant>false</constant> to |
| <constant>true</constant>. Setting <varname>sort</varname> to |
<constant>true</constant>. Setting <varname>sort</varname> to |
| <constant>true</constant> is very helpful in understanding how cumulative |
<constant>true</constant> is very helpful in understanding how cumulative |
| sorting takes place. |
sorting takes place. Setting <varname>num_pages</varname> or <varname>num_records</varname> |
| |
to <constant>false</constant> will stop displaying corresponding values next to buttons. |
| |
These values can be displayed also using <varname>$opts['buttons']</varname> configuration array. |
| |
|
| </para> |
</para> |
| <para> |
<para> |
| Riadok 455 between navigation with graphic/text lin |
|
| Riadok 457 between navigation with graphic/text lin |
|
| selection. |
selection. |
| |
|
| </para> |
</para> |
| |
|
| |
<para> |
| |
|
| |
If you are not satisfied with order of buttons, or you want to remove certain buttons, |
| |
you can use <varname>$opts['buttons']</varname> option. In this option, you can specify |
| |
exact buttons to be displayed, even with custom ones. There are several common reasons |
| |
to remove some buttons: when having huge amount of pages, dropdown box creation is too long, |
| |
display save button only at the bottom of the page to force users to scroll through screeen before |
| |
adding a new record, and so on. |
| |
|
| |
</para> |
| |
|
| |
<para> |
| |
|
| |
Buttons on phpMyEdit pages can be divided into several groups. These groups then specify keywords |
| |
which are used when declaring a button in <varname>$opts['buttons']</varname>. If an element in |
| |
<varname>$opts['buttons']</varname> is not matching a keyword, it is translated using language files. |
| |
If an element is an array, it is outputed as a custom button, as shown below. |
| |
|
| |
<simplelist type=horiz columns=2> |
| |
<member> navigation </><member> <constant>first, <<, prev, <, next, >, last, >> </constant></> |
| |
<member> go to </><member> <constant>goto, goto_combo, goto_text </constant></> |
| |
<member> operation </><member> <constant>add, view, change, delete, copy </constant></> |
| |
<member> confirmation </><member> <constant>save, more, cancel </constant></> |
| |
<member> statistics </><member> <constant>current_page, total_pages, total_recs </constant></> |
| |
</simplelist> |
| |
|
| |
Navigation and go to group can be used in list or filter mode to jump several pages ahead or back. |
| |
Operation group moves user to another mode, namely one of ACPDV. Confirmation buttons are used to |
| |
confirm actions in ACPDV. While cancel is self explanatory, save and more might be confusing. |
| |
Save is used to confirm action and return to L mode. More means confirming action and return to |
| |
current mode. Save button is usually displayed as Save, however in D mode it is as Delete and in A |
| |
mode as Add. More is displayed as either More or Apply. Keywords in the statistics group display |
| |
numbers as their names suggest. |
| |
|
| |
</para> |
| |
|
| |
|
| |
<example><title>Default buttons</title> |
| |
<programlisting><![CDATA[ |
| |
$opts['buttons']['L']['up'] = array('<<','<','add','view','change','copy','delete','>','>>','goto','goto_combo'); |
| |
$opts['buttons']['L']['down'] = $opts['buttons']['L']['up']; |
| |
|
| |
$opts['buttons']['F']['up'] = array('<<','<','add','view','change','copy','delete','>','>>','goto','goto_combo'); |
| |
$opts['buttons']['F']['down'] = $opts['buttons']['F']['up']; |
| |
|
| |
$opts['buttons']['A']['up'] = array('save','more','cancel'); |
| |
$opts['buttons']['A']['down'] = $opts['buttons']['A']['up']; |
| |
|
| |
$opts['buttons']['C']['up'] = array('save','more','cancel'); |
| |
$opts['buttons']['C']['down'] = $opts['buttons']['C']['up']; |
| |
|
| |
$opts['buttons']['P']['up'] = array('save', 'cancel'); |
| |
$opts['buttons']['P']['down'] = $opts['buttons']['P']['up']; |
| |
|
| |
$opts['buttons']['D']['up'] = array('save','cancel'); |
| |
$opts['buttons']['D']['down'] = $opts['buttons']['D']['up']; |
| |
|
| |
$opts['buttons']['V']['up'] = array('change','cancel'); |
| |
$opts['buttons']['V']['down'] = $opts['buttons']['V']['up']; |
| |
]]></programlisting> |
| |
</example> |
| |
|
| |
<para> |
| |
|
| |
A button can be disabled for two reasons. A navigation button when there are no next or previous |
| |
pages or an operation button if certain operation is not permitted to the user. By default, all |
| |
disabled buttons are displayed and marked as disabled. If you do not want to show disabled buttons |
| |
at all, prepend '-' to keyword. If you want a disabled button to show as enabled, prepend '+'. |
| |
This will allow users to successfully push this button, however no meaningfull action will be taken. |
| |
|
| |
<simplelist type=horiz columns=2> |
| |
<member> <constant>next</constant></><member> -- show next button and mark disabled if appropriate</> |
| |
<member> <constant>-next</constant></><member> -- do not show next button if disabled</> |
| |
</simplelist> |
| |
|
| |
</para> |
| |
|
| |
<para> |
| |
|
| |
You may also specify custom buttons, which values can be used outside of phpMyEdit. The first way |
| |
to specify a custom button is to use phpMyEdit htmlSubmit method. In this way, value of this submit |
| |
button is translated using language files into user specified language. Possible configuration |
| |
is name, value, css class name, java script and disabled. |
| |
|
| |
<simplelist type=horiz columns=2> |
| |
<member> <constant>name</constant></><member> -- name of the submit button</> |
| |
<member> <constant>value</constant></><member> -- value of submit button</> |
| |
<member> <constant>css</constant></><member> -- css class name</> |
| |
<member> <constant>js</constant></><member> -- any other string place within button tags, mostly java script</> |
| |
<member> <constant>disabled</constant></><member> -- 1 button is disabled, 0 button is not disabled</> |
| |
</simplelist> |
| |
|
| |
|
| |
Second way of declaring custom buttons, is to declare actuall html code of the button. Note that |
| |
using this method, any html entity can be outputted. |
| |
|
| |
</para> |
| |
|
| |
<example><title>Custom buttons</title> |
| |
<programlisting><![CDATA[ |
| |
$opts['buttons']['V']['up'] = array( |
| |
'change', |
| |
'cancel', |
| |
array('name' => 'pme_back', 'value' => 'Back to main menu', 'css' => 'pme-backtomenu', 'disabled' =. false), |
| |
'Go to:', |
| |
array('code' => '<SELECT><OPTION>....</OPTION></SELECT>'), |
| |
); |
| |
$opts['buttons']['V']['down'] = $opts['buttons']['V']['up']; |
| |
]]></programlisting> |
| |
</example> |
| |
|
| |
<example><title>Buttons with large number of pages</title> |
| |
<programlisting><![CDATA[ |
| |
$opts['buttons']['L']['up'] = array( |
| |
'-<<', |
| |
'-<', |
| |
'Page', |
| |
'goto_text', |
| |
'of', |
| |
'total_pages', |
| |
'->', |
| |
'->>'); |
| |
); |
| |
$opts['buttons']['L']['down'] = $opts['buttons']['L']['up']; |
| |
$opts['display']['num_pages'] = false; |
| |
$opts['display']['num_records'] = false; |
| |
]]></programlisting> |
| |
</example> |
| |
|
| </sect1> |
</sect1> |
| |
|
| <sect1 id="configuration.filters"> |
<sect1 id="configuration.filters"> |