There is a separate standalone guide for setting up the site databases (the database that includes information about the drupal pages and users etc. not the database for biological records).
This has been done in advance for 9 NC sites ready for setting up with a new partner trust.
Say for example you're creating a Nature Counts site for Happyland Wildlife Trust. Their main website might be happylandwildlifetrust.org
To be consistent with the other NC partner trusts it is recommended that their Nature Counts site sits at record.happylandwildlifetrust.org
In order to set up the record.happylandwildlifetrust.org subdomain you will need to ask someone at Happyland Wildlife Trust to set up the subdomain.
Here's a help page of how to set up a subdomain from some providers:
Basically with all providers you will need to edit the DNS records and add a new record with these characteristics:
Type: A record
Host (the bit of the subdomain): record
Value (which IP address the subdomain is pointed to): 62.182.20.55 (you can find this value here when you log into Clook:
You will also need to add 2 nameservers
Type: NS Record
Host (the bit of the subdomain): record
Value: ns1.clook.net
and
Type: NS Record
Host (the bit of the subdomain): record
Value: ns2.clook.net
You will need to do this before you add the Alias in Cpanel
Log into Cpanel and go to alises:
Type in the new domain you are setting up and press Add Domain:
You will then need to edit the sites.php file on the server's file system to get it to load the right site. Go to Cpanel: https://my.clook.net/clients/clientarea.php?action=productdetails&id=21367
Click on file manager:
Navigate to /public_html/sites
Then edit sites.php
Ignore the encoding warning message that pops up and click on 'Edit'
Put the new record.happylandwildlifetrust.org in the first set of brackets (in single quotation marks as in the screenshot).
Click save changes
The copy of a Nature Counts site (don't use SRWT's NC site because it is set up slightly differently eg. the nature reserves are added as SRWT site location types rather than all the others which are set up as is created using Backup and Migrate: https://www.drupal.org/project/backup_migrate. Back up of 'default database' is used rather than full site because it took too long to load downloading the full site. The only limitation is that it doesn't copy across any images, so images will need to be set for the site logo and two feature images for submitting records. Other logos on the home pages (NBN/BRC etc.) are now hosted on the Nature Counts github and directly linked from there.
The template NC site is currently hosted at: https://nctemplate.simon-rolph.com/
These steps are made to turn the NC site (eg. Nottinghamshire WT NC site) into a generic NC template
The website ID on the indicia configuration is set to 0.
All users are removed except the admin user. Note that the admin password will now be the password from which the site has been copied from, rather than the password it was before. So either reset it back to the password before cloning, or make sure you note down that the password has changed.
All protocols have been deleted. All site tags for protocols have been deleted (which are normally a list of nature reserves). These are re-added at a later stage Tags for Protocols
In order to copy this site across to deploy new sites you need to:
Log in as admin to https://nctemplate.simon-rolph.com/user
Go to configuration > Backup and Migrate
On the Backup tab select Backup Source as 'Default Drupal Database' and Backup Destination to 'Download' then press 'Backup Now':
This empty site can then be used for deploying new sites
Log in as admin to your target site that you have set up
Navigate to 'Extend' (/admin/modules) and search for 'Backup and Migrate' in the module search:
Then tick the box next to 'Backup and Migrate' and click on Install
Then navigate to 'Configuration' (/admin/config) and click on 'Backup and Migrate' which should take you to: /admin/config/development/backup_migrate
Click on the 'Restore' tab. Upload the template site database using the 'Choose file' button and select the backup you downloaded from the NC template site. Also, tick the 'Take site offline' box, it probably makes very little difference but it's best to be safe. It should then look like this:
This should work fine and it should then say:
Restoring the NC template will change the admin password to the same password as the template. In order to change it to a unique password go to 'My account' then to 'Edit' then change the password. Note you'll need to input the admin password for the NC template site as the 'Current password'.
The master indicia website ID setting
Available at: ../admin/config/iform/settings:
Enter the website ID and password then go to the bottom of the page and press 'Submit'
Also whilst you're here go to map setting s and pan and zoom this map to set the default map position for your survey input and mapping pages.
For the initial 5 partner NC sites John van Breda has set up sensitive species lists with an ID. These lists can be edited by visiting: /species-lists/edit?scratchpad_list_id=XXXX where you replace XXXX with the ID that John gave us.
On setting up a new site, if it doesn't yet have its own sensitive species list, you should visit /setup/sensitive-species, then create a list and save it (see Sensitive species list ) Note down the ID of this list! Then edit the link in the menu with this list's ID. Then need to go to all the recording forms and change the scratchpad_list_id to this list ID.
This sensitive species list ID then needs to be copied into some bits of configuration (see below) so keep the ID number to hand.
You will also need to go to Structure > Menus > Main navigation then click on the edit button next to 'Setup sensitive species list':
The update the sensitive species list number here:
to the correct number for that website's sensitive species list.
Log in to the Nature Counts site as admin then click on the content button
Click on Title (circled in red) to arrange the pages in alphabetical order (just makes it easier to compare to the list below). Click on Edit (circled in blue) to edit the page.
What appears on the edit page is different for different types of page. There are basic page content types which just contain some text (usually as html) and then there are indicia pages which contain lots of settings for configuring recording forms or reports.
Accept invite to join an activity - No change
Access denied - No change
Activities - No change
Activity membership administration - No change
Activity summary - No change
Create or edit a nature reserve site - No change
Create or edit a project site - No change
Create or edit a site - No change
Create or edit a species list - No change
Create/Edit an Activity - No change
Download records - Change website ID in Form Structure
Enter a casual record - Change sample:licence_id (see below), scratchpad ID and reference to partner WT in the =About you= section in Form Structure
Enter a list of records - Change sample:licence_id (see below), scratchpad ID and reference to partner WT in the =About you= section in Form Structure
Explore activity records - Change website ID in Form Structure
Explore all records - Change website ID in Form Structure
Explore records (legacy) - DEFUNCT, possibly delete on partner trust sites
Frequently asked questions - Currently not shown to the user on partner trusts other than SRWT's site because the current content is SRWT specific, possibly delete on partner trust sites
Import CSV spreadsheets - Change website_id= and sample:licence_id=
Import instructions - No change
Join an activity - No change
My records - Change website ID in Form Structure
My records (legacy) - DEFUNCT, possibly delete on partner trust sites
My sites - No change
Nature Counts - X Wildlife Trust (home page) - Various changes and any customisation required, see below for details
Nature reserves - No change
Project sites - No change
Record details - No change
Send invites to join an activity - No change
Sensitive species list - No change
Species details - No change
Species Lists - No change
Stop participating in an activity - No change
Survey home - No change
Navigate to Content > Enter a casual record > Edit
and complete the following changes. Then do the same for Enter a list of records.
Make sure that the correct survey dataset is selected, for the 'all records' page and the 'my records' page the survey dataset should be 'General records':
But you can leave the sample method as 'Please select'.
Sensitive species scratchpad
You will need to edit the 2 generic recording forms on each site and change the @scratchpad_list_id setting near the top of the Form Structure from 2020 to the appropriate one for the site:
[sensitivity scratchpad]
@scratchpad_list_id=…
Terms and conditions notice
The text at the top of the recording forms which reads
?You are currently not logged in. Did you know that you can create an Nature Counts account which allows you keep track and edit your records? <a href="/user/login">Log in</a> or <a href="/user/register">create an account</a>. <br>These records are being submitted to <a href="http://www.wildsheffield.com/" target="_top"><strong>Sheffield & Rotherham Wildlife Trust</strong></a>. Please make sure you read the <a href="/terms-conditions">Terms and conditions</a> before proceeding.?
The text in bold needs to be changed to the relevant wildlife trust and link to its homepage
Licence
Update to the correct licence:
1 "Creative Commons Attribution" "CC BY"
2 "Creative Commons Attribution-NonCommercial" "CC BY-NC"
3 "Creative Commons "No Rights Reserved"" "CC0"
4 "Open Government licence (UK)" "OGL"
5 "Creative Commons Attribution-ShareAlike" "CC BY-SA"
6 "Creative Commons Attribution-NoDerivatives" "CC BY-ND"
7 "Creative Commons Attribution-NonCommercial-ShareAlike " "CC BY-NC-SA"
8 "Creative Commons Attribution-NonCommercial-NoDerivs" "CC BY-NC-ND"
9 ""All Rights Reserved"" "ARR"
In the 'Preset settings' update the website ID to the the correct website ID eg: website_id=119
Main pages: ../explore/all-records and ../explore/myrecords
Legacy pages: ../explore/all-records-v1 and ../explore/myrecords-v1
Explore Activity records page: ../activity/explore
The major edits are in the user interface part of the edit page. This is what it looks like to for the newer elastic search pages:
And this is what it looks like for the legacy pages:
The following edits will be need to be done on all four explore pages (my records and all records / elastic search and legacy version of each)
Website ID:
This code needs to be updated so that the bold is changed to the correct website ID
<input type="hidden" class="es-filter-param" data-es-bool-clause="must" data-es-field="metadata.website.id" data-es-query-type="term" value="119" />
Locations:
This Update so that the correct set of locations is able to be accessed for filtering
@indexedLocationTypeIds=[15,1370,2188,1103,2187,5702]
@otherLocationTypeIds=[2412, 17856, 14689] Change to: @otherLocationTypeIds=[2412, 17856, 17964, 17963, 5895, 17965, 17966]
The indexed location type IDs correspond to:
15 = Vice County
1370 = LRC boundary
2188 = Country
1103 = Butterfly Conservation Branch
2187 = National Trust site
5702 = RSPB Reserves
The existing other location type IDs correspond to:
2412 = National Nature Reserve
17856 = Miscellaneous boundaries
14689 = SRWT site
The additional location type IDs you need (which correspond to the available layers for importing from SHP):
17964 = Local Nature Reserve
17963 = Local Wildlife Site
5895 = Area of Outstanding Natural Beauty
17965 = Wildlife Trust Reserve
17966 = Project Site
Add any relevant sites to @indexedLocationTypeIds and @otherLocationTypeIds
Change the elasticseach settings (currently using the alias system)
No need to change this
location_type_ids=1371 refers to:
It's a parameter to the report used to produce the list of sites. 1371 is a location type called "personal recording site" which is the location type ID we are using for user-created sites. There is no need to change it for the other website clones.
Activities (/activities)
No changes required
Instructions for setting up the private/public key pair: Survey builder set-up
Sensitive species list
You can set the scratchpad list used for sensitive species on all the layout builder forms on the settings page – Configuration -> Indicia Layout Builder settings:
../admin/config/iform/iform_layout_builder
Change the terms and conditions to that they refer to the correct Wildlife Trust and change any other content if appropriate.
To do this go to Struture -> Legal documents -> click Edit next to Terms and conditions
Then click edit again here:
And then you'll be able to edit the terms and conditions to change all references from the Trust which the NC site is cloned from to the new Trust:
Leave the main elastic search settings as is
John has updated the 2 Elasticsearch aliases used by Wild Sheffield. The default one (es-wild-sheffield-reports) is set up on the Indicia settings page so applies to all Elasticsearch pages unless overridden. This has access to all websites that share their data to iRecord for public reports and I’ve now added the extra Nature Counts websites to the alias.
So – the default behaviour for an Elasticsearch report on your site (or the other Nature Counts websites if you’ve copied the Elasticsearch settings from the Indicia settings page) is to show all records for all these websites. However, your Explore All Records page has the following hidden input at the top of its Form Structure configuration (on the Edit tab) which forces a filter to your website’s ID – you can change the value appropriately on the other Nature Counts websites:
<input type="hidden" class="es-filter-param" data-es-bool-clause="must" data-es-field="metadata.website.id" data-es-query-type="term" value="119" />
I’ve now done something similar on the Downloads page – this is slightly different because it uses an alternative alias (es-wild-sheffield-verify) to give full precision access to sensitive data. For obvious reasons this alias was previously just your website, but it’s now Wild Sheffield + other Nature Counts sites. So, as before – update the hidden input to change the website ID on the other sites. The Edit tab for the Downloads page has the required settings for the es-wild-sheffield-verify alias.
/admin/config/system/site-information
Change the site name to the name of the WT
Chang the email address to a noreply@[the WT's website]
For example, this is the site details for MWT:
Go to Appearance, then look for the current theme: Wild Sheffield theme (default theme), then click on settings.
You can download the Favicon from the main WT website using https://favicongrabber.com/
At the bottom of the page you can change the logo image and favicon but uploading a file using the 'Choose file' button:
Some references to WT and the local area highlighted in square brackets. Go to the homepage then click on 'Edit' then click on Source to edit the html.
You can edit the footer by click on the pencil on the top right then click on 'Edit' then click on Source to edit the html and change the charity number / links to homepage etc.
/admin/config/system/google-analytics
Change the Web Property ID