<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bgbm.org/gps/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GabiDroege</id>
	<title>GGBN Portal Software - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bgbm.org/gps/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GabiDroege"/>
	<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php/Special:Contributions/GabiDroege"/>
	<updated>2026-06-08T03:47:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=102</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=102"/>
		<updated>2016-09-22T12:53:44Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough), should be an URL if you want to use Annosys&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Production/Debug Mode==&lt;br /&gt;
Switching Production/Debug Mode can be done in my_portal/web/index.php&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
Navigation menu is located in frontend/views/layouts/main.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Start page, news section (wiki api) is located in frontend/controllers/SiteController.php&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in COMMON_PORTALFILES/common/config/bootstrap.php: add the new portal folder here; required for Yii import routines&lt;br /&gt;
*in COMMON_PORTALFILES/environnments/index.php: add the new portal folder here; the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
*COMMON_PORTALFILES/NEW_Portal/config/params.php and main.php: change database, SOLR and all other parameters&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=101</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=101"/>
		<updated>2016-09-22T12:50:39Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Running multiple GPS portals in parallel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough), should be an URL if you want to use Annosys&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
Navigation menu is located in frontend/views/layouts/main.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Start page, news section (wiki api) is located in frontend/controllers/SiteController.php&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in COMMON_PORTALFILES/common/config/bootstrap.php: add the new portal folder here; required for Yii import routines&lt;br /&gt;
*in COMMON_PORTALFILES/environnments/index.php: add the new portal folder here; the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
*COMMON_PORTALFILES/NEW_Portal/config/params.php and main.php: change database, SOLR and all other parameters&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Search_Feature&amp;diff=100</id>
		<title>Search Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Search_Feature&amp;diff=100"/>
		<updated>2016-08-30T07:46:47Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Retrieved from Common folder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Search Form=&lt;br /&gt;
* 2 main controllers: Search &amp;amp; WebsiteSearch&lt;br /&gt;
** Local WebsitesearchController extends CommonWebsitesearchController&lt;br /&gt;
** Local SearchController &lt;br /&gt;
&lt;br /&gt;
==views/search/search.php==&lt;br /&gt;
Contains some of the display specifications&lt;br /&gt;
* website search tabs (e.g. GGBN) can be switched on/off in config/params.php &lt;br /&gt;
* full code identical for WFO and GGBN; can be customized, but for updates this script should be kept generic&lt;br /&gt;
&lt;br /&gt;
==models/SearchForm.php==&lt;br /&gt;
* extends CommonSearchForm, but contains a lot of customized styling (e.g. labels of all form fields)&lt;br /&gt;
&lt;br /&gt;
==Retrieved from Common folder==&lt;br /&gt;
* views/search/mapSearch.php&lt;br /&gt;
* views/search/searchFieldSelection.php&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Search_Feature&amp;diff=99</id>
		<title>Search Feature</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Search_Feature&amp;diff=99"/>
		<updated>2016-08-30T07:30:12Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: Created page with &amp;quot;=Search Form= * 2 main controllers: Search &amp;amp; WebsiteSearch ** Local WebsitesearchController extends CommonWebsitesearchController ** Local SearchController   ==views/search/se...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Search Form=&lt;br /&gt;
* 2 main controllers: Search &amp;amp; WebsiteSearch&lt;br /&gt;
** Local WebsitesearchController extends CommonWebsitesearchController&lt;br /&gt;
** Local SearchController &lt;br /&gt;
&lt;br /&gt;
==views/search/search.php==&lt;br /&gt;
Contains some of the display specifications&lt;br /&gt;
* website search tabs (e.g. GGBN) can be switched on/off in config/params.php &lt;br /&gt;
* full code identical for WFO and GGBN; can be customized, but for updates this script should be kept generic&lt;br /&gt;
&lt;br /&gt;
==models/SearchForm.php==&lt;br /&gt;
* extends CommonSearchForm, but contains a lot of customized styling (e.g. labels of all form fields)&lt;br /&gt;
&lt;br /&gt;
==Retrieved from Common folder==&lt;br /&gt;
* views/search/mapSearch.php&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=98</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=98"/>
		<updated>2016-03-24T09:00:11Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Running multiple GPS portals in parallel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough), should be an URL if you want to use Annosys&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
Navigation menu is located in frontend/views/layouts/main.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Start page, news section (wiki api) is located in frontend/controllers/SiteController.php&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in COMMON_PORTALFILES/common/config/bootstrap.php: add the new portal folder here; required for Yii import routines&lt;br /&gt;
*in COMMON_PORTALFILES/environnments/index.php: add the new portal folder here; the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
*in the new portal folder: all namespaces must be replaced by the new portal name&lt;br /&gt;
*COMMON_PORTALFILES/NEW_Portal/config/params.php and main.php: change database, SOLR and all other parameters&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=97</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=97"/>
		<updated>2016-03-17T07:18:09Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough), should be an URL if you want to use Annosys&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
