.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ================== EXT: Book Database ================== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Mario Birkigt :Changed: 2005-02-10T14:07:39 :Classification: Description of the Typo3 Frontend Plugin: Book Database :Author: Mario Birkigt :Email: mario.birkigt(AT)t-online.de :Info 3: :Info 4: .. _EXT-Book-Database: EXT: Book Database ================== Extension Key: **bookdb** Copyright 2003, Mario Birkigt, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: Book Database 1** **Introduction 1** What does it do? 1 Screenshots 1 **Users manual 5** Search for books in the database 5 Input a book 10 Change an entry for a book 10 The “Other Tables” 11 **Configuration 13** **Known problems 16** **To-Do list 16** **Changelog 16** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ Book database is a plugin for managing books and magazines in a company or at home. It offers the possibilities of search, input and changing of books and associated data. .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-1| |img-2| |img-3| |img-4| |img-5| .. _Users-manual: Users manual ------------ .. _Search-for-books-in-the-database: Search for books in the database ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The Book Database plugin starts with a search mask. Here you can do a search in the database. Which search mask is used depends on configuration of the value **SearchFormStyle** in the plugin configuration options. The following “Search Mask” is provided through the configuration of **SearchFormStyle** =new. This is also the default configuration. |img-6| |img-1| The old Search Mask is still available, if the value for **SearchFormStyle** is empty. At first you can choose the radio button “Display All”, which simply displays all items in the database. |img-7| In this case the results are ordered by an internal ID. If you hit the button ”Title” the search results are ordered by title. |img-8| If you hit the button ”Author” the search results are ordered by author. |img-9| The following radio buttons: Place, Category, Publishing Company, Type and Language do an exact search for the selected value from the associated option field. |img-10| The above search would display all books which are at the place “Place 2”. |img-11| For the other items: Title, Author, Key Words and Content description you can provide a search expression. The values have to be separated by spaces. If you use a plus before a value, this value is required in search results. The search is case insensitive. |img-12| The above search would find all books containing the substrings *web* and *progarmming* in their title. |img-13| If the value begins with a minus sign, this value may not be contained in the search results |img-14| The above search would find all books containing *web* , but not containing *php* in their title. |img-15| If a value starts with no sign and there is more than one value. The serach expression is handled with an or linkage, this means not all values must be contained in the search results. |img-16| The above search would find all books containing web and all books containing database in their title. |img-17| Another feature for search is the ability to search for whole phrases. If you want to do this, just put the phrase between quotation marks “phrase” or single quotation marks 'phrase'. |img-18| The above example shows how to search for the phrase “Basic Web” and produces the following result. |img-19| If your search produces no results and the search form is displayed again, the following Message appears. |img-20| .. _Input-a-book: Input a book ^^^^^^^^^^^^ To Input a new book you must fill in the required fields, otherwise an error message appears. |img-21| The data you already had input isn't lost. It is displayed again. The only thing you have to do is to enter a new place for the book in the input field or choose an existing from the select-box and press save again. If anything is right a new empty input mask appears. If you enter an ISBN for a book, that already exists in the database, the input is rejected with an error message: “This book already exists in the database, but the book is displayed for changing the entry. The same happens if the title and the author are identical to an entry in the database. For the values: Publishing Company, Place, Category, Type and Language you have 2 choices for input: a selection field and a text input field. The value in the text input feld is preferred from these two fields. Only if the text input field is empty, the value from the selection field is stored. If you know the ISBN for a book, you can fill in this in the field labeled ISBN and hit the WWW-Button. The script tries to fetch the information from amazon.de, and provides the values in the appropriate fields, if a book was found. .. _Change-an-entry-for-a-book: Change an entry for a book ^^^^^^^^^^^^^^^^^^^^^^^^^^ |img-22| To change a book you can input the ID or the ISBN if you know these, and the book is displayed for change, if it's existing in the database. You can also use the button browse, to browse the db and select an item for change. If you have a large database you can restrict the items to be displayed with input values in the following fields: Title, Author, Publishing Company, Place, Category, Type and Language. Choose the book for change with the butoon Change. If you made your changes, push the button “Submit Changes” and the changed entry for the book is saved. If you want to delete a book, push the button Delete and the book is deleted from the database. Assuming that you know what you are doing, there is no additional question if you want to delete this book. .. _The-Other-Tables: The “Other Tables” ^^^^^^^^^^^^^^^^^^ The so called other tables are all tables except the main table. They are used to store: Publishing Company, Place, Category, Type and Language. You can edit the entrys in these tables after pushing the button “Other Tables” in the Input Mask. |img-4| In the upper part you can choose one of the other tables, where you want to add, change or delete an item. Below you can add a new item to the selected table. In the lower part the items of the seleted table are displayed, so you can choose an item to change or delete. You can't delete an item, which ID is still used as an entry in the main table. |img-23| .. _Configuration: Configuration ------------- Install the plugin with the extension manager. The following tables are created during installation process: .. ### BEGIN~OF~TABLE ### .. _tx-bookdb-book: tx\_bookdb\_book ^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_book Meaning the main table used for storing book data: isbn, title, author, publishing date, edition, key words and a content description .. _tx-bookdb-booklanguage: tx\_bookdb\_booklanguage ^^^^^^^^^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_booklanguage Meaning the table used to store the different languages .. _tx-bookdb-booktype: tx\_bookdb\_booktype ^^^^^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_booktype Meaning the table used to store the booktype .. _tx-bookdb-category: tx\_bookdb\_category ^^^^^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_category Meaning the table used to store the category .. _tx-bookdb-place: tx\_bookdb\_place ^^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_place Meaning the table used to store the place where the book is .. _tx-bookdb-publ-comp: tx\_bookdb\_publ\_comp ^^^^^^^^^^^^^^^^^^^^^^ .. container:: table-row Table tx\_bookdb\_publ\_comp Meaning the table used to store the publishing company .. ###### END~OF~TABLE ###### If the webserver containing the Typo3 installation lies behind a proxy, the plugin uses cURL to fetch data from the web. This requires that the cURL library must be installed. You must set the constant useProxy to 1 and fill in the correct values in the constant Proxy as shown below. |img-24| There are two different page types represented by two Plugin Options. The Code field is no longer used to configure the plugin. **Search** - the page for searching the db and displaying the results **Input** - the page for insert new books and change of existing books |img-25| With the constant **ItemDisplayCount** you can limit the number of items displayed for search results, browse the database and editing of the other tables. The default value is 10. |img-26| You can choose which fields in the input form are required to fill in with the **RequiredInputFields** constant. The required fields are marked with an asterisk. |img-27| In the screenshot the fields title and place are marked as required for filling in. |img-28| The default value is a string containing all fields, which make no sense for practice, but you can easily delete the not required fields. With the **RequiredFieldsStyle** you can adjust how the labels for the reqired fields should look if they aren't filled in. Another constant provided is **ResultFields** , which is controlling the fields to be displayed for search results. |img-29| |img-30| With the constant **EmptyValue** you can set a value to be displayed instead of empty fields. If you change this value in the Typoscript Constant Editor, you must also change this value in the other tables: publ\_comp, place, category, booktype, booklanguage, or the old entry for empty fields would be handled as an normal entry. For the meaning of the other Typoscript constants according to style please look at the section Reference later in this document. .. _generated: ((generated)) ^^^^^^^^^^^^^ .. _Reference: Reference """"""""" TypoScript constants explained .. ### BEGIN~OF~TABLE ### .. _templateFile: templateFile ~~~~~~~~~~~~ .. container:: table-row Property templateFile Data type file Description File used as HTML-Template Default typo3conf/ext/bookdb/pi1/bookdb\_template.tmpl .. _Language: Language ~~~~~~~~ .. container:: table-row Property Language Data type string Description Language used for Field-Labels, Headers, Messages Default .. _useProxy: useProxy ~~~~~~~~ .. container:: table-row Property useProxy Data type int[0-1] Description If you want to use a proxy, set this value to 1 Default 0 .. _Proxy: Proxy ~~~~~ .. container:: table-row Property Proxy Data type string Description a string which consists of ip-address and port of the proxy, separated with a colon127.0.0.1:8080 Default .. _ItemDisplayCount: ItemDisplayCount ~~~~~~~~~~~~~~~~ .. container:: table-row Property ItemDisplayCount Data type int[1-100] Description Number of rows to display the search results and the entrys of the other tables Default .. _HeaderStyle: HeaderStyle ~~~~~~~~~~~ .. container:: table-row Property HeaderStyle Data type string Description contains the style for the headers Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #23058C; font-size: 16px; font-weight: bold; text-align: center; .. _FieldLabelStyle: FieldLabelStyle ~~~~~~~~~~~~~~~ .. container:: table-row Property FieldLabelStyle Data type string Description contains the style for field-labels and fields Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #23058C; font-size: 12px; border-width: 2px; .. _InputStyle: InputStyle ~~~~~~~~~~ .. container:: table-row Property InputStyle Data type string Description contains the style for input fields Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #23058C; font-size: 12px; border: 1px dotted #CCCCCC; .. _InputFieldSizes: InputFieldSizes ~~~~~~~~~~~~~~~ .. container:: table-row Property InputFieldSizes Data type string Description adjust the width of the input fields: id,isbn,title,author,publ\_date, edition,publ\_comp,place,category,booktype,booklanguage,key\_words,con tent\_desc Default 80,80,400,400,130,130,190,190,190,190,190,400,400 .. _ButtonStyle: ButtonStyle ~~~~~~~~~~~ .. container:: table-row Property ButtonStyle Data type string Description contains the style for buttons Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #23058C; font-size: 12px; border:2px solid #23058C; .. _TableButtonStyle: TableButtonStyle ~~~~~~~~~~~~~~~~ .. container:: table-row Property TableButtonStyle Data type string Description contains the style for buttons within a table for sorting or displaying details Default TableButtonStyle=font-family: Arial,Helvetica,Geneva,Swiss,SunSans- Regular; color: #23058C; font-size: 12px; border:2px solid #FFFFFF; background-color: #FFFFFF; .. _InputTableStyle: InputTableStyle ~~~~~~~~~~~~~~~ .. container:: table-row Property InputTableStyle Data type string Description contains the “style” of the table used for input and change mask Default 'width="100%" cellspacing="3" cellpadding="3"' .. _OutputTableStyle: OutputTableStyle ~~~~~~~~~~~~~~~~ .. container:: table-row Property OutputTableStyle Data type string Description contains the “format” of the table sused for displaying search results and book details and the table used for browsing the db Default border="1px" bordercolor="#23058C" frame="box" rules="all" cellpadding="5" width="100%" style="border-collapse: collapse; border- color: #23058C;" .. _ErrorMessageStyle: ErrorMessageStyle ~~~~~~~~~~~~~~~~~ .. container:: table-row Property ErrorMessageStyle Data type string Description contains the style for error messages Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #FF0000; font-size: 12px; font-weight: bold; text-align: center; .. _RequiredFieldsStyle: RequiredFieldsStyle ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property RequiredFieldsStyle Data type string Description contains the style for required fields when they are not filled Default font-family: Arial,Helvetica,Geneva,Swiss,SunSans-Regular; color: #FF0000; font-size: 12px; font-weight: bold; text-align: center; .. _RequiredInputFields: RequiredInputFields ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property RequiredInputFields Data type string with csv values Description contains the required fields for input and change separated by commas Default title,author,publ\_comp,edition,isbn,publ\_date,place,category,booktyp e,booklanguage,key\_words,content\_desc .. _ResultFields: ResultFields ~~~~~~~~~~~~ .. container:: table-row Property ResultFields Data type string with csv values Description the fields to be displayed for search results Default title,author,publ\_comp,edition,isbn,publ\_date,place,category,booktyp e,booklanguage .. _EmptyValue: EmptyValue ~~~~~~~~~~ .. container:: table-row Property EmptyValue Data type string Description the value which is displayed for an empty field Default --- .. _SearchFormStyle: SearchFormStyle ~~~~~~~~~~~~~~~ .. container:: table-row Property SearchFormStyle Data type String Description selects if the new search mask with checkboxes will be displayed or the old one with radiobuttons Default new .. ###### END~OF~TABLE ###### .. ### BEGIN~OF~TABLE ### .. _ISBN: ISBN ~~~~ .. container:: table-row fieldlabel ISBN internal fieldname isbn .. _Title: Title ~~~~~ .. container:: table-row fieldlabel Title internal fieldname title .. _Author: Author ~~~~~~ .. container:: table-row fieldlabel Author internal fieldname author .. _Publishing-Date: Publishing Date ~~~~~~~~~~~~~~~ .. container:: table-row fieldlabel Publishing Date internal fieldname publ\_date .. _Edition: Edition ~~~~~~~ .. container:: table-row fieldlabel Edition internal fieldname edition .. _Publishing-Company: Publishing Company ~~~~~~~~~~~~~~~~~~ .. container:: table-row fieldlabel Publishing Company internal fieldname publ\_comp .. _Place: Place ~~~~~ .. container:: table-row fieldlabel Place internal fieldname place .. _Category: Category ~~~~~~~~ .. container:: table-row fieldlabel Category internal fieldname category .. _Type: Type ~~~~ .. container:: table-row fieldlabel Type internal fieldname booktype .. _Language: Language ~~~~~~~~ .. container:: table-row fieldlabel Language internal fieldname booklanguage .. _Key-Words: Key Words ~~~~~~~~~ .. container:: table-row fieldlabel Key Words internal fieldname key\_words .. _Content-Description: Content Description ~~~~~~~~~~~~~~~~~~~ .. container:: table-row fieldlabel Content Description internal fieldname content\_desc .. ###### END~OF~TABLE ###### .. _Known-problems: Known problems -------------- .. _To-Do-list: To-Do list ---------- I'm planning to rewrite the extension using the PEAR classes and Smarty as template engine, to provide more flexibility for the design of the pages displayed in the frontend. .. _Changelog: Changelog --------- - 0.0.1 first version - 0.0.2 finnish translation added, thanks to translator - 0.0.4 minor layout changes for search and input formremoved checking if book exists, so it's possible to have several copies of the same book - 0.0.5 italian translation added, thanks to translator - 0.1.0 automatic language recognition addeda new Search Mask with 'AND' linked search fields is available with the constant SearchFormStyle=newthanks to Daniel Pötzingerit is possible to configure one or more starting points (for the plugin) for a search page, so that only values from these pages will be found through search - 0.1.2 changed pagetype configuration from code field to to configuration with flexforms |img-31| EXT: Book Database - 18 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 408 .. :id: Grafik1 .. :name: Grafik1 .. :width: 539 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 499 .. :id: Grafik2 .. :name: Grafik2 .. :width: 541 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 497 .. :id: Grafik3 .. :name: Grafik3 .. :width: 541 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 360 .. :id: Grafik28 .. :name: Grafik28 .. :width: 610 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 178 .. :id: Grafik5 .. :name: Grafik5 .. :width: 509 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 426 .. :id: Grafik32 .. :name: Grafik32 .. :width: 501 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 234 .. :id: Grafik9 .. :name: Grafik9 .. :width: 609 .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :height: 235 .. :id: Grafik13 .. :name: Grafik13 .. :width: 603 .. |img-9| image:: img-9.png .. :align: left .. :border: 0 .. :height: 235 .. :id: Grafik14 .. :name: Grafik14 .. :width: 601 .. |img-10| image:: img-10.png .. :align: left .. :border: 0 .. :height: 240 .. :id: Grafik15 .. :name: Grafik15 .. :width: 419 .. |img-11| image:: img-11.png .. :align: left .. :border: 0 .. :height: 181 .. :id: Grafik16 .. :name: Grafik16 .. :width: 608 .. |img-12| image:: img-12.png .. :align: left .. :border: 0 .. :height: 144 .. :id: Grafik6 .. :name: Grafik6 .. :width: 531 .. |img-13| image:: img-13.png .. :align: left .. :border: 0 .. :height: 181 .. :id: Grafik10 .. :name: Grafik10 .. :width: 605 .. |img-14| image:: img-14.png .. :align: left .. :border: 0 .. :height: 142 .. :id: Grafik7 .. :name: Grafik7 .. :width: 533 .. |img-15| image:: img-15.png .. :align: left .. :border: 0 .. :height: 180 .. :id: Grafik11 .. :name: Grafik11 .. :width: 605 .. |img-16| image:: img-16.png .. :align: left .. :border: 0 .. :height: 144 .. :id: Grafik8 .. :name: Grafik8 .. :width: 529 .. |img-17| image:: img-17.png .. :align: left .. :border: 0 .. :height: 245 .. :id: Grafik12 .. :name: Grafik12 .. :width: 609 .. |img-18| image:: img-18.png .. :align: left .. :border: 0 .. :height: 143 .. :id: Grafik18 .. :name: Grafik18 .. :width: 529 .. |img-19| image:: img-19.png .. :align: left .. :border: 0 .. :height: 180 .. :id: Grafik19 .. :name: Grafik19 .. :width: 605 .. |img-20| image:: img-20.png .. :align: left .. :border: 0 .. :height: 423 .. :id: Grafik20 .. :name: Grafik20 .. :width: 530 .. |img-21| image:: img-21.png .. :align: left .. :border: 0 .. :height: 538 .. :id: Grafik26 .. :name: Grafik26 .. :width: 545 .. |img-22| image:: img-22.png .. :align: left .. :border: 0 .. :height: 507 .. :id: Grafik27 .. :name: Grafik27 .. :width: 559 .. |img-23| image:: img-23.png .. :align: left .. :border: 0 .. :height: 381 .. :id: Grafik29 .. :name: Grafik29 .. :width: 606 .. |img-24| image:: img-24.png .. :align: left .. :border: 0 .. :height: 151 .. :id: Grafik24 .. :name: Grafik24 .. :width: 623 .. |img-25| image:: img-25.png .. :align: left .. :border: 0 .. :height: 401 .. :id: Grafik21 .. :name: Grafik21 .. :width: 487 .. |img-26| image:: img-26.png .. :align: left .. :border: 0 .. :height: 79 .. :id: Grafik25 .. :name: Grafik25 .. :width: 621 .. |img-27| image:: img-27.png .. :align: left .. :border: 0 .. :height: 431 .. :id: Grafik22 .. :name: Grafik22 .. :width: 494 .. |img-28| image:: img-28.png .. :align: left .. :border: 0 .. :height: 82 .. :id: Grafik23 .. :name: Grafik23 .. :width: 624 .. |img-29| image:: img-29.png .. :align: left .. :border: 0 .. :height: 70 .. :id: Grafik30 .. :name: Grafik30 .. :width: 624 .. |img-30| image:: img-30.png .. :align: left .. :border: 0 .. :height: 198 .. :id: Grafik31 .. :name: Grafik31 .. :width: 603 .. |img-31| image:: img-31.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102