DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: PURE¶
Author: | Peter Sandberg Brun |
---|---|
Created: | 2010-01-13T18:27:41 |
Changed by: | Peter Sandberg Brun |
Changed: | 2011-01-18T14:31:35.180000000 |
Classification: | pure |
Keywords: | PURE, persons, publications, activities, forEditors, forAdmins |
Author: | Mads Sandberg Brun, Peter Sandberg Brun |
Dependencies: | cms, dynaflex |
Email: | msb@cs.au.dk,psb@cs.au.dk |
Info 4: | |
Language: | en |
EXT: PURE - pure
EXT: PURE¶
Extension Key: pure
Language: en
Dependencies: cms, dynaflex
Keywords: PURE, persons, publications, activities, forEditors, forAdmins
Copyright 2009-2011, Mads Sandberg Brun, Peter Sandberg Brun, <msb@cs.au.dk,psb@cs.au.dk>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
`Introduction 3 <#1.1.Introduction|outline>`_
`Users manual 5 <#1.2.Users%20manual|outline>`_
How to insert information from PURE 5
`Administration 7 <#1.3.Administration|outline>`_
How to setup the MASTER PAGE 7
`Configuration 8 <#1.4.Configuration|outline>`_
Introduction¶
What does it do?¶
This extension provides users of PURE v. 4 and TYPO3 to insert information from PURE – Persons, publications and activities.
The benefit of this is that you can decide what information you want to show, and then this information automatically get updated if users updates their information in the PURE system.
For example you can say you want to insert a list of persons from a specific department. Then this queried to PURE server and the person from that specific department will be listed on the page in a table. From there you can click on a person and get all the information about that person.
With this extension you can insert the following:
- Show a single person
- Show a single publication
- Show a single activity
- List of persons – Layouts: List, sortable table
- List of publications – Layout: Sortable list – Extra: RSS Feeds also available
- List of activities – Layout: Sortable list
- Search for persons – Layouts: A simple search box
- Search for publications – Layouts: A simple search box or an advanced form with filters
- Search for activities – Layouts: A simple search box or an advanced form with filters
All the layouts included for persons is also using the microformat hCard .
When clicking on a link to a specific person, publication or activity this in showed on a master page.
All information queried from a PURE server is also being cached in TYPO3.
Note: This is extension is currently only adapted to the danish model (Aarhus University) of PURE.
This manual is also available as a PDF document. Click here to download it .
Screenshots¶
Image 1: Configuration of "List of persons"
Image 2: Output after configuration of "List of persons"
Image 3: Extension configured to only show publications from a specific year
Image 4: Master page showing information about a specific person
Users manual¶
How to insert information from PURE¶
On a page where you want to insert something, this can be a business card for a person, a list of persons from a department or a list of publications spanning over some years, this can be done by following this standard procedure:
When you are in the TYPO3 back-end and have a page where you want information to appear, then click on icon named Create new element .
Choose PURE under Plugins .
Click the tab named Plugin .
Under General Settings click the type of information you want to insert in the right side. When you click the item will be displayed in the left side. Note that you can choose to setup multiple views by adding more to the left side.
For every new tab appearing to the right of the tab named Template make sure to set it up. This is done by clicking the tab and choosing the options you like to have.
When you are done click the button named Save document in the top.
Here is a image of the output generated by following the previous pictures:
FAQ¶
How do I insert a list of persons that is sorted precisely the way I want?¶
If you want to insert a list of persons given there person-ids, where you will control the the ordering, then you can control this by inserting multiple Single person under the General Settings and for each Single person tab type the person-id and choose the template to use.
Administration¶
Installation and setup¶
Requirements: This extension depends on the following extension: dynaflex
Install the extension using Ext Manager .
On a SITE include Pure (pure) and Pure css (pure) – The last one of these two is optional. This is done by going to Template → A page → Edit the whole template record → Includes → Choose Pure (pure) and Pure css (pure) under Include static (from extensions) .
Setup a master page for the extension (see section “How to setup the MASTER PAGE”).
How to setup the MASTER PAGE¶
To get the extension to work on a website a page that is going the be the master page for the extension must be configured.
This is done like this:
Create a new page in TYPO3.
Insert the extension on this page ( Create new element → Choose PURE under Plugins ).
Write down the PID (Page ID) of the configured page.
The plugin on this page in the back-end will say it is not configured. Just ignore this.
The extension on the website now need to know which page you did make as the master page. This is done by setting the constant plugin.tx_pure_pi.singlePid to the PID from step 3. This can also be done in the TYPO3 back-end like this:
Click the tab named Template in the right side and choose a page.
Choose Constant Editor in the drop-down menu.
Choose PLUGIN.PURE in the next drop-down menu.
Write the PID in under The PID of the page that contain empty PURE plugin which can be found under the category Links and targets .
Configuration¶
TypoScript configuration¶
The following section will describe the different TypoScript constants that can be set. The default column is the values set by the TS template Pure (pure) .
“plugin.tx_pure_pi” have the following TypoScript properties.
General configuration¶
singlePid¶
Property
singlePid
Data type
int
Description
The page id (pid) where the single activities, publications and persons will be displayed.
Default
link_to_portal¶
Property
link_to_portal
Data type
boolean
Description
Link to PURE portal. If true it links to the real PURE portal.
Default
1
display_output_if_cached¶
Property
display_output_if_cached
Data type
boolean
Description
If set, then if the data have been cached on server and is ready, then output will be the output directly.
Default
1
include_jquery¶
Property
include_jquery
Data type
boolean
Description
If set, the jQuery library will be included.
Default
0
include_pureJS¶
Property
include_pureJS
Data type
boolean
Description
If set, load sub requets etc. sorting, page-index using ajax.
Default
1
pure_primary_lang¶
Property
pure_primary_lang
Data type
string
Description
Pure standard language (primary language used in PURE).
Default
dk
templatesImagesFolder¶
Property
templatesImagesFolder
Data type
string
Description
Path to images folder with images with the name on the format “TEMPLATE_NAME.png”.
Default
EXT:pure/res/templateImages
cacheTime¶
Property
cacheTime
Data type
int
Description
Time in seconds to cache PURE data for output.
Default
10000
allowCaching¶
Property
allowCaching
Data type
boolean
Description
Allow typo3 to cache the output. (not the rendered PURE-output)
Default
1
list_size¶
Property
list_size
Data type
int
Description
Max size for list of items before paging. The size of a single page.
Default
50
list_max_size¶
Property
list_max_size
Data type
int
Description
Max size for list of items.
Default
rss_list_size¶
Property
rss_list_size
Data type
int
Description
Max items for RSS output.
Default
index_organisationId¶
Property
index_organisationId
Data type
string
Description
Person, activity or publication with one of this organisationId that may be index.
A comma separated list of the organisations ids.
If none may be cached the value “-1” can be used.
If all may be cached the value “0” can be used.
Default
-1
noredirect_organisationId¶
Property
noredirect_organisationId
Data type
string
Description
Person, activity or publication with none of this organisationId will be redirected to the PURE-portal.
A comma separated list of the organisations ids.
If all should be redirected the value “-1” can be used.
If all none should be redirected the value “0” can be used.
Default
-1
templates¶
Property
templates
Data type
Template configuration array
Description
Configuration array for template. See next section.
Default
pageBrowser¶
Property
pageBrowser
Data type
pageBrowser configuration array
Description
Configuration array for the pagebrowser.
Default
showSingleItemsBackend¶
Property
showSingleItemsBackend
Data type
boolean
Description
If set, then single items can be inserted in the backend.
Default
0
Example¶
Here is an example of the a configuration where organisation with id 5150 or 5140 entries will be displayed at the current site and not directed:
plugin.tx_pure_pi {
singlePid = 2032
cacheTime = 86400
noredirect_organisationId = 5150,5140
index_organisationId = 5150,5140
}
Template configuration¶
The template configuration array have the following properties.
singlePidsTemplates¶
Property
singlePidsTemplates
Data type
Singlepid template configuration array
Description
Configuration array for single template. See next section.
Default
persons¶
Property
persons
Data type
array
Description
Templates for a list of persons.
Default
single_person¶
Property
single_person
Data type
array
Description
Templates for a single person.
Default
single_activity¶
Property
single_activity
Data type
array
Description
Templates for a single activity.
Default
activities¶
Property
activities
Data type
array
Description
Templates for a list of activities.
Default
single_publication¶
Property
single_publication
Data type
array
Description
Templates for a single publication.
Default
publications¶
Property
publications
Data type
array
Description
Templates for a list of publications.
Default
search_publications¶
Property
search_publications
Data type
array
Description
Templates for searching publications.
Default
search_publications_result¶
Property
search_publications_result
Data type
array
Description
Templates for search publication result.
Default
search_activities¶
Property
search_activities
Data type
array
Description
Templates for searching activities.
Default
search_activities_result¶
Property
search_activities_result
Data type
array
Description
Templates for search activities result.
Default
search_persons¶
Property
search_persons
Data type
array
Description
Templates for searching persons.
Default
search_persons_result¶
Property
search_persons_result
Data type
array
Description
Templates for search person result.
Default
Example¶
Here is an example of the array of templates that can be used to insert a list of persons in the backend:
persons {
2 {
name = LLL:EXT:pure/locallang_tca.xml:pure.pi_flexform.templateToUse .persons.table
template = TEMPLATE_PERSONS_TABLE
}
1 {
name = LLL:EXT:pure/locallang_tca.xml:pure.pi_flexform.templateToUse .persons.basic
template = TEMPLATE_PERSONS_BASIC
}
3 {
name = LLL:EXT:pure/locallang_tca.xml:pure.pi_flexform.templateToUse .persons.simple
template = TEMPLATE_PERSONS_SIMPLE
}
4 {
name = LLL:EXT:pure/locallang_tca.xml:pure.pi_flexform.templateToUse .person.small
template = TEMPLATE_SINGLE_PERSON_SMALL
}
5 {
name = LLL:EXT:pure/locallang_tca.xml:pure.pi_flexform.templateToUse .persons.images
template = TEMPLATE_PERSONS_IMAGES
}
}
The above 5 templates will the be available in the backend when inserting a list of persons.
Single pid template configuration¶
The following template configuration will be used by the MASTER page to display the output.
persons¶
Property
persons
Data type
string
Description
Template for a list of persons.
Default
single_person¶
Property
single_person
Data type
string
Description
Template for a single person.
Default
single_activity¶
Property
single_activity
Data type
string
Description
Template for a single activity.
Default
activities¶
Property
activities
Data type
string
Description
Template for a list of activities.
Default
single_publication¶
Property
single_publication
Data type
string
Description
Template for a single publication.
Default
publications¶
Property
publications
Data type
string
Description
Template for a list of publications.
Default
cv¶
Property
cv
Data type
string
Description
Template to display CV.
Default
rss¶
Property
rss
Data type
string
Description
Template to display RSS feed for publications.
Default
keyword¶
Property
keyword
Data type
string
Description
Template to display keywords for a person.
Default
keyword_page¶
Property
keyword_page
Data type
string
Description
Template for keyword page.
Default
keyword_persons¶
Property
keyword_persons
Data type
string
Description
Template for persons on keyword page.
Default
keyword_keyword¶
Property
keyword_keyword
Data type
string
Description
Template to display keywords on keyword page.
Default
search_persons¶
Property
search_persons
Data type
string
Description
Template for searching persons.
Default
search_persons_result¶
Property
search_persons_result
Data type
string
Description
Template for search result.
Default
search_activities¶
Property
search_activities
Data type
string
Description
Template for searching activities.
Default
search_activities_result¶
Property
search_activities_result
Data type
string
Description
Template for search result.
Default
search_publications¶
Property
search_publications
Data type
string
Description
Template for searching publications.
Default
search_publications_result¶
Property
search_publications_result
Data type
string
Description
Template for search result.
Default
Example¶
Here is an example of the configuration of singlePidsTemplates which is also the default value of the Pure (pure) template:
plugin.tx_pure_pi.templates.singlePidsTemplates {
persons = TEMPLATE_PERSONS_SIMPLE
single_person = TEMPLATE_SINGLE_PERSON_BASIC
single_activity = TEMPLATE_SINGLE_ACTIVITY_FULL
activities = TEMPLATE_ACTIVITIES_SIMLPLE
single_publication = TEMPLATE_SINGLE_PUBLICATION_FULL
publications = TEMPLATE_PUBLICATIONS_SIMLPLE
cv = TEMPLATE_SINGLE_PERSON_CV
keyword = TEMPLATE_SINGLE_PERSON_KEYWORD
keyword_page = TEMPLATE_KEYWORDSANDPERSONS
keyword_persons = TEMPLATE_PERSONS_NAMES
keyword_keyword = TEMPLATE_KEYWORD_TITLES
rss = TEMPLATE_PUBLICATIONS_RSS
search_persons = TEMPLATE_SEARCH_PERSONS_SIMPLE
search_persons_result = TEMPLATE_PERSONS_TABLE
search_activities = TEMPLATE_SEARCH_ACTIVITIES
search_activities_result = TEMPLATE_ACTIVITIES_SIMLPLE_WITHOWNER
search_publications = TEMPLATE_SEARCH_PUBLICATIONS
search_publications_result = TEMPLATE_PUBLICATIONS_SIMLPLE
}
RealUrl¶
When the extension is up and running the configured master page will function as a gateway to display information about persons, publications and activities. If the MASTER PAGE was named persons in the root,then information from PURE can be accessed directly by this page. For example it possibly to show a person by ID/e-mail by entering the following URL:
http://www.example.com/persons/?tx_pure_pi[personId]= ID
Ex.: http://cs.au.dk/persons/?tx_pure_pi[personId]=email@cs.au.dk
The URL can be more beautiful by using something like the realurl extension. By using for example the following configuration for this extension:
'postVarSets' => array(
'_DEFAULT' => array(
'act' => array(
array(
'GETvar' => 'tx_pure_pi[actId]',
),
),
'person' => array(
array(
'GETvar' => 'tx_pure_pi[personId]',
),
),
'org' => array(
array(
'GETvar' => 'tx_pure_pi[orgId]',
),
),
'showtype'=> array(
array(
'GETvar' => 'tx_pure_pi[showType]',
),
),
'pub' => array(
array(
'GETvar' => 'tx_pure_pi[pubId]',
),
),
),
);
The URL from before will then be: http://www.example.com/persons/person/ ID
How to get a dynamic title on the MASTER PAGE¶
To get a dynamic title on the master page (e.g., a name as title, when viewing a person), please to the following:
Click the tab named Template in the right side and choose the master page.
Choose Info/Modify in the drop-down menu.
Click on Edit the whole template record .(Click the button Click here to create an extension template , if there is now template on the page yet)
Insert the following code inside the text area for Setup :
includeLibs.pagetitle = EXT:pure/class.tx_pure_pagetitle.php
config.titleTagFunction = tx_pure_pagetitle->changetitle
lib.pageTitle = USER
lib.pageTitle {
userFunc = tx_pure_pagetitle->changetitle
}
Insert content using the custom tag “pure”¶
One can insert some PURE output using the custom tag pure. The syntax of this tag is:
<pure template="name" type="[person | acitivity | publication]" function="[list | single]" >extraParam1=value1,...,extraParamN=valueN</pure>
An example could be:
<pure template="TEMPLATE_PERSONS_SIMPLE" type="person" function="single">personEmployeeIds=psb@cs.au.dk</pure>
One can also generate the custom tag from PHP using the class tx_pure_tag, using the function:
public function generate($template, $type, $function, array $params)
An example using this:
require_once(t3lib_extMgm::extPath('pure').'class.tx_pure_tag.php');
$tagGenerator = t3lib_div::makeInstance('tx_pure_tag');
$parameters = array('personEmployeeIds' => 'psb@cs.au.dk');
echo $tagGenerator->generate('TEMPLATE_PERSONS_SIMPLE', 'person', 'single', $parameters);
12