.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ========= 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 |img-1| |img-2| EXT: PURE - pure .. _EXT-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, 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: Table of Contents ----------------- `EXT: PURE 1 <#1.EXT:%20PURE|outline>`_ **`Introduction 3 <#1.1.Introduction|outline>`_** `What does it do? 3 <#1.1.1.What%20does%20it%20do_|outline>`_ `Screenshots 3 <#1.1.2.Screenshots|outline>`_ **`Users manual 5 <#1.2.Users%20manual|outline>`_** `How to insert information from PURE 5 <#1.2.1.How%20to%20insert%20information%20from%20PURE|outline>`_ `FAQ 6 <#1.2.2.FAQ|outline>`_ **`Administration 7 <#1.3.Administration|outline>`_** `Installation and setup 7 <#1.3.1.Installation%20and%20setup|outline>`_ `How to setup the MASTER PAGE 7 <#1.3.2.How%20to%20setup%20the%20MASTER%20PAGE|outline>`_ **`Configuration 8 <#1.4.Configuration|outline>`_** `TypoScript configuration 8 <#1.4.1.TypoScript%20configuration|outline>`_ `RealUrl 11 <#1.4.3.RealUrl|outline>`_ `How to get a dynamic title on the MASTER PAGE 11 <#1.4.4.How%20to%20g et%20a%20dynamic%20title%20on%20the%20MASTER%20PAGE|outline>`_ `Insert content using the custom tag “pure” 11 <#1.4.5.Insert%20conten t%20using%20the%20custom%20tag%20%E2%80%9Cpure%E2%80%9D|outline>`_ .. _Introduction: Introduction ------------ .. _What-does-it-do: 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: Screenshots ^^^^^^^^^^^ |img-3| Image 1: Configuration of "List of persons" |img-4| Image 2: Output after configuration of "List of persons" |img-5| Image 3: Extension configured to only show publications from a specific year |img-6| Image 4: Master page showing information about a specific person .. _Users-manual: Users manual ------------ .. _How-to-insert-information-from-PURE: 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** . |img-7| 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. |img-8| 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: |img-9| .. _FAQ: FAQ ^^^ .. _How-do-I-insert-a-list-of-persons-that-is-sorted-precisely-the-way-I-want: 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: Administration -------------- .. _Installation-and-setup: 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)** . |img-10| Setup a master page for the extension (see section “How to setup the MASTER PAGE”). .. _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. |img-11| 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: Configuration ------------- .. _TypoScript-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: General configuration """"""""""""""""""""" .. ### BEGIN~OF~TABLE ### .. _singlePid: singlePid ~~~~~~~~~ .. container:: table-row Property singlePid Data type int Description The page id (pid) where the single activities, publications and persons will be displayed. Default .. _link-to-portal: link\_to\_portal ~~~~~~~~~~~~~~~~ .. container:: table-row 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: display\_output\_if\_cached ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: include\_jquery ~~~~~~~~~~~~~~~ .. container:: table-row Property include\_jquery Data type boolean Description If set, the jQuery library will be included. Default 0 .. _include-pureJS: include\_pureJS ~~~~~~~~~~~~~~~ .. container:: table-row Property include\_pureJS Data type boolean Description If set, load sub requets etc. sorting, page-index using ajax. Default 1 .. _pure-primary-lang: pure\_primary\_lang ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property pure\_primary\_lang Data type string Description Pure standard language (primary language used in PURE). Default dk .. _templatesImagesFolder: templatesImagesFolder ~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: cacheTime ~~~~~~~~~ .. container:: table-row Property cacheTime Data type int Description Time in seconds to cache PURE data for output. Default 10000 .. _allowCaching: allowCaching ~~~~~~~~~~~~ .. container:: table-row Property allowCaching Data type boolean Description Allow typo3 to cache the output. (not the rendered PURE-output) Default 1 .. _list-size: list\_size ~~~~~~~~~~ .. container:: table-row 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: list\_max\_size ~~~~~~~~~~~~~~~ .. container:: table-row Property list\_max\_size Data type int Description Max size for list of items. Default .. _rss-list-size: rss\_list\_size ~~~~~~~~~~~~~~~ .. container:: table-row Property rss\_list\_size Data type int Description Max items for RSS output. Default .. _index-organisationId: index\_organisationId ~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: noredirect\_organisationId ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: templates ~~~~~~~~~ .. container:: table-row Property templates Data type Template configuration array Description Configuration array for template. See next section. Default .. _pageBrowser: pageBrowser ~~~~~~~~~~~ .. container:: table-row Property pageBrowser Data type pageBrowser configuration array Description Configuration array for the pagebrowser. Default .. _showSingleItemsBackend: showSingleItemsBackend ~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property showSingleItemsBackend Data type boolean Description If set, then single items can be inserted in the backend. Default 0 .. ###### END~OF~TABLE ###### .. _Example: 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: Template configuration """""""""""""""""""""" The template configuration array have the following properties. .. ### BEGIN~OF~TABLE ### .. _singlePidsTemplates: singlePidsTemplates ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property singlePidsTemplates Data type Singlepid template configuration array Description Configuration array for single template. See next section. Default .. _persons: persons ~~~~~~~ .. container:: table-row Property persons Data type array Description Templates for a list of persons. Default .. _single-person: single\_person ~~~~~~~~~~~~~~ .. container:: table-row Property single\_person Data type array Description Templates for a single person. Default .. _single-activity: single\_activity ~~~~~~~~~~~~~~~~ .. container:: table-row Property single\_activity Data type array Description Templates for a single activity. Default .. _activities: activities ~~~~~~~~~~ .. container:: table-row Property activities Data type array Description Templates for a list of activities. Default .. _single-publication: single\_publication ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property single\_publication Data type array Description Templates for a single publication. Default .. _publications: publications ~~~~~~~~~~~~ .. container:: table-row Property publications Data type array Description Templates for a list of publications. Default .. _search-publications: search\_publications ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_publications Data type array Description Templates for searching publications. Default .. _search-publications-result: search\_publications\_result ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_publications\_result Data type array Description Templates for search publication result. Default .. _search-activities: search\_activities ~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_activities Data type array Description Templates for searching activities. Default .. _search-activities-result: search\_activities\_result ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_activities\_result Data type array Description Templates for search activities result. Default .. _search-persons: search\_persons ~~~~~~~~~~~~~~~ .. container:: table-row Property search\_persons Data type array Description Templates for searching persons. Default .. _search-persons-result: search\_persons\_result ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_persons\_result Data type array Description Templates for search person result. Default .. ###### END~OF~TABLE ###### .. _Example: 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: Single pid template configuration """"""""""""""""""""""""""""""""" The following template configuration will be used by the MASTER page to display the output. .. ### BEGIN~OF~TABLE ### .. _persons: persons ~~~~~~~ .. container:: table-row Property persons Data type string Description Template for a list of persons. Default .. _single-person: single\_person ~~~~~~~~~~~~~~ .. container:: table-row Property single\_person Data type string Description Template for a single person. Default .. _single-activity: single\_activity ~~~~~~~~~~~~~~~~ .. container:: table-row Property single\_activity Data type string Description Template for a single activity. Default .. _activities: activities ~~~~~~~~~~ .. container:: table-row Property activities Data type string Description Template for a list of activities. Default .. _single-publication: single\_publication ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property single\_publication Data type string Description Template for a single publication. Default .. _publications: publications ~~~~~~~~~~~~ .. container:: table-row Property publications Data type string Description Template for a list of publications. Default .. _cv: cv ~~ .. container:: table-row Property cv Data type string Description Template to display CV. Default .. _rss: rss ~~~ .. container:: table-row Property rss Data type string Description Template to display RSS feed for publications. Default .. _keyword: keyword ~~~~~~~ .. container:: table-row Property keyword Data type string Description Template to display keywords for a person. Default .. _keyword-page: keyword\_page ~~~~~~~~~~~~~ .. container:: table-row Property keyword\_page Data type string Description Template for keyword page. Default .. _keyword-persons: keyword\_persons ~~~~~~~~~~~~~~~~ .. container:: table-row Property keyword\_persons Data type string Description Template for persons on keyword page. Default .. _keyword-keyword: keyword\_keyword ~~~~~~~~~~~~~~~~ .. container:: table-row Property keyword\_keyword Data type string Description Template to display keywords on keyword page. Default .. _search-persons: search\_persons ~~~~~~~~~~~~~~~ .. container:: table-row Property search\_persons Data type string Description Template for searching persons. Default .. _search-persons-result: search\_persons\_result ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_persons\_result Data type string Description Template for search result. Default .. _search-activities: search\_activities ~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_activities Data type string Description Template for searching activities. Default .. _search-activities-result: search\_activities\_result ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_activities\_result Data type string Description Template for search result. Default .. _search-publications: search\_publications ~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_publications Data type string Description Template for searching publications. Default .. _search-publications-result: search\_publications\_result ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property search\_publications\_result Data type string Description Template for search result. Default .. ###### END~OF~TABLE ###### .. _Example: 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: 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** Ex.: http://cs.au.dk/persons/person/email@cs.au.dk/ .. _How-to-get-a-dynamic-title-on-the-MASTER-PAGE: 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: Insert content using the custom tag “pure” ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ One can insert some PURE output using the custom tag pure. The syntax of this tag is: :: extraParam1=value1,...,extraParamN=valueN An example could be: :: personEmployeeIds=psb@cs.au.dk 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 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 368 .. :id: graphics9 .. :name: graphics9 .. :width: 249 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 229 .. :id: graphics1 .. :name: graphics1 .. :width: 530 .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 291 .. :id: graphics2 .. :name: graphics2 .. :width: 322 .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 305 .. :id: graphics5 .. :name: graphics5 .. :width: 386 .. |img-7| image:: img-7.png .. :align: left .. :border: 0 .. :height: 296 .. :id: graphics6 .. :name: graphics6 .. :width: 271 .. |img-8| image:: img-8.png .. :align: left .. :border: 0 .. :height: 325 .. :id: graphics7 .. :name: graphics7 .. :width: 310 .. |img-9| image:: img-9.png .. :align: left .. :border: 0 .. :height: 312 .. :id: graphics8 .. :name: graphics8 .. :width: 524 .. |img-10| image:: img-10.png .. :align: left .. :border: 0 .. :height: 338 .. :id: graphics3 .. :name: graphics3 .. :width: 403 .. |img-11| image:: img-11.png .. :align: left .. :border: 0 .. :height: 93 .. :id: graphics4 .. :name: graphics4 .. :width: 366