diff --git a/ChangeLog b/ChangeLog index aa461b4f2..106aacf10 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-05-23 Marc Delisle + * Documentation.html, config.inc.php3, db_details_structure.php3, + pdf_schema.php3: new 'table_coords' because a table can appear + on more than one PDF page + 2002-05-23 Alexander M. Turek * Documentation.html: The Mozilla textarea bug also appears in Mozilla 1.0-RC2 and Netscape 7.0-PR1. diff --git a/Documentation.html b/Documentation.html index 3ed4ca80e..1e6af1f36 100755 --- a/Documentation.html +++ b/Documentation.html @@ -607,7 +607,8 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://' the FAQ, section "Using phpMyAdmin");
  • - enable you to get a PDF schema of your database. + enable you to get a PDF schema of your database (also uses the + table_coords table).

  • @@ -658,13 +659,46 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
    Since release 2.3.0 you can describe, in a special 'table_info' - table + table, which field is to be displayed as a tooltip when moving the + cursor over the corresponding key. +
    + This configuration variable will hold the name of this special + table. +

    + To use this functionality you have to:
      -
    • the coordinates where each table will be placed on a PDF schema - output
    • -
    • which field is to be displayed as a tooltip when moving the - cursor over the corresponding key
    • -
    +
  • + create in the same database a table (for example + 'PMA_table_info') following this scheme:
    + +      CREATE TABLE `PMA_table_info` (
    +        `table_name` varchar(64) NOT NULL default '',
    +        `display_field` varchar(64) NOT NULL default '',
    +        PRIMARY KEY (`table_name`)
    +      ) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';
    +
    +
  • +
  • + put the table name in + $cfg['Servers'][$i]['table_info'] +
  • +
  • + then manually fill this table with information about the + display fields. +
  • +
    + Usage tips: + display field. +

    +
    + +
    + $cfg['Servers'][$i]['table_coords'] string +
    +
    + Since release 2.3.0 you can describe, in a special 'table_coords' + table, the coordinates where each table will be placed on a PDF schema + output.
    This configuration variable will hold the name of this special table. @@ -677,28 +711,27 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'
    • create in the same database a table (for example - 'PMA_table_info') following this scheme:
      + 'PMA_table_coords') following this scheme:
      -      CREATE TABLE `PMA_table_info` (
      +      CREATE TABLE `PMA_table_coords` (
             `table_name` varchar(64) NOT NULL default '',
      +        `pdf_page_number` int NOT NULL default '0',
             `x` float unsigned NOT NULL default '0',
             `y` float unsigned NOT NULL default '0',
      -        `display_field` varchar(64) NOT NULL default '',
      -        PRIMARY KEY (`table_name`)
      -      ) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';
      +        PRIMARY KEY (`table_name`, `pdf_page_number`)
      +      ) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
    • put the table name in - $cfg['Servers'][$i]['table_info'] + $cfg['Servers'][$i]['table_coords']
    • then manually fill this table with information about the table - positions on the PDF schema, and/or the display fields. + positions on the PDF schema.

    - Usage tips: PDF output and - display field. + Usage tips: PDF output.

    @@ -1786,19 +1819,22 @@ $cfg['PmaAbsoluteUri'] = (!empty($HTTPS) ? 'https' : 'http') . '://'

    How can I produce a PDF schema of my database?
    - First you have to fill the 'relation' and 'table_info' + First you have to fill the 'relation' and 'table_coords' configuration variables.

    Then, think about your schema layout: which tables will go on which pages. You have to fill in the 'relation' table the page number for each master-foreign link.

    - Then manually fill the table_info table with the coordinates, - x being the width and y the height, and (0,0) at the upper left corner. + A table may be displayed on more that one page, depending on how many + links it has to other tables. +

    + Then manually fill the table_coords table with the page number and + the coordinates, x being the width and y the height, and (0,0) at the upper left corner. For example, x=100 and y=200 means that the table will be at 200 mm down and 100 mm right from the upper left corner.

    - To produce the output, click on your database name, then choose 'Structure' + To generate the output, click on your database name, then choose 'Structure' and 'Display PDF schema', and enter the page number.

    diff --git a/config.inc.php3 b/config.inc.php3 index 75c6b26b2..1f75bcee1 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -51,6 +51,12 @@ $cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table - leave bl $cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc) // - leave blank for no relation-links support $cfg['Servers'][$i]['table_info'] + = ''; // table to describe the + // display fields + // - leave blank + // for no display fields + // support +$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the // tables position for the // PDF schema - leave blank @@ -76,8 +82,8 @@ $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['bookmarkdb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; -$cfg['Servers'][$i]['table_info'] - = ''; +$cfg['Servers'][$i]['table_info'] = ''; +$cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] @@ -98,8 +104,8 @@ $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['bookmarkdb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; -$cfg['Servers'][$i]['table_info'] - = ''; +$cfg['Servers'][$i]['table_info'] = ''; +$cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] diff --git a/db_details_structure.php3 b/db_details_structure.php3 index 8e3be1ca7..ba655fb1d 100644 --- a/db_details_structure.php3 +++ b/db_details_structure.php3 @@ -438,7 +438,7 @@ echo ' ' . ' ' . "\n"; = 40000 - && (!empty($cfg['Server']['table_info'])) + && (!empty($cfg['Server']['table_coords'])) && $num_tables > 0) { ?> diff --git a/pdf_schema.php3 b/pdf_schema.php3 index eab80c660..44ae7dc53 100644 --- a/pdf_schema.php3 +++ b/pdf_schema.php3 @@ -361,7 +361,7 @@ class PMA_RT_Table function PMA_RT_Table($table_name, $ff) { - global $pdf; + global $pdf, $pdf_page_number; $this->table_name = $table_name; $sql = 'DESCRIBE ' . PMA_backquote($table_name); @@ -380,8 +380,9 @@ class PMA_RT_Table //x and y $sql = 'SELECT x, y FROM ' - . PMA_backquote($GLOBALS['cfg']['Server']['table_info']) - . ' WHERE table_name = \'' . PMA_sqlAddslashes($table_name) . '\''; + . PMA_backquote($GLOBALS['cfg']['Server']['table_coords']) + . ' WHERE table_name = \'' . PMA_sqlAddslashes($table_name) . '\'' + . ' AND pdf_page_number = ' . $pdf_page_number; $result = mysql_query($sql); if (!$result || !mysql_num_rows($result)) { $pdf->PMA_PDF_die(sprintf($GLOBALS['strConfigureTableCoord'], $table_name));