I’ve been working to implement shortcodes which allow you to use data already stored on people in either our School database (called Symbiosis) or in the PURE database (aka research@st-andrews) to your WordPress research group site.
Shortcodes are simple codes enclosed in square brackets that you can type in your posts or pages which WordPress will convert into content when the post or page is viewed. I’ve made some new codes that you can use. For example, this code:
makes my image from the School database appear on the right of the page… (OK – I have even less hair now – time I put a new picture there, I know…)
I’ve made shortcodes which allow you to place information stored in Symbiosis (School) and Pure (research@st-andrews) on your research group pages or posts, or even to quickly make a complete staff profile page. For example, here is a sample page which includes information from both databases, as well as text typed in WordPress. The entire page was made with only the following typed in WordPress:
Prof Anne Magurran:
Professor
This page illustrates the combination of information straight
from WordPress – like this paragraph – and from the Symbiosis
(School) database, and from Pure (research@st-andrews)…
I am an ecologist investigating biological diversity. My goal is to quantify the patterns, and understand the processes, linked to change in ecological communities over space and time, and to use this research to protect and manage natural capital.
Royal Society Wolfson Research Merit Award
ERC Advanced Grant
Deputy Convenor Biology Panel Hong Kong RAE 2014
Board of Reviewing Editors, Science
Fellow of the Royal Society of Edinburgh
Beverton Medal (FSBI) 2006
Research Group:
Dr Amy Deacon
Dr Hideyasu Shimadzu
Ms Faye Moyes
Ms Morelia Camacho-Cervantes
Mr Al Reeve
Ms Alessanda Rocha Kortz
Funded collaborations:
University of the West Indies, Trinidad
Mamiraua Sustainable Development Institute, Brazil
Recent Publications:
5 (of 172 /dk/atira/pure/researchoutput/status/published available)
for aem1 (source: University of St Andrews PURE)
Please click title of any item for full details
The general form for these shortcodes is: [SHORTCODE data=”value” uid=”value“]
Below is a summary of available codes, all of these use the parameter uid=”abc” where abc is a St Andrews user-id to indicate the person for whom information should be shown. An additional parameter – format – which is optional, and controls placement of the content is described below the table.
SHORTCODE |
data="value" |
output |
SDS_SYMBIOSIS |
fullname |
title preferred-firstname surname |
SDS_SYMBIOSIS |
jobTitle |
job title |
SDS_SYMBIOSIS |
title |
name and job title e.g. Dr John Smith: Lecturer |
SDS_SYMBIOSIS |
contactDetails |
name; full postal address with postcode; phone; fax; email (clickable); room number |
SDS_SYMBIOSIS |
image |
staff portrait image |
SDS_SYMBIOSIS |
bioLink |
link to a staff profile on the School of Biology website |
SDS_SYMBIOSIS |
edit |
link to editing page (requires password) – non-administartive users may only edit their own content |
SDS_SYMBIOSIS |
generalText |
the main text block used on School pages |
SDS_SYMBIOSIS |
relatedSites |
related sites list derived from personal site link (if any) and group memberships (each link opens to new window) |
SDS_SYMBIOSIS |
relatedSitesWithPure |
as related sites list with link to research@st-andrews profile included |
SDS_PURE |
publications |
publications list – Formatting not perfect at present but links do work. Default is five publications – for more add an additional parameter such as number="10" with the required value. A parameter uid="dp1" indicates an individual user ID – or a parameter orgid="SOI" may be used in order to access publications relating to an organisational unit defined in PURE. Our plug-in 'knows' and will translate correctly a limited number of codes – eg medicine / biology / SOI / SMRU… or the correct values may be input in the shortcode (eg orgid="40SCBIOL" for biology). Contact rpo@st-andrews.ac.uk for more details about organisational IDs. |
SDS_PURE |
overview |
overview text from Pure/research@st-andrews |
SDS_PURE |
link |
a link to the user's profile page in research@st-andrews |
SDS_SYMBIOSIS |
full |
a complete profile page combining most of the above elements. Default is five publications – for more add an additional parameter such as number="10" with the required value. |
SDS_SYMBIOSIS |
sidebar |
a right-justified sidebar with image; name; address; contact details; room number; related sites; link to school page; link to content edit page |
SDS_SYMBIOSIS |
sidebarWithPure |
as sidebar with link to research@st-andrews profile included |
SDS_SYMBIOSIS |
body |
Pure overview; School general text; Pure publications. Default is five publications – for more add an additional parameter such as number="10" with the required value. |
SDS_SYMBIOSIS |
researchGroupMembers |
requires uid="*" and piid="someone". Optional format="right" title="List Title". The uid parameter is not used. The piid is the St Andrews user-id of the research group PI. Data entered in the PI's record in SYMBIOSIS defines members of his/her research group. Produces a linking list of people in the PI's group. Demo |
SDS_SYMBIOSIS |
researchGroupAccordion |
used to produce a profile of all researchers in a research group. Requires parameters: uid="*" and piid="someone". The uid parameter is not used. The piid is the St Andrews user-id of the research group PI. Data entered in the PI's record in SYMBIOSIS defines members of his/her research group. Data from both SYMBIOSIS and PURE is used to create a complete accordion of the group with images. Individual members expand to reveal detailed profiles. More & Demo |
SDS_SYMBIOSIS |
groupList |
used to make a list of any people defined as a group in symbiosis. Requires a parameter groupcode="IBANS". An optional parameter is jobcat which may be used to refine a list based on job category. A comma separated list of jobcat values may also be entered. Individual members expand to reveal details as defined in a site page called profile (the profile page may use a customised combination of other codes above). Valid jobcat codes are: academic; administrative; research; technical; postgraduate student. The following parameters may also be set to "yes" with various effects: suppress_school; suppress_shorttext; suppress_roleshorttext; suppress_room; suppress_tel; listLinkToPure. The attribute style may be used with CSS codes to style the output list. |
SDS_SYMBIOSIS |
grouplistImages |
As groupList but includes a portrait image of each person if one is on file (symbiosis). Example output |
SDS_SYMBIOSIS |
grouplistImages_recursive |
As grouplistImages but looks for research groups of people who are in the group list and adds found research group members to the group list. Jobcat filters applied to the grouplist are also applied to the research group lists. Example output |
As I mentioned you can optionally add a format parameter, which has the following results in most instances (‘headspace’ only is available for the shortcodes full, sidebar, body)
format="value" |
effect |
newline |
add a line break after the content |
right |
make the content be in a right aligned block |
left |
make the content be in a left aligned block |
headspace |
add a line break above the content |