Plugin MyPage


Plugin MyPage
Extension allowing contributors to create
their own personal page

Authors

Anyware Services

Most recent version

1.3.0

Tracking issues

https://issues.ametys.org/browse/MYPAGE

Download

Lastest version 

  1. Presentation
  2. Screenshots

Presentation

This plugin allows each contributor to create his own personal page.

Basic information (name, firstname, identifier...) are taken from the LDAP but the user can complete with personal data.

Be careful ! This plugin implies that the users manager of the CMS has to pluged on a LDAP directory.

Screenshots

User manual

Creating and editing pages

In Home tab, a user with convenient right, can click on "Open my personal page" button.

He is then asked to select the language in which he wants to create his personal page.

This action opens, and creates if it has not yet been created, the user personal page.

The user personal page is first composed by information from LDAP directory. These information can be :

  • the user name
  • the email
  • the phone number
  • the affectation
  • the function
  • ...

The user is free to complete information to his page by editing it.

The user page is accessible at the following URL : http://server.com/fr/~login (the path after the ~ letter is the LDAP login)

An administrator user can create and edit the page of any user by clicking on "Personal pages" button:

A dialog is shown, in which the administrator is to choose the person whose page to create and the language.

Click on the user button to choose a user and select a language.

The user page is opened (after being created, if it doesn't exist), and the administrator can fill it in.

Directory service

As of version 1.1, a directory service is brought be the MyPage plugin. It provides an interface to search persons on the LDAP directory according to specified criteria, display the search results and link to the personal pages of users who have created it.

Include this service in a page by selecting a zone, then clicking on its icon ("directory search").

Then, configure its parameters:

Fill in a title, the LDAP fields or attributes on which you want the user to search, a maximum results count, and the attributes which will be displayed on each person found by the search.
The resulting service displays this form:

On this service, the selected search attributes are "last name", "first name" and "affectation", and the alphabetical search is enabled.
Selecting "Anyware Services" as affectation and clicking on search displays the results.

The second person found has created his personal page, which can be accessed using the "browse his/her home page" link. The other results are person who are in the LDAP directory, but have not yet created their personal pages.

Installation and download

Download

Requirements

The users manager of your CMS application has to pluged on a LDAP directory.

There is two LDAP managers :

  • org.ametys.runtime.plugins.core.Ldap
  • org.ametys.runtime.plugins.core.CredentialsAwareLdap

Installation

Add the plugin JAR in the WEB-INF/lib directory of your Ametys application.

In the WEB-INF/param/cms-ribbon.xml file, in Home tab, add the 2 buttons of id org.ametys.mypage.person.Open and org.ametys.mypage.person.OpenOthers in the avanced tools group.

<group label="RIBBON_TABS_TAB_HOME_GROUPS_GROUP_ADVANCED_TOOL_LABEL" icon="">
       <large></large>
       <medium>
            <control id="org.ametys.mypage.person.Open"/>
            <control id="org.ametys.mypage.person.OpenOthers"/>
       </medium>
       <small/>
 </group>

This extension needs that your skin provides a new template named "mypage" with a main zone named "default". You must create this template.
As a simple integration, the template.xsl file of this new template can only import the stylesheets of your page template.

<xsl:stylesheet version="1.0"
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
		xmlns:sitemap="http://www.ametys.org/inputdata/sitemap/3.0"
		xmlns:xalan="http://xml.apache.org/xalan"
		xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date"
		exclude-result-prefixes="sitemap">

	<xsl:import href="skin://templates/page/stylesheets/template.xsl" />
</xsl:stylesheet>

To enable the users to edit their own page, a profile named "MYPAGE_PROFILE" has to be created. It must possess the following rights:

  • In the "My page" category, the "Edit my page" right.
  • Depending on the workflow, all the rights needed to edit, delete, and move the content in the workflow until the state in which it's considered valid for publication on the website. In the template application's default workflow, these rights are: "Edit", "Propose", "Refuse", "Validate" and "Delete".

On Ametys 3.1

MyPage use a content type, but this content type can not be used in a page, you so have to remove it from the "Add a new content menu". To do so ensure the following content type id is not included org.ametys.plugins.mypage.Content.person
See https://wiki.ametys.org/display/AMETYSV3/Content+types#Contenttypes-Availablecontenttypesforthecontributor for more information.

Finally restart your servlet engine

Versions

Versions and features

Version 1.0

  • Creation and edition of one's own personal page, without specifying the language.
  • Creation and edition of all the personal pages, for the administrator.
  • The pages are accessible at the "http://www.server.com/fr/~login" address.

Version 1.1

  • The personal pages can be created and browsed in all the available languages.
  • New directory search service.
  • Ability for the integrator to replace the default person content type with a custom one.

Compatibility and migration

Plugin version

1.0.x

1.1.x

1.2.x

1.3.x

Ametys 3.0.x

 

 

 

Ametys 3.1.x

 

 

 

Ametys 3.2.x

 

 
Ametys 3.3.x   

Upgrading

1.0 to 1.1

The constant MyPageConstants.PERSON_CONTENT_TYPE was removed in version 1.1. Use the PersonContentTypeRetriever component instead.

The old way of retrieving the person content type in version 1.0 :

ContentTypeExtensionPoint cTypeEP = (ContentTypeExtensionPoint) serviceManager.lookup(ContentTypeExtensionPoint.ROLE);
LdapPersonContentType contentType = (LdapPersonContentType) cTypeEP.getExtension(MyPageConstants.PERSON_CONTENT_TYPE);

becomes, in version 1.1 :

PersonContentTypeRetriever retriever = (PersonContentTypeRetriever) serviceManager.lookup(PersonContentTypeRetriever.ROLE);
LdapPersonContentType contentType = retriever.getPersonContentType();
Back to top