Extensions There are often situations, when more specific functionality is needed from &name;. You will surely agree, that it will be really strange to hardcode all these particular requirements into the core &name; class. For this reason the extension mechanism is provided. Overview Extensions are &name;_<something> classes, where <something> is an appropriate extension name. They not only extend base &name; class, but they also add new functionality. But they may not only add new things. It is possible also to disable such features, simply to get the desirable behaviour. In addition to common &name; configuration options, extension configuration is usually provided by $opts['ext'] associative array. Possible keys are described on particular extension pages in this manual. Please refer to them to get more information. Extensions are currently not part of &name; distribution. They are only in CVS repository, because they are still under development and they are changing a lot. This manual chapter is provided for letting &name; users know, that something like this exists. The only way how to get extension files is to fetch them from CVS. All extensions need to be placed under the extensions/ subdirectory below the &name; core class location. Several new extensions are planned to create or handle more or less specific tasks, especially those which are not appropriate for the &name; core class. You can feel absolutely free to improve existing extensions, suggest new improvements for them, or create new extensions to fit your own needs. We will be happy to add them to repository. &name;-slide &name;-slide can create slideshow with ability to view and/or edit records. Everytime is exactly one record shown. Record can be displayed in view or edit mode. View mode looks like "view" functionality in normal &name;, change mode looks like "change" functionality in normal &name;. The only difference is that two buttons, Prev and Next, are displayed in addition to common view/edit buttons to provide ability of going to the next or previous record. This extension purpously disable "add", "copy", "delete", and "table listing" functionalities. Here are configuration variables related to extension. All of these &name;-slide options are optional.   $opts['ext']['rec'] -- primary key value of record to display initially   $opts['ext']['next_disable'] -- disable Next button   $opts['ext']['prev_disable'] -- disable Prev button Following variables are not options, but they are used internally by extension. They can be used for getting some information for example in triggers.   $opts['ext']['next'] -- primary key value of next record   $opts['ext']['prev'] -- primary key value of previous record To use this extension you have to include extensions/&name;-slide.class.php file and call new &name;_slide($opts) instead of common &name; class file. &name;-report &name;-report extension is provided for easy table report creation. There is often a need for selecting particular fields from table with applying specific filter options and finally write out chosen subset of data (report) to HTML page. Navigation is easy to use. Field selection menu would be displayed if fields_select parameter is passed by GET or POST HTTP method to PHP script and it has non-empty value. This field selection menu contains list of checkboxes connected with columns, list of filtering input fields and also button for report creation. Every report page has ability to return back into field selection. It is possible to specify amount of records on report page, what is by default set to unlimited. Extension can completelly work without cookies. However it uses cookies to have a memory, where last selected report is stored. When user leaves report PHP script and comes back after some time, a last selected report should be predefined in checkboxes and input fields on fields selection screen. Detection for cookie usage is done automatically. If HTTP headers was already sent, cookies are not used, because they will cause an ugly warning. Otherwise cookies are used for described kind of memory. To use this extension simply include extensions/&name;-report.class.php file and call new &name;_report($opts) instead of common &name; class file. Extension specific configuration parameters currently do not exist, thus all table columns are allowed to be selected in final report. This will surely change in future, because table could have columns that need to be unselectable for final report (such as password column or similar). &name;-htmlarea This extension is obsolete. Use integrated extension instead. &name;-htmlarea extension provides support for htmlArea. htmlArea is a free WYSIWYG editor replacement for <textarea> fields. For full source code and documentation, visit http://www.interactivetools.com/ website. htmlArea requires Microsoft Internet Explorer 5.5 or better on Windows to run. This is because it makes use of some advanced features of IE5.5 that aren't available in other browsers yet. It is backwards compatible with other browsers, though. They will get a regular textarea field instead of a WYSIWYG editor. The extension requires a properly installed htmlArea script as it is described on the metioned website. This extension enables WYSIWYG editing of a textarea field. In order to use it, you should: Load htmlArea script in the <head>...</head> section of your &name; calling program as described in the htmlArea manual. Call to &name;-htmlarea.class.php instead of &name;.class.php. htmlArea extension enabling require_once 'extensions/&name;-htmlarea.class.php'; new &name;_htmlarea($opts); Add 'html'=>true parameter to the textarea field definition in your &name; calling program. htmlArea field enabling 'Column', 'select' => 'T', 'options' => 'ACPVD', 'required' => true, 'textarea' => array( 'html' => true, 'rows' => 11, 'cols' => 81) ); ]]> This extension is contribution of Ezudin Kurtowich ekurtovic@ieee.org from Sarajevo. &name;-calpopup This extension is obsolete. Use integrated extension instead. &name;-calpopup extension provides support for a calendar popup helper to be put on any text field. This extension uses the free jsCalendar code from http://dynarch.com/mishoo/calendar.epl website. The requirement is a properly installed jsCalendar script. All browsers supported by jsCalendar are supported by this extension. This extension enables the display of a popup calendar selection against selected fields. In order to use it, you should: Load the jsCalendar scripts in the <head>...</head> section of your &name; calling program, substituting the correct paths: CalPopup javascript ]]> Choose your preferred jsCalendar CSS file (see jsCalendar documentation) and add the following in the <head>...</head> section of your &name; calling program, substituting the correct path: CalPopup javascript ]]> To avoid an unwanted side effect in the CSS style produced by phpMyEditSetup.php, add a 'width:auto' property into the '.calendar table' entry in your selected jsCalendar style sheet. Call to &name;-calpopup.class.php instead of &name;.class.php. CalPopup extension enabling require_once 'extensions/&name;-calpopup.class.php'; new &name;_calpopup($opts); Add calendar parameter to the field definitions where you want a calendar popup in your &name; calling program. CalPopup field enabling 'Column', 'select' => 'T', 'options' => 'ACPVD', 'required' => true, 'calendar' => true ); ]]> This is will display a button next to the field which pops up a calendar when clicked. If that field has a strftimemask parameter set, it will use this for the date format. For more advanced usage, you can set the calendar parameter to an array of valid jsCalendar Calendar.setup options (see jSCalendar document for details). Note that not all of these options make sense to use in &name;, and some of them will actively break the function. CalPopup advanced field $opts['fdd']['col_name'] = array( 'name' => 'Column', 'select' => 'T', 'options' => 'ACPVD', 'required' => true, 'calendar' => array( 'ifFormat' => '%Y/%m/%d', // defaults to the ['strftimemask'] 'firstDay' => 1, // 0 = Sunday, 1 = Monday 'singleClick' => true, // single or double click to close 'weekNumbers' => true, // Show week numbers 'showsTime' => false, // Show time as well as date 'timeFormat' => '24', // 12 or 24 hour clock 'label' => '...', // button label (used by &name;) 'date' => '2003-12-19 10:00' // Initial date/time for popup // (see notes below) ) ); The popup will normally set the initial value to the current field value or to current date/time. date option will always override this, even if there is a current date/time value in the field. If you want a default value only if the field is currently empty, use the &name; default option. Only the options listed above may be set by the user, any other options will be ignored. This extension is contribution of Adam Hammond ajh@phpmyedit.org from London. &name;-mce-cal &name;-mce-cal is a merge of HTML textarea and calendar popup extensions. This extension should be used instead of &name;-htmlarea and &name;-calpopup extensions. See extension source code comments for full documentation. To use this extension you have to include extensions/&name;-mce-cal.class.php file and call new &name;_mce_cal($opts) instead of common &name; class file. This extension is again contribution of Adam Hammond ajh@phpmyedit.org from London.