Navigation menu is located in frontend/views/layouts/main.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Start page, news section (wiki api) is located in frontend/controllers/SiteController.php&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=96</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=96"/>
		<updated>2016-03-17T07:11:30Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Personalisation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough), should be an URL if you want to use Annosys&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
Navigation menu is located in frontend/views/layouts/main.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Start page, news section (wiki api) is located in frontend/controllers/SiteController.php&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=79</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=79"/>
		<updated>2016-02-09T16:12:18Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* SEARCH&lt;br /&gt;
*Home&lt;br /&gt;
**Main_Page | GPS Wiki&lt;br /&gt;
&lt;br /&gt;
*Resources&lt;br /&gt;
**GGBN_specific_configuration | GGBN specific configuration&lt;br /&gt;
**http://wiki.bgbm.org/bps/ | B-HIT Wiki&lt;br /&gt;
&lt;br /&gt;
*Instances&lt;br /&gt;
**http://www.ggbn.org | GGBN&lt;br /&gt;
**http://wfospecimens.cybertaxonomy.org/ | World Flora Online Specimens&lt;br /&gt;
&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=78</id>
		<title>GGBN specific configuration</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=78"/>
		<updated>2016-02-09T16:10:12Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: GabiDroege moved page GGBN specific- configuration to GGBN specific configuration without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Several views are required for the counts-box on start page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `counts` AS&lt;br /&gt;
    select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;DNA&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;DNA&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Tissues&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;tissue&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Cultures&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;Culture&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;eVouchers&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;eVoucher&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;Specimens&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;specimen&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Unknown&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;unknown&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Enviros&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;environmental sample&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`grouped_fullscientificname`.`fullscientificname`) AS `counts`,&lt;br /&gt;
        &#039;Taxa&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`grouped_fullscientificname` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `families_view`.`family`) AS `counts`,&lt;br /&gt;
        &#039;Families&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`families_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `genera_view`.`genus`) AS `counts`,&lt;br /&gt;
        &#039;Genera&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`genera_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `species_view`.`species`) AS `counts`,&lt;br /&gt;
        &#039;Species&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`species_view`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `families_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`family` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`family` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`family` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `genera_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`genus` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`genus` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`genus` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `grouped_fullscientificname` AS&lt;br /&gt;
    select &lt;br /&gt;
        `identification`.`fullScientificName` AS `fullscientificname`&lt;br /&gt;
    from&lt;br /&gt;
        `identification`&lt;br /&gt;
    group by `identification`.`fullScientificName`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `species_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`name` `n`&lt;br /&gt;
        join `backbone`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`name` `n`&lt;br /&gt;
        join `backbone_col`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`name` `n`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file. Contact us for more information.&lt;br /&gt;
* For user management (login/shopping), a few extra tables are required. Follow the instructions from the file common/controllers/CommonPermissionController.php to create and populate them if you do not already have them from the SQL-Dump. You will also need an extra view for the statistics:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `shopping_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `oc`.`fk_tripleidstoreid` AS `tripleidstoreid`,&lt;br /&gt;
        `bs`.`id` AS `data_source_id`,&lt;br /&gt;
        `pit`.`parentInstitutionID` AS `parentInstitutionID`,&lt;br /&gt;
        `pit`.`institutionShort` AS `institutionShort`,&lt;br /&gt;
        `pit`.`logoURL` AS `logoURL`&lt;br /&gt;
    from&lt;br /&gt;
        ((`bio_datasource` `bs`&lt;br /&gt;
        join `occurrence` `oc` ON ((`bs`.`id` = `oc`.`fk_datasourceid`)))&lt;br /&gt;
        join `parentInstitution` `pit` ON ((`bs`.`fk_parentInstitutionid` = `pit`.`parentInstitutionID`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=77</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=77"/>
		<updated>2016-02-09T16:07:16Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* GGBN specific configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
There is also a core for the statistics pages (&amp;lt;code&amp;gt;ggbn_stats&amp;lt;/code&amp;gt;).&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;viewsCountsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN specific views containing some counts (number of species, dna, ...). Look in the &#039;&#039;&#039;GGBN specific configuration&#039;&#039;&#039; for the SQL statements.&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. If Tomcat is running through XAMPP, you might have a part of the logs in the catalina.bat window. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=76</id>
		<title>GGBN specific configuration</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=76"/>
		<updated>2016-02-09T16:06:46Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* GGBN specific configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Several views are required for the counts-box on start page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `counts` AS&lt;br /&gt;
    select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;DNA&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;DNA&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Tissues&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;tissue&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Cultures&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;Culture&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;eVouchers&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;eVoucher&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;Specimens&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;specimen&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Unknown&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;unknown&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Enviros&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;environmental sample&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`grouped_fullscientificname`.`fullscientificname`) AS `counts`,&lt;br /&gt;
        &#039;Taxa&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`grouped_fullscientificname` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `families_view`.`family`) AS `counts`,&lt;br /&gt;
        &#039;Families&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`families_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `genera_view`.`genus`) AS `counts`,&lt;br /&gt;
        &#039;Genera&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`genera_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `species_view`.`species`) AS `counts`,&lt;br /&gt;
        &#039;Species&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`species_view`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `families_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`family` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`family` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`family` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `genera_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`genus` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`genus` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`genus` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `grouped_fullscientificname` AS&lt;br /&gt;
    select &lt;br /&gt;
        `identification`.`fullScientificName` AS `fullscientificname`&lt;br /&gt;
    from&lt;br /&gt;
        `identification`&lt;br /&gt;
    group by `identification`.`fullScientificName`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `species_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`name` `n`&lt;br /&gt;
        join `backbone`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`name` `n`&lt;br /&gt;
        join `backbone_col`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`name` `n`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file. Contact us for more information.&lt;br /&gt;
* For user management (login/shopping), a few extra tables are required. Follow the instructions from the file common/controllers/CommonPermissionController.php to create and populate them if you do not already have them from the SQL-Dump. You will also need an extra view for the statistics:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `shopping_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `oc`.`fk_tripleidstoreid` AS `tripleidstoreid`,&lt;br /&gt;
        `bs`.`id` AS `data_source_id`,&lt;br /&gt;
        `pit`.`parentInstitutionID` AS `parentInstitutionID`,&lt;br /&gt;
        `pit`.`institutionShort` AS `institutionShort`,&lt;br /&gt;
        `pit`.`logoURL` AS `logoURL`&lt;br /&gt;
    from&lt;br /&gt;
        ((`bio_datasource` `bs`&lt;br /&gt;
        join `occurrence` `oc` ON ((`bs`.`id` = `oc`.`fk_datasourceid`)))&lt;br /&gt;
        join `parentInstitution` `pit` ON ((`bs`.`fk_parentInstitutionid` = `pit`.`parentInstitutionID`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=75</id>
		<title>GGBN specific configuration</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=GGBN_specific_configuration&amp;diff=75"/>
		<updated>2016-02-09T16:06:34Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: Created page with &amp;quot;=GGBN specific configuration= * Several views are required for the counts-box on start page. &amp;lt;pre&amp;gt; CREATE      ALGORITHM = UNDEFINED      DEFINER = `root`@`localhost`      SQL...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=GGBN specific configuration=&lt;br /&gt;
* Several views are required for the counts-box on start page.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `counts` AS&lt;br /&gt;
    select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;DNA&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;DNA&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Tissues&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;tissue&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Cultures&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;Culture&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;eVouchers&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;eVoucher&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`,&lt;br /&gt;
        &#039;Specimens&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;specimen&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Unknown&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;unknown&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`ro`.`occurrenceid`) AS `counts`, &#039;Enviros&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        (`ggbn_index`.`rawoccurrence` `ro`&lt;br /&gt;
        join `ggbn_index`.`unitkind` `uk` ON ((`ro`.`fk_kindofunitid` = `uk`.`unitkindid`)))&lt;br /&gt;
    where&lt;br /&gt;
        (`uk`.`kindofunit_clean` = &#039;environmental sample&#039;) &lt;br /&gt;
    union select &lt;br /&gt;
        count(`grouped_fullscientificname`.`fullscientificname`) AS `counts`,&lt;br /&gt;
        &#039;Taxa&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`grouped_fullscientificname` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `families_view`.`family`) AS `counts`,&lt;br /&gt;
        &#039;Families&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`families_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `genera_view`.`genus`) AS `counts`,&lt;br /&gt;
        &#039;Genera&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`genera_view` &lt;br /&gt;
    union select &lt;br /&gt;
        count(distinct `species_view`.`species`) AS `counts`,&lt;br /&gt;
        &#039;Species&#039; AS `kind`&lt;br /&gt;
    from&lt;br /&gt;
        `ggbn_index`.`species_view`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `families_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`family` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`family` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`family` AS `family`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`family` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`familykey` = `n`.`familyKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `genera_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`genus` `f`&lt;br /&gt;
        join `backbone`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`genus` `f`&lt;br /&gt;
        join `backbone_col`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`))) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `f`.`genus` AS `genus`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`genus` `f`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n` ON ((`f`.`genuskey` = `n`.`genusKey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `grouped_fullscientificname` AS&lt;br /&gt;
    select &lt;br /&gt;
        `identification`.`fullScientificName` AS `fullscientificname`&lt;br /&gt;
    from&lt;br /&gt;
        `identification`&lt;br /&gt;
    group by `identification`.`fullScientificName`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `species_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone`.`name` `n`&lt;br /&gt;
        join `backbone`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`gbifKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_col`.`name` `n`&lt;br /&gt;
        join `backbone_col`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`colKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;)) &lt;br /&gt;
    union select distinct&lt;br /&gt;
        `n2`.`canonicalName` AS `species`&lt;br /&gt;
    from&lt;br /&gt;
        ((`backbone_ncbi`.`name` `n`&lt;br /&gt;
        join `backbone_ncbi`.`name` `n2` ON ((`n`.`acceptedKey` = `n2`.`namekey`)))&lt;br /&gt;
        join `ggbn_index`.`identification` `i` ON ((`i`.`ncbiKey` = `n`.`acceptedKey`)))&lt;br /&gt;
    where&lt;br /&gt;
        ((`n`.`rank` = &#039;SPECIES&#039;)&lt;br /&gt;
            and (`n2`.`rank` = &#039;SPECIES&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file. Contact us for more information.&lt;br /&gt;
* For user management (login/shopping), a few extra tables are required. Follow the instructions from the file common/controllers/CommonPermissionController.php to create and populate them if you do not already have them from the SQL-Dump. You will also need an extra view for the statistics:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE &lt;br /&gt;
    ALGORITHM = UNDEFINED &lt;br /&gt;
    DEFINER = `root`@`localhost` &lt;br /&gt;
    SQL SECURITY DEFINER&lt;br /&gt;
VIEW `shopping_view` AS&lt;br /&gt;
    select distinct&lt;br /&gt;
        `oc`.`fk_tripleidstoreid` AS `tripleidstoreid`,&lt;br /&gt;
        `bs`.`id` AS `data_source_id`,&lt;br /&gt;
        `pit`.`parentInstitutionID` AS `parentInstitutionID`,&lt;br /&gt;
        `pit`.`institutionShort` AS `institutionShort`,&lt;br /&gt;
        `pit`.`logoURL` AS `logoURL`&lt;br /&gt;
    from&lt;br /&gt;
        ((`bio_datasource` `bs`&lt;br /&gt;
        join `occurrence` `oc` ON ((`bs`.`id` = `oc`.`fk_datasourceid`)))&lt;br /&gt;
        join `parentInstitution` `pit` ON ((`bs`.`fk_parentInstitutionid` = `pit`.`parentInstitutionID`)))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=65</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=65"/>
		<updated>2016-02-05T13:52:41Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the [http://www.yiiframework.com/ Yii framework] and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
* Several views are required for the counts-box on start page.&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=64</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=64"/>
		<updated>2016-02-05T13:51:21Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Running multiple GPS portals in parallel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|300px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
* Several views are required for the counts-box on start page.&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=63</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=63"/>
		<updated>2016-02-05T13:51:00Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Running multiple GPS portals in parallel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg|thumb|left|400px|Example of two portals running in parallel, specific files are located in &amp;quot;ggbnportal&amp;quot; and &amp;quot;worldfloraonline&amp;quot;. All other folders are used by both portal instances]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
* Several views are required for the counts-box on start page.&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=62</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=62"/>
		<updated>2016-02-05T13:49:03Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* GGBN specific configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (from 5.5! tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
*Edit the Apache configuration file, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Alias /ggbn_portal &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/var/www/my_portal/frontend/web&amp;quot;&amp;gt;&lt;br /&gt;
   Options All&lt;br /&gt;
   AllowOverride All&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
* Several views are required for the counts-box on start page.&lt;br /&gt;
* The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
* The parentInstitution table is used for the contacts and must be filled manually.&lt;br /&gt;
* The GGBN registry is based on the NCD software and requires an additional database connection in the config file.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=58</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=58"/>
		<updated>2016-02-03T14:20:47Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* You will need */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested with [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=57</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=57"/>
		<updated>2016-02-03T14:19:05Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Workflow */ workflow description added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
Data are provided through BioCASe and IPT. The harvester [http://wiki.bgbm.org/bhit B-HIT] stores all original data in a MySQL database. To find out more about B-HIT please check out the [http://wiki.bgbm.org/bhit B-HIT Wiki]. After harvesting data are cleaned and can be matched against different taxonomic backbones. A SOLR instance is created on top of the MySQL database. The GPS itself requires access to the SOLR index as well as the MySQL index.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=56</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=56"/>
		<updated>2016-02-03T14:09:49Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=55</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=55"/>
		<updated>2016-02-03T14:09:35Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network ([http://www.ggbn.org | GGBN]). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016)). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with [http://wiki.bgbm.org/bhit/ | B-HIT].&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=54</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=54"/>
		<updated>2016-02-03T13:08:30Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* SEARCH&lt;br /&gt;
*Home&lt;br /&gt;
**Main_Page | GPS Wiki&lt;br /&gt;
&lt;br /&gt;
*Resources&lt;br /&gt;
**http://www.ggbn.org | GGBN Home&lt;br /&gt;
**http://wiki.bgbm.org/bps/ | B-HIT Wiki&lt;br /&gt;
&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=53</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=53"/>
		<updated>2016-02-03T13:06:24Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Workflow */ added figure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network (GGBN). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with B-HIT.&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
[[File:Workflow GPS.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:gps_folders.jpg]]&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=File:Workflow_GPS.jpg&amp;diff=52</id>
		<title>File:Workflow GPS.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=File:Workflow_GPS.jpg&amp;diff=52"/>
		<updated>2016-02-03T13:05:43Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Common.js&amp;diff=51</id>
		<title>MediaWiki:Common.js</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Common.js&amp;diff=51"/>
		<updated>2016-02-03T13:00:29Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: Created page with &amp;quot;/* Any JavaScript here will be loaded for all users on every page load. */ document.getElementsByTagName(&amp;quot;body&amp;quot;)[0].classList.remove(&amp;quot;vector-animateLayout&amp;quot;);  if(skin==&amp;quot;ggbn_g...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* Any JavaScript here will be loaded for all users on every page load. */&lt;br /&gt;
document.getElementsByTagName(&amp;quot;body&amp;quot;)[0].classList.remove(&amp;quot;vector-animateLayout&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if(skin==&amp;quot;ggbn_gps&amp;quot;){&lt;br /&gt;
	toolbox = document.getElementById(&amp;quot;p-tb&amp;quot;);&lt;br /&gt;
	headmenu = document.getElementById(&amp;quot;mw-head&amp;quot;);&lt;br /&gt;
	if(toolbox &amp;amp;&amp;amp; headmenu){&lt;br /&gt;
		toolbox.parentNode.removeChild(toolbox);&lt;br /&gt;
		toolbox.setAttribute(&amp;quot;class&amp;quot;,&amp;quot;vectorTabs&amp;quot;);&lt;br /&gt;
		headmenu.appendChild(toolbox);&lt;br /&gt;
	}&lt;br /&gt;
	portalLinks = document.getElementsByClassName(&amp;quot;portal&amp;quot;);&lt;br /&gt;
	for(i=0;i&amp;lt;portalLinks.length;i++){&lt;br /&gt;
		var portalLink = portalLinks[i];&lt;br /&gt;
		portalLink.setAttribute(&#039;title&#039;,portalLink.getAttribute(&#039;id&#039;).substring(2).replace(new RegExp(&#039;_&#039;, &#039;g&#039;), &#039; &#039;));&lt;br /&gt;
	}&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=50</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=50"/>
		<updated>2016-02-03T12:58:30Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* SEARCH&lt;br /&gt;
*Home&lt;br /&gt;
**Main_Page | GGBN Wiki&lt;br /&gt;
**http://www.ggbn.org | GGBN Home&lt;br /&gt;
&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=49</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=49"/>
		<updated>2016-02-03T12:51:45Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: 1 revision: sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=48</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=MediaWiki:Sidebar&amp;diff=48"/>
		<updated>2016-02-03T12:50:48Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: Created page with &amp;quot;* navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage ** helppage|help * SEARCH * TOOLBOX * LANGUAGES&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=45</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=45"/>
		<updated>2016-02-03T09:33:30Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: added introduction, to be continued&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The GGBN Portal Software (GPS) has been developed by the Botanic Garden and Botanical Museum Berlin-Dahlem for the Global Genome Biodiversity Network (GGBN). The project was funded by the German Research Foundation (DFG (01/2014 - 03/2016). The software is written in php using the Yii framework and fully open source. The GPS allows costumization and therefore can be used for other special interest networks too. It is optimized for an underlying SOLR instance, data are harvested with B-HIT.&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
*in common/config/bootstrap: the name of all folders that Yii2 should go through (for imports and so)&lt;br /&gt;
*in environnments/index.php: the name of the folders that will be exposed and therefore where Yii should be authorized to write logs and handle the CSS files&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=43</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=43"/>
		<updated>2016-02-03T08:54:51Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: /* Adding new search fields or fields to display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Presentation=&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
==You will need==&lt;br /&gt;
* Apache (tested with Apache/2.4.7 (Ubuntu), Apache/2.2.22 (Debian), Apache/2.4.10 (Win64)) with libapache2-mod-php5&lt;br /&gt;
* PHP5 (tested with  5.5.9, 5.5.30 and 5.5.15). You also might need to install php5-xsl, php5-gd and php5-mysql.&lt;br /&gt;
* a SOLR instance (tested with Apache SOLR 4.9.0). Contact us for getting the appropriate SOLR configuration files.&lt;br /&gt;
* a MySQL database (tested with MySQL 5.5.46). It will contain data harvested thanks to [http://wiki.bgbm.org/bhit/index.php/Main_Page B-HIT]&lt;br /&gt;
&lt;br /&gt;
Yii (version 2) will be fully contained in the subversion code of the portal software.&lt;br /&gt;
&lt;br /&gt;
==Copy a working version from the svn ==&lt;br /&gt;
Create a destination folder, for the rest of this documentation we will choose &amp;quot;my_portal&amp;quot; in your web-folder (ie. /var/www/, or *WINPATH*).&amp;lt;br/&amp;gt;&lt;br /&gt;
Get http://ww2.biocase.org/svn/dnabank/Dnabank_Portal/ggbn_portal/trunk/ into &amp;quot;my_portal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&#039;&#039;TBD&#039;&#039;&lt;br /&gt;
&#039;&#039;yii, Apache, rights, SOLR (SOLR config files also &amp;amp; Java)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
First, let say we want to access the portal under the URL http://localhost/ggbn_portal.&lt;br /&gt;
&lt;br /&gt;
*Check that the Apache User has writing/editing rights in the whole &amp;quot;my_portal&amp;quot; folder.&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/main.php&amp;quot;.&lt;br /&gt;
**Configure the portal URL: &amp;lt;code&amp;gt;$baseUrl = str_replace ( &#039;/SUBDIR_AFTER_YOUR_WEB_FOLDER/my_portal/frontend/web&#039;, &#039;/ggbn_portal&#039;, (new Request ())-&amp;gt;getBaseUrl () );&amp;lt;/code&amp;gt;&lt;br /&gt;
**Configure the MySQL database credentials &amp;lt;code&amp;gt; &lt;br /&gt;
                                                &#039;db&#039; =&amp;gt; [&lt;br /&gt;
                                                &#039;class&#039; =&amp;gt; &#039;\yii\db\Connection&#039;,&lt;br /&gt;
                                                &#039;dsn&#039; =&amp;gt; &#039;mysql:host=IP;dbname=DBNAME&#039;,&lt;br /&gt;
                                                &#039;username&#039; =&amp;gt; &#039;USER&#039;,&lt;br /&gt;
                                                &#039;password&#039; =&amp;gt; &#039;PASS&#039;,&lt;br /&gt;
                                                &#039;charset&#039; =&amp;gt; &#039;utf8&#039; &lt;br /&gt;
                                ],&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the file &amp;quot;my_portal/frontend/config/params.php&amp;quot;.&lt;br /&gt;
**e-mails&lt;br /&gt;
***Configure the admin e-mail &amp;lt;code&amp;gt;&#039;adminEmail&#039; =&amp;gt; &#039;ADMIN@DOMAIN&#039;,&amp;lt;/code&amp;gt;. The admin will get error/bug messages.&lt;br /&gt;
***Configure the support e-mail(s) &amp;lt;code&amp;gt;&#039;supportEmail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. &lt;br /&gt;
***Configure the feedback e-mail(s) &amp;lt;code&amp;gt;&#039;feedbackMail&#039; =&amp;gt; [&#039;MAIL1&#039;,&#039;MAIL2&#039;..],&amp;lt;/code&amp;gt;. They will get the messages sent with the feedback function.&lt;br /&gt;
***Configure the no-reply-mail (who is supposed to sent e-mail(s) to the users) &amp;lt;code&amp;gt;&#039;noreplyMail&#039;=&amp;gt;&#039;MAIL&#039;&lt;br /&gt;
**Configure the location of the DarwinCore Archives (harvested with B-HIT) &amp;lt;code&amp;gt;&#039;dwcArchivesPath&#039; =&amp;gt; &#039;PATH_TO_THE_PARENT_FOLDER&#039; ,&amp;lt;/code&amp;gt;. Check the access rights! (read is enough)&lt;br /&gt;
**Configure the location(root) of your SOLR instance &amp;lt;code&amp;gt;&#039;solrhost&#039;=&amp;gt; &#039;SOLR_HOST&#039;&amp;lt;/code&amp;gt; and the SOLR core names &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
                                                $searchname=&amp;quot;SEARCH_CORE&amp;quot;;&lt;br /&gt;
                                                $previewname=&amp;quot;PREVIEW_CORE&amp;quot;;&lt;br /&gt;
                                                $detailsname=&amp;quot;DETAILS_CORE&amp;quot;;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
**Set the temporary folder &amp;lt;code&amp;gt;&#039;tmpFolder&#039;=&amp;gt;&#039;TEMP_FOLDER&#039;&amp;lt;/code&amp;gt;. Check the access rights! (write is needed)&lt;br /&gt;
**Configure the options&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;noBack&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: a special backbone is used&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;shopping&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: the shopping system is enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useLogin&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: is the login enabled or disabled&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;newsService&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: uses the GGBN news services - if it has to be used with a different wiki news, edit the SiteController.py&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayMore&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with internal links on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;displayExternals&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: displays the categories with external links (GBIF, BOLD, NCBI...) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;ABCDdownloable&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: ABCD files are downloadable or not&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;useAnnosys&#039;=&amp;gt;true_OR_false&amp;lt;/code&amp;gt;: link to annosys (annotation system) on the details page&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;annosysAP&#039;=&amp;gt;&#039;https://annosys.bgbm.fu-berlin.de/AnnoSys/AnnoSys?providerURL=&#039;&amp;lt;/code&amp;gt;: root URL for Annosys&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteName&#039;=&amp;gt;&#039;my_portal&#039;,&amp;lt;/code&amp;gt;: the portal name (used in the URL)&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;siteTitle&#039;=&amp;gt;&#039;GGBN Portal&#039;,&amp;lt;/code&amp;gt;: the default site name/title&lt;br /&gt;
***&amp;lt;code&amp;gt;&#039;catalogNumberClickable&#039;=&amp;gt;true,&amp;lt;/code&amp;gt;: if the catalogNumber/UnitID can be clickable on the details page&lt;br /&gt;
&lt;br /&gt;
=Personalisation=&lt;br /&gt;
If you want to change the icon (favicon), it is located in frontend/web.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the slider images on the home page, they are located in frontend/web/images/slider. Then you will have to modify the view in frontend/view/site/index.php to load the pictures you chose.&amp;lt;br/&amp;gt;&lt;br /&gt;
If you want to change the menu icons, they are located in frontend/web/images/icons.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The CSS and JS files are also in the frontend/web folder.&lt;br /&gt;
&lt;br /&gt;
=Adding new search fields or fields to display=&lt;br /&gt;
==Adding them in SOLR==&lt;br /&gt;
*edit the schema.xml file in SOLR and add the new fields you want to have. If you want to search for them, edit the file for the search core *_search/conf/schema.xml. If wou want to display them in the preview, edit the file for the preview core *_preview/conf/schema.xml. If you need it for the details page, edit the file for the details core *_details/conf/schema.xml. Generally: if you want to search for it (search core), the field has to be indexed, but not mandatory stored. If you want to display it (preview/details), it has to be stored but not indexed. The tripleidstoreid or the occurrenceid *always* has to be indexed.&lt;br /&gt;
*restart Tomcat&lt;br /&gt;
&#039;&#039;&#039;Important &#039;&#039;&#039;: always restart Tomcat (service tomcat8 restart) when you modify the schema.xml file.&lt;br /&gt;
*edit the Java file corresponding to the core that need to be updated- for example, if you want to index or store the recordbasis, add the following method&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 private void addRecordbasis(int datasourceid) throws ClassNotFoundException, SQLException {&lt;br /&gt;
        System.out.println(&amp;quot;RUN RECORDBASIS &amp;quot;);&lt;br /&gt;
        if(tripleidstoreids.size()&amp;gt;0){&lt;br /&gt;
            String queryTID =&lt;br /&gt;
                    &amp;quot;SELECT distinct fk_tripleidstoreid as tripleidstoreid,  &amp;quot;&lt;br /&gt;
                            + &amp;quot;IFNULL(recordbasis,&#039;N/A&#039;) as recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; FROM recordbasis &amp;quot;&lt;br /&gt;
                            + &amp;quot; JOIN occurrence ON recordbasisid = fk_recordbasisid &amp;quot;&lt;br /&gt;
                            + &amp;quot; WHERE fk_tripleidstoreid in (&amp;quot;+StringUtils.join(tripleidstoreids,&amp;quot;, &amp;quot;)+&amp;quot;) &amp;quot;&lt;br /&gt;
                            + &amp;quot; AND fk_datasourceid =&amp;quot;+datasourceid&lt;br /&gt;
                            + &amp;quot; ORDER BY fk_tripleidstoreid &amp;quot;;&lt;br /&gt;
            update( queryTID,tripleidstoreids.size());&lt;br /&gt;
        }&lt;br /&gt;
        System.gc();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt; and add a call to that method in the &#039;&#039;&#039;handleDocuments&#039;&#039;&#039; method:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
        occurrencesDone.clear();&lt;br /&gt;
        multivalueForbidden=false;&lt;br /&gt;
        addRecordbasis(datasourceid );&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
*existing documents can not be updated in SOLR in our case (only if everything was &amp;quot;stored&amp;quot;). So first, delete the old data from the core. Depending on how many records there are, you might have to delete the data for a specific repository only solrServer:solrPort/solr/coreName_SEARCH_OR_PREVIEW_OR_DETAILS/update?stream.body=&amp;lt;delete&amp;gt;&amp;lt;query&amp;gt;YOUR_LIMITATION_FIELD:*&amp;lt;/query&amp;gt;&amp;lt;/delete&amp;gt;&amp;amp;commit=true This &amp;quot;limitation_field&amp;quot; must be an indexed value in the core. If you don&#039;t have a lot of data, you can put &amp;lt;query&amp;gt;*:*&amp;lt;/query&amp;gt; as the generation of the new SOLR index will be fast enough (5-10min per Core for 180.000 records).&lt;br /&gt;
*per default, it will index this new field for each datasource. If it&#039;s still missing at the end for some datasources, or if you only want to do it for specific datasources, edit the &#039;&#039;&#039;main&#039;&#039;&#039; method &amp;lt;code&amp;gt;for (int i=0;i&amp;lt;166;i++)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding them in the portal==&lt;br /&gt;
*Edit the SearchController file (controllers)(additions can be made in the CommonSearchController, deletion only in the specific SearchController if you have several portals running in parallel with the same installation)&lt;br /&gt;
**if it&#039;s a dropdownlist, add the name of the field in the variable &amp;lt;code&amp;gt;$knownLParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
**if it&#039;s a simple term or a suggestion list, add the name of the field in the variable &amp;lt;code&amp;gt;$knownParams&amp;lt;/code&amp;gt;. &lt;br /&gt;
*Edit the SearchForm file (models)(same rule as above), edit the variable &amp;lt;code&amp;gt;$_parameters&amp;lt;/code&amp;gt; - it can be a text, a select(dropdownlist), a suggest, a radio or a range. Also add the public variable with the same name (ie. &amp;lt;code&amp;gt;public $sampleavailability;&amp;lt;/code&amp;gt; and &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
             &#039;sampleavailability&#039; =&amp;gt; [&lt;br /&gt;
             &#039;type&#039; =&amp;gt; &#039;radio&#039;,&lt;br /&gt;
             &#039;name&#039; =&amp;gt; &#039;Sample availability (loan)&#039;,&lt;br /&gt;
             &#039;config&#039; =&amp;gt; [&lt;br /&gt;
                 &#039;size&#039; =&amp;gt; 285,&lt;br /&gt;
                 &#039;maxlength&#039; =&amp;gt; 150,&lt;br /&gt;
                 &#039;name&#039; =&amp;gt; &#039;sampleavailability&#039;&lt;br /&gt;
             ],&lt;br /&gt;
             &#039;hideable&#039; =&amp;gt; &#039;true&#039;&lt;br /&gt;
             ]&lt;br /&gt;
&amp;lt;/code&amp;gt;. It will be automatically displayed in the search form. The &#039;&#039;&#039;hideable&#039;&#039;&#039; parameter specifies if it is displayed per default or if it is only in the accordion.&lt;br /&gt;
Eventually, edit the &#039;&#039;&#039;attribteLabels&#039;&#039;&#039; function such as &amp;lt;code&amp;gt;&#039;sampleavailability&#039; =&amp;gt; &#039;Sample availability (loan)&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
*Edit the listView.php (views) file if it has to be displayed here, or the recordViewTabs.php if it has to be displayed on the details page. Here again, add it to the $suggestFields or $defaultFields or $selectFields or $buttonFields, depending of its type.&lt;br /&gt;
*Edit the file CreateFormManager(vendor) only if it&#039;s a radio button (look how it&#039;s done for cites and sampleavailability).&lt;br /&gt;
*Edit the file SOLRQueryManager(vendor) - for example, if it has to look in the SOLR case-unsensitive value, do as for &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;fullScientificName&#039; :&lt;br /&gt;
           return $field . &#039;_nc:&#039; . $value . &#039;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt; If it&#039;s case sensitive, &lt;br /&gt;
&amp;lt;code&amp;gt;     &lt;br /&gt;
           case &#039;collectioncode&#039; :&lt;br /&gt;
           return $field . &#039;:&amp;quot;&#039; . $value . &#039;&amp;quot;&#039;;&lt;br /&gt;
           break;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Running multiple GPS portals in parallel=&lt;br /&gt;
&lt;br /&gt;
TBD - short description of YII folder structure (MVC), link to Yii documentation; difference frontend-folder and the rest&lt;br /&gt;
&lt;br /&gt;
=GGBN specific configuration=&lt;br /&gt;
    &lt;br /&gt;
The institution has to be filled in bio_datasource (city and institution, for the harvester_factoy like &#039;%Harvester%&#039;) - but first the datasource has to be added (metadata update). It will be used for the repository/registry field in the GGBN portal.&lt;br /&gt;
The parentInstitution table is used for the contacts.&lt;br /&gt;
&lt;br /&gt;
=Debug=&lt;br /&gt;
If something does not work as expected, have a look in the catalina.out file (generated by Tomcat) on the machine where SOLR is running. You will see the last queries sent to SOLR at the end of the file.&lt;br /&gt;
The YII file runtime/log/app.log might also help, and is located in the yii folder on the machine running the portal (ie. advanced/runtime....).&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
	<entry>
		<id>https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=2</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.bgbm.org/gps/index.php?title=Main_Page&amp;diff=2"/>
		<updated>2015-12-16T15:05:49Z</updated>

		<summary type="html">&lt;p&gt;GabiDroege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to the Wiki of the GGBN Portal Software&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Further information about the software will follow soon.&lt;/div&gt;</summary>
		<author><name>GabiDroege</name></author>
	</entry>
</feed>