This directory holds import plugins for phpMyAdmin. Plugin should
basically look like following code. Official plugins need to have str*
messages with their definition in language files, if you build some
plugins for your use, you can use directly texts in plugin.

<?php
/* $Id: README,v 1.2 2005/09/24 11:41:58 nijel Exp $ */
// vim: expandtab sw=4 ts=4 sts=4 ft=php:

/* Demo import plugin for phpMyAdmin */

if (isset($import_list)) {
    $import_list['name'] = array(           // set name of your plugin
        'text' => 'strName',                // text to be displayed as choice
        'extension' => '',                  // extension this plugin can handle
        'options' => array(                 // array of options for your plugin (optional)
            array('type' => '', 'name' => '', 'text' => ''), // type: bool or text, name: form element name, text: description in GUI, size: size of text element (optional). len: maximal size of input (optional)
        );
        'options_text' => 'strNameImportOptions', // text to describe plugin options (must be set if options are used)
        );
} else {
/* We do not define function when plugin is just queried for information above */
    $buffer = '';
    while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
        $data = PMA_importGetNextChunk();
        if ($data === FALSE) {
            // subtract data we didn't handle yet and stop processing
            $offset -= strlen($buffer);
            break;
        } elseif ($data === TRUE) {
            // Handle rest of buffer
        } else {
            // Append new data to buffer
            $buffer .= $data;
        }
        // PARSE $buffer here, post sql queries using:
        PMA_importRunQuery($sql, $verbose_sql_with_comments);
    } // End of import loop
    // Commit any possible data in buffers
    PMA_importRunQuery();
}
?>