Documentation (version September 23th 2009)
- Since 10th Apr. 2008 the determination key program is licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported. Only images made by Andreas Plank are under Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported. For all other images you have to ask the original author and their editors to reproduce those images!
- There is no warranty for the program. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.
- You can simply use it or improve the key by programming with php.
- There is a detailed programmers documentation now started in http://localhost/chip/pupae/doc/
Table of contents
Getting started
Install/Update easy way
Final note — browser & software
Last Steps
Quick user guide
Naming of pictures
Rules of naming
Add a new Name
A whole genus 'automatically'
A whole genus manually
A species name
Features: data input syntax and emphasis
Automatic emphasis/linking
Legal HTML-tags
Colors
Special syntax in textarea-fields
Sortable and filterable tables
Database MySQL
Tables
Query characters to a wiki table
Using bookmarks for table field creation
Settings of the program
Measurements
Abbreviations
Outline Analysis
Frequently Asked Questions (FAQ)
Still to do...
Logfile
Acknowledgements
Getting started
- Install the free Webserver XAMPP from http://www.apachefriends.org/
- Move/extract folder /chip/pupae, /chip/imgpupae, /phpmyadmin3 (and for PHP < 5.2 /phpmyadmin2-11-4) into the local web folder at 'root' position (htdocs-something):
- Windows
- C:\...\apachefriends\...\htdocs\ or
- C:\...\xampp\...\htdocs\
- Linux /opt/lampp/htdocs/
- Start the local webserver program, if it isn't already running (Windows: Controlpanel, Linux: type as root /opt/lampp/lampp start ). All webpages you want to see later can be reached by typing an address like http://localhost/.... But you have to store all data/folders (readable!) in C:\...\htdocs\ (Windows) or /opt/lampp/htdocs/ (Linux). Later the key's address is http://localhost/chip/pupae/.
- Proceed with install or update below.
Install/Update easy way
Notice that all communication with the MySQL database via phpmyadmin works only with a 'single sign-on' session. When this session is established, communication between the key and phpmyadmin works directly. That's why it is sometimes necessary to click a link twice, if there was no established session.
Follow the steps of install/update:
- For first install use http://localhost/chip/pupae/install/install.php.
- An update can be done with this script as well (http://localhost/chip/pupae/install/install.php?action=update).
- In addition there is a script that checks image integrity of table `images` versus images in folder species: http://localhost/chip/pupae/install/check.php.
If you want to use the default admin tool (http://localhost/phpmyadmin/)—apart from that delivered with the key (phpmyadmin2-11-4 for PHP < 5.2 and phpmyadmin3 for PHP >=5.2)—you can use the install script in http://localhost/phpmyadmin/scripts/setup.php and read Last steps to configure it.
Final note - browser & software
I have no time to fix the bugs for the Internet Explorer which is a non-conform browser to W3C-standards. I know this browser has problems with some cascading stylesheet (CSS) properties and transparent png files. So some frames and text-images might look ugly and it's also possible that you can not measure images as well. You can trash Internet Explorer and use for instance the faster and more advanced Opera browser, because he can zoom images and text as well (useful for measurements). Firefox is also a good decision, but you have no image scaling. Measuring images will work with Opera and Firefox.
To query for difficult genera, e.g.: Orthocladius and Cricotopus, you can use the Open-Office database frontend BASE in folder /chip/pupae/key/characters_chiros.odb with the driver MySQL JDBC or ODBC. Downloads see http://dev.mysql.com/downloads/connector/ (ODBC = Connector/ODBC or JDBC = Connector/J).
Last Steps - only the default phpmyadmin
There is a stand allown script in http://localhost/phpmyadmin/scripts/setup.php that should help you to configure the default phpmyadmin. Note: for running with passwords it's better to change authentication method from 'config' to 'http'. The script creates a file named config.inc.php. This file has to be moved to the /path/to/default/phpmyadmin/ to set your custom settings. So the config.inc.php-file should look like that:
// ... some settings $cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? //edit to $cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
If you want to log in now, you will be asked for user and password. Log in now as chiro_user with password chiroproject. Note: as super user root with no password (only first install) you can see/manage all other databases from server localhost. By the way: the user root has access to all databases.
Quick user guide
In general I hope the program is selfexplaining. You can browse by subfamily level, genus level and specimen's level. To the specimens level you have access by menu
or
Search or from the Data section of each genus page. To upload images or alter informations in detail use menu
Images.
There is also the possibility to add small templates to generate HTML code for instance a small icon for unimodal models. See further details in file "structure/templates.php".
Just one important point at last: to communicate with the MySQL database via phpmyadmin a 'single signon' session must be established first. Then it should work and it will open a new window. Sometimes I realised also that some links have to be clicked a second time. If this also fails it might be a bug.
Finally I should say I'm not a professional programmer. I just wanted to establish a flexible way to organise data, literature and images with some useful tools around this. So please bear that in mind that this program is not perfect — but it works. And that's the point.
Naming of pictures
A typical image file name is for instance: Abla_lost_hes_Rie2001_r.png. That means:
- Abla a unique short name for Ablabesmyia (stored in table: 'names_genera')
- lost a unique short name for longistyla (stored in table: 'names_species')
- hes a unique short name for 'head setation' (stored in table: 'morph_atrib')
- Rie2001 a unique short name for the reference: Rieradevall, M. and Brooks, S. J. (2001) (stored in table: 'names_authors')
- r means: the image is referenced within the picture by the text of field 'authors_short' in table 'names_authors'
Rules of naming
- short species names
- every species name consits of at least 4 letters except for:
- 'severini?' it is 'seve-' for the question mark '?' in the name a minus is used in the abbreviated name ('?' isn't allowed to be a valid character for files)
- cf. is xxxxcf
- gr. is xxxxgr
- agg. is xxxxag

Add a new Name
A whole genus 'automatically'
Use Manage Names > Manage valid names of specimens, follow the links and mind the comments in the database.
- insert name
- refresh or go again to
Manage Names > Manage valid names of specimens. The new name should be listed here. Note: a new genus (website) is 'defined' at least by 1) genus name 2) species name = 'sp.' 3) subfamily name = select one 4) subgenus = NULL i.e. no selection.
- update
A whole genus manually
To add a genus to the key you can do this manually as well. Use the phpmyadmin-tool and open table names_genera. Add the genus name and appropriate short name (4 characters) to the table. Than open table names_valid and add this new genus with (1.) genus name (2.) species name = 'sp.' (species_name_id=192) and at least the subfamily level as well. Than query this statement in one(!) query. To do this use one of the following links depending on your PHP version and insert this whole SQL-query:
PHP < 5.2 http://localhost/phpmyadmin2-11-4/db_sql.php?db=chirokey_pupae&goto=db_structure.php&db_query_force=1
PHP >= 5.2 http://localhost/phpmyadmin3/db_sql.php?db=chirokey_pupae&goto=db_structure.php&db_query_force=1
-- comment: select at first last id from table names_valid SELECT LAST_INSERT_ID( `id` ) FROM `names_valid`; -- comment: insert this ID in table characters INSERT INTO `characters` ( `id` , `names_valid_id` ) VALUES ('', LAST_INSERT_ID( ));To see the new "site" refresh the whole key or at least the navigation bar to browse to the new genus. Note: removing a name isn't recommended, because there may be dependencies in other tables like `characters`, `names_valid` or `names_synonyms`. You can try the openoffice-BASE frontend /chip/pupae/key/characters_chiros.odb as well.
A species name
Use Manage Names > Manage valid names of specimens to add a species name and mind the comments in the database fields.
- insert a name if not listed
- click again Manage Names > Manage valid names of specimens
- select a new combination as detailed as you can.
- update
Features: data input — syntax and emphasis
Automatic emphasis/linking
Author names and existing genera and species in the database, will automatically emphasised with a link. Additionally you can click on a highlighted species name to force a search in a new window. Note that references will emphasised according to their database table-ID and NOT to the given text in the {citeID|...|text}. You can use a 'non'-citation like
- {citeID|416|Cranston and Dimitriadis 2005}
- creates «Cranston and Dimitriadis 2005» and gives author-year citation according to the database field 'authors_short' (optionally with literal like a, b etc.)
- {citeauthorID|416|Cranston and Dimitriadis 2005}
- creates «Cranston and Dimitriadis» without year
- {citeyearID|416|Cranston and Dimitriadis 2005}
- creates «2005» without authors' short names
- {numciteID|416|Cranston and Dimitriadis 2005}
- creates a numerical citation: 416
- {nociteID|416|Cranston and Dimitriadis 2005}
- creates an entry in the list of references but no citation in the text
Legal HTML-tags
All valid HTML-tags can be used in <textarea></textarea> like:
- <br><div><em><hr><pre><span><strong><sub><sup><img><iframe>
Colors
To write text combined with color your can use <span style="color:red;"> red Text </span>. As you can see CSS-style formatting is allowed. I tried to fit some color attributes given by different authors to be easier typed. For instance {dark red} produce dark red as <span class="darkred">dark red</span> with appropriate color-classes defined in /structure/css/basic.css. The following CSS-classes colors are defined in the variable $config['colornames'] in structure/config.php:
black
brown
brownish
dark
dark brown
dark red
green
light orange
light brown
light red
pale
red orange
whitish
yellow
yellowish
yellow brown
yellow red brown
pale yellow
dark yellow
bright red
bright orange
You can add a new one and setup a new CSS-class without white space character. I know this is only a stub but it can help to orientate in text.
Special syntax in textarea-fields
In general the syntax type in this project follows Wikipedia. For instance a paragraph needs to be typed in one single line. If there is a newline (return key) it is regarded as a new paragraph. Supported types are explained here.
tag | syntax | example | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
table | ||||||||||||||
<table>...</table> | {| table content |} |
|||||||||||||
<tr>...</tr> | |- |
|||||||||||||
<th>...</th> | !| table head content !im| table head content as image |
|||||||||||||
<td>...</td> | | table data content |
|||||||||||||
{| style='border-style:dashed;border-color:blue;border-width:2px;'
|- !|Reference !|entry !im|entry as image !im90|entry as image with 90 degrees |- |Pinder and Reiss 1983: |test |text |text |- |Heiri et al. 2004: |further test |text |text |} |
|
|||||||||||||
table with sorting (possibility 1) | ||||||||||||||
Note: if you have more than 1 entry as sortable table you have to give an individual id-attribute, e.g.. id='sorttwo' or something like that for the second table. | ||||||||||||||
{| style='border:1px solid;' class='sortable' id='sortone'
|- !|table head !im|Taxon !im90|table head as img + 90° |- |row1 t.data1 |t.data2 row1 |9 |- |row2 t.data1 |t.data2 row2 |3 |-class='sortbottom' |row3||sum||12 |} |
|
|||||||||||||
font | ||||||||||||||
<b>...</b> |
''bold''
|
bold | ||||||||||||
<em>...</em> |
'''emphasis'''
|
emphasis | ||||||||||||
<em><b>...</b></em> |
'''''bold emphasis'''''
|
bold emphasis | ||||||||||||
links | ||||||||||||||
<a href='url'>external link</a> |
[[http://de.wikipedia.org/wiki/Hauptseite Wikipedia]]
|
Wikipedia | ||||||||||||
lists (max. 4 levels) | ||||||||||||||
<ul> <li>unordered list</li></ul> |
*1<sup>st</sup> unordered list
**2<sup>nd</sup> unordered list ***3<sup>rd</sup> unordered list ****4<sup>th</sup> unordered list |
|
||||||||||||
<ol> <li>ordered list</li></ol> |
#1<sup>st</sup> ordered list (numeric)
##2<sup>nd</sup> ordered list (alpha) ###3<sup>rd</sup> ordered list (ROMAN) ####4<sup>th</sup> ordered list (ALPHA) |
|
||||||||||||
<dl> <dt>...</dt><dd>...</dd> </dl> |
;definition 1 : description 1...
;definition 2 : description 2... |
|
||||||||||||
OpenLayers Map![]() ![]() |
in general: {{openLayer|map-number| (lon$lat$heading$description) }} |
It's possible to use decimal coordinates or in degrees-minutes-seconds (only complete in DMS, eg.: 30°0'0''). {{openLayer|1| means this is map number 1. So it should be possible to create multiple maps per page. Note, that coordinates are enclosed with parentheses (...) and values are separated by $-sign. If you want to draw only a dot, add as last argument (...$o). | ||||||||||||
general substitutions | ||||||||||||||
<==
>== <= => <=> <- -> <-> 1st, 2nd... +- ~ |
≤
≥ ⇐ ⇒ ⇔ ← → ↔ 1st, 2nd... ± - non breaking space |
|||||||||||||
special effects (Javascript class overlib) | ||||||||||||||
Mouse over Image or Text |
{overlib|Mouse over Image or Text|<img align='middle' width=80 title='Paratanytarsus confusus (apex of antenna) Klink 1983' src='../../imgpupae/Pata_conf_aan_Kli1983_r.gif' >}
|
Pedicels as long as the Lauterborn organ |
Sortable and filterable tables (possibility 2)
Summary: Tables with the functionality of filtering are enabled by a 2nd JavaScript library from Matt Kruse and the following documentation was just copied. The important thing is to use CSS classes for getting tables sorted or filtered as described in detail below. Also table's head, body and foot need to be enclosed by their tags <thead></thead>, <tbody></tbody> and the foot optionally by <tfoot></tfoot>. To switch on sorting needs at least class='table-autosort' in table's definition AND class='table-sorttable:default' in each <th> or !| that wants to be sorted. Same approach is for enabling filtering. Thereby a regular expression search can be used in filter-input fields, like 1.[0-5] e.g. for 1.0-1.5.
Much of the functionality of this library - including sorting, filtering, and paging - can be accomplished without any coding at all. Instead, CSS classes can be put on tables and cells to have the functionality automatically added when the page loads. The following table lists the classes that can be used and what they do. Values are "passed" to the script by appending numbers or strings to the end of some class name prefixes.
Class Name | Applies To | Action Taken On Page Load | Example |
---|---|---|---|
Striping | |||
table-stripeclass:* | table | The class name that should be applied to alternate rows when autostriped or after any sorting, filtering, or paging. | <table class="table-stripeclass:alternate"> Apply the class name "alternate" to odd rows. |
table-autostripe | table | Odd table rows (first row is 0) are automatically striped using the class specified with table-rowshade-* | <table class="table-autostripe table-rowshade-alternate"> |
Sorting | |||
table-autosort | table | The table will be automatically setup for sorting for columns that have autosort definitions using table-sortable:* If you have no cells in your thead marked as table-sortable, then this will have no effect. |
<table class="table-autosort"> |
table-autosort:# | table | The table will be automatically setup for sorting for columns that have autosort definitions using table-sortable:*, and the table will be sorted on load by the column index supplied. The first column is 0. | <table class="table-autosort:2"> The table will be setup for sorting and then be automatically sorted by the 3rd column (index 2). |
table-sortable:* | thead > th, thead > td |
When used in a TH or TD in the THEAD section of a table, this class defines the data type of the column for sorting. Only columns flagged with this class in an autosort table will have sorting functionality added. The onclick value of the cell will be over-written if it already exists. Built-in sort types are: alphanumeric, numeric, numeric_comma (for countries that use 1.234.567,89), ignorecase, currency, currency_comma, date. New sort types may be added, and those sort types can then be used in this class name. |
<th class="table-sortable:numeric"> |
table-nosort | tbody | By default, all tbody sections of a table are sorted. If this class is applied to a tbody, then no sorting will be done within this tbody. | <tbody class="table-nosort"> |
Filtering | |||
table-autofilter | table | Create automatic filters on columns in the table that also use the class table-filterable | <th class="table-autofilter"> |
table-filterable | thead > th, thead > td |
Used to identify a column header as filterable, so that the autofilter functionality will be added. Not all columns in a table typically need filtering, so this class must be used to identify those that do. In the case of manually-added filtering, only headers with this class name will get the table-filtered class applied. | <th class="table-filterable"> |
table-filtered-rowcount:* | * | When a table is filtered, the innerHTML of the object with this ID will be replaced with the number of rows that match all current filters. | <td class="table-filtered-rowcount:visiblerowspan"> |
table-rowcount:* | * | When a table is filtered, the innerHTML of the object with this ID will be replaced with the total number of rows in the table, including those that have been filtered out. | <td class="table-rowcount:totalrowspan"> |
Paging | |||
table-autopage:# | table | Automatically split the table into "pages" of N number of rows each. The mechanism to trigger the paging will either need to be created manually or by using the classes below. The table will default to displaying the first page. | <table class="table-autopage:10"> Display 10 rows of the table at a time |
table-page:* | thead > th, thead > td, tfoot > th, tfoot > td |
Adds the functionality to flip "pages" of the table to the cell's onclick property, overwriting the action if it already exists. Possible values are "table-page:next" to go to the next page, "table-page:previous" to go to the previous page, and "table-page:#" to jump # number of pages. Paging will not allow go past the first or last page. | <td class="table-page:next"> Go to the next page of the table when the cell is clicked <td class="table-page:-5"> Jump back 5 pages |
table-page-number:* | thead > th, thead > td, tfoot > th, tfoot > td |
When a table is paged or filtered, the innerHTML of the object with this ID will be replaced with the page number that is currently being displayed. Only 1 object is allowed to map to the page number. | <td class="table-page-number:table1page"> |
table-page-count:* | thead > th, thead > td, tfoot > th, tfoot > td |
When a table is paged or filtered, the innerHTML of the object with this ID will be replaced with the total number of pages that are available based on page size. Only 1 cell is allowed to map to the page count. | <td class="table-page-count:table1pagecount"> |
Styling Tables With CSS Classes
The display of sort indicators, filter icons, and row striping is all controlled via CSS classes. When an action is taken on a table, classes are applied to objects. It is up to the page developer to write rules for these classes in CSS to display their tables as they wish. Typically for sort icons, a css background-image declaration can be used.
Class Name | Applies To | Action Taken On Page Load | Example |
---|---|---|---|
Sorting | |||
table-sortable | thead>th thead>td |
Column headers of sortable columns will receive this class, which can be used for example to put an icon in the header to show that the column is sortable but not currently sorted. | <th class="table-sortable"> |
table-sorted-asc | thead>th thead>td |
When a column is sorted in ascending order, column headers in the same column that have the table-sortable class will also get this class applied. Only those that have the table-sortable class will get this class, because your thead may have multiple rows but you don't want every cell in the column to get the sort class. This class can be used, for example, to put an icon in the header that indicates the column is sorted. | <th class="table-sorted-asc"> |
table-sorted-desc | thead>th thead>td |
Same as table-sorted-asc, but applied when the column is sorted in descending order. | <th class="table-sorted-desc"> |
Filtering | |||
table-filtered | thead>th thead>td |
When a column is filtered, each column header that has the table-filterable class will also receive this class. It can be used to show a filter icon, for example. | <th class="table-filtered"> |
Database MySQL
To export the whole database as it's recommended see FAQ. Next section describe the structure of 'chirokey_pupae'.Tables
- characters: stores characteristics of morphology. At this stage only fields id, names_valid_id, names_authors_id, notes, ecology and similar are used.
- images: stores all images including notes for each picture that can also be given if you upload images. And also the connected valid specimen name. If an image has the wrong specimen name you have to change the appropriate number in the field 'names_valid_id' from table 'names_valid'.
- morph_attrib: stores morphological attributes/terms, like mentum, postoccipital margin... and appropriate default image width. Here you can also switch on and off structures selectable by the navigation menu.
- names_authors: stores all references.
- names_genera: stores genus names.
- names_species: stores species names.
- names_subfamily: stores subfamily names.
- names_subgenus: stores names of subgenus.
- names_subtribe: stores names of subtribe.
- names_synonyms: (will) store names of synonyms.
- names_tribe: stores names of tribe.
- names_valid: stores names of valid species names. Changes here affect all other relation in the database.
- users: will store in future user data.
Relations between table fields:
Query characters to a wiki table
To query characters from genera you can bookmark this query. This is stored in `phpmyadmin`.`pma_bookmark`. You can name it for instance: 'characters2wiki (var genus)', because there is a variable in the query:
.... (`names_genera`.`name` LIKE '/*[VARIABLE]*/%') ...If you bookmarked it with the name 'characters2wiki (var genus)' just select database > > select Bookmarked SQL query > 'characters2wiki (var genus)', type in for instance 'Cricotop' click and it will execute this query with the variable 'Cricotop'. So it searches for 'Cricotop*' (in SQL-syntax: .... LIKE 'Cricotop%').
- export query as *.csv
- import in Excel or Open Office-Calc (fields as text to avoid string to date transformation)
- remove fist column 'characters_id'
- copy the table to Open Office-Writer (Word doesn't support export to wiki files)
- export as wiki text
- prepare table header and table structure eg. to get a sortable table:
{| style='border:1px solid;' class='sortable' id='sortone' |- !|reference !|species !im90|antennal ratio ...
- example: see Orthocladius.
Using bookmarks for table field creation
As you can bookmark any MySQL query also in combination with a variable it is easyly and quickly possible to add new fields in tables. For instance if you want to insert later measurement data in table `characters` such as minimum, maximum, mean and n then you can use the following query named for instance 'min max mean n insert in characters (var)':
ALTER TABLE `characters` ADD `/*[VARIABLE]*/_min` FLOAT(3,1) NULL DEFAULT NULL COMMENT 'minimum (/*[VARIABLE]*/)' , ADD `/*[VARIABLE]*/_max` FLOAT(3,1) NULL DEFAULT NULL COMMENT 'maximum (/*[VARIABLE]*/)' AFTER `/*[VARIABLE]*/_min`, ADD `/*[VARIABLE]*/_mean` FLOAT(3,1) NULL DEFAULT NULL COMMENT 'mean (/*[VARIABLE]*/)' AFTER `/*[VARIABLE]*/_max`, ADD `/*[VARIABLE]*/_n` TINYINT(3) UNSIGNED NULL DEFAULT NULL COMMENT 'number of individuals (/*[VARIABLE]*/)' AFTER `/*[VARIABLE]*/_mean`;
Saved this bookmark in table `phpmyadmin`.`pma_bookmark` every /*[VARIABLE]*/ will then be replaced by your own one. Select for instance database > > select Bookmarked SQL query > 'min max mean n insert in characters (var)' and type in for instance 'antennal_ratio' click and table fields like antennal_ratio_min, antennal_ratio_max and so on will be created.
Settings of the program
All settings the key-program needs, are in folder /chip/pupae/structure/config.php. See also folder structure.
Measurements
Some of these measurements can be used to query for difficult genera, eg. Orthocladius and Cricotopus. You can use the Open-Office database frontend BASE in Folder /chip/pupae/key/characters_chiros.odb
measure | description |
---|---|
mentum:
|
![]() |
antenna:
|
![]() |
mandible:
|
![]() |
Abbreviations
See also table 'morph_atrib' field 'morph_short': eg. anp=antennal pedestal.
abbreviation | meaning |
---|---|
L2W | length to width (eg. ratio) |
AR | antennal ratio |
RO | ring organ |
Outline Analysis
The determination key provides a tool to get outlines from images captured by a so-called chain code. This chain code is then analysed by normalised elliptic Fourier analysis, that is: its procedure tries to describe the outline by a given number of harmonics. In Fourier analysis a signal in time series is dissected in a determined number of amplitudes of cosine (cos) and sine (sin). Whereas in Elliptic Fourier analysis 'best' ellipses from large ones to small ones are used to describe outlines instead of amplitudes. The more harmonics (i.e. ellipses) the more detailed is the reconstructed outline. By using this approach one take advantage of having an equal number of landmarks, independence to size and rotation of the image and one is able to compare images by a subsequent shape analysis. For details concerning the Normalised Elliptic Fourier analysis see Kuhl and Giardina 1982 and program SHAPE at http://life.bio.sunysb.edu/morph/.
Frequently Asked Questions (FAQ)
Question (1): I cant see foreign key values when I want to edit fields with phpmyadmin.Question (2): How can I export this database to use for instance the key on two different machines?
Question (3): I get no connection to http://localhost/ site or http://localhost/phpmyadmin2-11-4/.
Question (4): I get a blank page when I try to open a document from a http://localhost/ site.
Question (5): How can I run two different versions of the key?
Question (6): I get an error message like below.
Question (7): How can I get all species stored in table `names_valid`?
Question (8): How can I change the layout?
Question (9): Is the key limited to only one taxagroup?
- Question (1): I cant see foreign key values when I want to edit fields with phpmyadmin.
- Answer:
- use install script at step 3 http://localhost/chip/pupae/install/install.php?action=install&step=3
- Question (2): How can I export this database to use for instance the key on two different machines?
- Answer:
- It's very simple. Just select the database or table you want to export (1) '__DB___%Y%m%d'. This creates a file named databaseName_yyyymmdd.sql. but then check additional the option (2) ' Add DROP TABLE / DROP VIEW' and 'Add into comments' (3) may also be useful as an information about time version and so on. Check 'Save as file' (4) and to prevent chaos from different file versions I use for instance the file template
- Question (3): I get no connection to http://localhost/ site or http://localhost/phpmyadmin2-11-4/.
- Answer:
- Suggested errors:
- Is the Apache server running with at least services APACHE, PHP, MySQL?
- Correct user and password? First install user 'root' and no password should work. The chirokey has user 'chiro_user' and password 'chiroproject'.
- Question (4): I get a blank page when I try to open a document from a http://localhost/ site.
- Answer:
- Make sure that the localhost server isn't blocked by the browser or the system.
- Question (5): How can I run two different versions of the key?
- Answer:
- It should work, but some manually inserted images with the edit pencil will have wrong path names. Note: species directory is independent from program's directory. For an old version the following steps are recommended:
- (backup database including species directory and program directory)
- rename or copy folders new and species for instance to a version name like new20080324 and species20080324.
- copy or rename database chirokey_pupae following the same scheme to e.g. chirokey_pupae20080324
- change appropriate settings in config.php-file (/structure/config.php) (note: config.php is utf8!! i.e. an unicode-file not ISO-8859-1 like the default on Windows):
$config['database'] = 'chirokey_pupae20080324'; $config['dirSpec'] = 'species20080324/'; $config['ServerRootDir'] = 'anywhere/new20090313/';
- Question (6): I get an error message like below.
-
Fatal error: Trying to clone an uncloneable object of class mysqli in /var/www/htdocs/s16w2/html/fileadmin/new/structure/classes/sql.php on line 15
- Answer:
- This is a php-setting issue. Set in file php.ini zend.ze1_compatibility_mode to off. Than restart Apache server to get the new setting working.
- Question (7): How can I get all species stored in table `names_valid`?
- Answer:
- Use the query from $MysqlSelect['AlreadyInDatabase'] in config.php as a template and modify it to e.g.:
SELECT CONCAT( `names_genera`.`name`, ' ', IFNULL(CONCAT('(', `names_subgenus`.`name`, ')'),''), ' ', `names_species`.`name`, ' ', IFNULL( CONCAT( IF(STRCMP(IFNULL(`names_valid`.`in_brackets`,''),1),'','('), `names_authors`.`authors_short`, IF(STRCMP(IFNULL(`names_valid`.`in_brackets`,''),1),', ','), ') ), 'No reference given ,' ), IFNULL(CONCAT('Subfamily: ', `names_subfamily`.`name`), 'Subfamily: ???'), IFNULL(CONCAT(', Subtribe: ', `names_subtribe`.`name`),', Subtribe: ???'), IFNULL(CONCAT(', Tribe: ', `names_tribe`.`name`),', Tribe: ???') ) AS 'text' FROM `names_valid` LEFT JOIN `names_authors` ON `names_valid`.`descriptor_name_id` = `names_authors`.`id` LEFT JOIN `names_genera` ON `names_valid`.`genus_name_id` = `names_genera`.`id` LEFT JOIN `names_species` ON `names_valid`.`species_name_id` = `names_species`.`id` LEFT JOIN `names_subfamily` ON `names_valid`.`subfamily_name_id` = `names_subfamily`.`id` LEFT JOIN `names_subgenus` ON `names_valid`.`subgenus_name_id` = `names_subgenus`.`id` LEFT JOIN `names_tribe` ON `names_valid`.`tribe_name_id` = `names_tribe`.`id` LEFT JOIN `names_subtribe` ON `names_valid`.`subtribe_name_id` = `names_subtribe`.`id` ORDER BY `names_genera`.`name`, `names_species`.`name` ASC;
Copy this SQL. Select database chirokey_pupae > , insert clipboard content, , to *.csv or whatever. - Question (8): How can I change the layout?
- Answer:
- There exist to stylesheets in /structure/css/: basic.css for screen and print.css. You can modify them with valid CSS properties.
- Question (9): Is the key limited to only one taxagroup?
- Answer:
- Well, you can use this program for other taxagroups as well. But it's a little tricky to setup.
- you have to empty tables:
- `images`, `morph_attrib`, `names_authors`, `names_genera`, `names_species`, `names_subfamily`, `names_subgenus`, `names_subtribe`, `names_synonyms`, `names_tribe`, `names_valid`
- `characters` as well. Note: this table uses only fields `id`, `names_valid_id`, `names_authors_id`, `notes`, `genus_info`, `ecology` to communicate with the program. So you can alter all other fields to characters you want to search for.
- delete all images in folder species
- insert appropriate systematic names
- insert morphological characters in table `morph_attrib`. Note: you need 1 character to be the default. This can set in table `names_subfamily`.`morph_attrib_id` by a comma separated list of at least 1 id from table `morph_attrib`.
- complete the key with your own images, references and so on
- Question (10): How can I change the layout?
- Answer:
- There exist to stylesheets in /structure/css/: basic.css for screen and print.css. You can modify them with valid CSS properties.
Still to do...
See separate documentation Programmers documentation of the interactive chirokey.
"Logfile"
See separate documentation Programmers documentation of the interactive chirokey.
Acknowledgements
Thanks to free software and the people distributing and developping it. This key could be written with the powerful free software Quanta Plus and is powered by: apachefriends (php, Apache-server, MySQL).
I also want to thank Sebastian W. Ruhbaum for initial help concerning the database structure.

