9.6. Extensions¶
Administration → Extensions
Note
Extensions is only accessible by site administrators.
Extensions in Mahara serve to provide certain functionality in the system. Extensions can be installed at any point and can also be hidden.
9.6.1. Plugin administration¶
Administration → Extensions → Plugin administration
The Plugin administration lists all the plugins that are currently installed on your Mahara instance and provides a link to the plugin configuration settings where available.
Plugins in Mahara are always installed and can be accessed if users know the URLs and would otherwise have access. Rather than enabling and disabling the functionality, plugins are hidden or made visible by clicking on the hide or show links beside the plugins. When hiding an artefact type plugin, Mahara stops the display of the blocks related to it.
If you added a plugin to your site, you will need to go through its installation. A plugin that is not yet fully installed is marked with a warning. Click the Install link to start the installation process.
In order to delete a plugin completely, you must delete the code and all database tables that pertain to the plugin. Additionally, you need to delete it from a number of system tables, e.g. “artefact”, “artefact_config”, “artefact_cron”, etc. As an example, view the information on how to uninstall the My Learning plugin.
Note
Core Mahara functionality can be made unavailable to users by hiding it. This may be useful if you connect Mahara to another system that already provides this functionality or if you do not wish your users to use that functionality. However, the decision about hiding a functionality should be considered thoroughly as it may also mean that users may not be able to have as many artefacts available to them as they should have.
In the following, only the plugins that have additional settings are discussed.
9.6.1.1. Blocktype: File / gallery¶
You can provide additional image gallery settings and also allow your users to make Flickr and Photobucket image galleries available. The settings you make on this page will be the default settings for all users.
- Use Slimbox2: Check this box if you want to use this script to overlay images on the current page.
- Use photo frame: Check this box if you want to put a frame around the thumbnail of each photo in photo galleries.
- Maximum photo width: Set the maximum width (in pixel) to which the photos will be resized when viewed with Slimbox2.
- Flickr API key: If you want to allow users to display photos from Flickr, you need a valid Flickr API key. You can apply for the key at Flickr.
- Photobucket API key: If you want to allow users to display photos from Photobucket, you need a valid API and private API key. You can get them from the developer page of Photobucket.
- Photobucket API private key: Provide the private API key from Photobucket that you will have received.
- Click the Save button to keep your changes.
9.6.1.2. Blocktype: File / internalmedia¶
Configure which file types users can embed into the Embedded media block. If you disable a file type that has already been used in a block, it will not be rendered any more.
Mahara comes with Flowplayer, a media player that can play FLV, MP4 (in H.264 format) and MP3 files. Videos are embedded and audio files played with the help of this player.
Other video file types can be enabled, but users must have the appropriate software installed on their computers and the respective plugin enabled in their browsers to play them.
- Select the file types that you wish your users to be able to show on their portfolio pages.
- Width: Choose the default width (in pixels) for a video.
- Height: Choose the default height (in pixels) for a video.
- Click the Save button to keep your changes.
Note
If you allow the embedding of file types that cannot be played by Flowplayer, some users may not have the necessary software installed for displaying these file types.
9.6.1.3. Block type: Wall¶
You can limit the number of characters that are allowed for wall posts in this configuration setting. Existing posts will not be changed.
- Choose the maximum number of characters for your wall posts.
- Click the Save button to keep your changes.
9.6.1.4. Artefact type: Comments¶
Turn comment ratings on to enable 5-star ratings in the feedback section on artefacts and pages.
Note
Ratings cannot be on their own and require either a comment or a file attachment.
- Click the check box to enable comment ratings.
- Click the Save button to keep your changes.
9.6.1.5. Artefact type: File¶
You can configure a variety of options for uploading files.
- Default quota: You can set the amount of disk space that new users will have as their quota. Existing user quotas will not be changed.
- Update user quotas: Check this box if you want to update the file quota for existing users with the value under Default quota. Only then will they be updated.
- Institution quota: Check this box if you want to allow institution administrators to set user file quotas and have default quotas for each institution.
- Enforce a site-wide maximum quota: Check this box if you do not wish an administrator to go beyond the allowed maximum quota.
- Maximum quota: You can set the maximum quota that an administrator can give to a user. Existing user quotas will not be affected.
- Default group quota: You can set the amount of disk space that each group will have as its quota. Existing groups will not be affected.
- Update group quotas: Check this box if you want to update the file quota for existing groups with the value under Default quota. Only then will they be updated.
- Require agreement: Enable this option if you want to force users to agree to certain terms before they can upload a file to the site. They must accept this agreement before they are able to choose a file from their computer to upload to Mahara. A default agreement is provided and the text displayed.
- Use custom agreement: If you want to write your own upload agreement, check this box in addition to Require agreement.
- Custom agreement: If you want to use a custom upload agreement, write it here.
- Resize large images automatically: Enable this option to resize any image that is uploaded to the maximum width and height settings.
- Display user option: Display users the option to resize images automatically in their account settings.
- Maximum width and height: Choose the maximum width and height (in pixels) to which images will be resized upon uploading.
- Profile picture size: Choose the maximum size of the profile pictures for users (in pixels). All images uploaded to the profile pictures area will be resized to these dimensions if they are larger.
- Default comment permission: Choose the artefact types which shall have comments enabled per default. Users can override these settings for individual artefacts in the files area. You can enable comments for:
- archive, i.e. compressed file
- audio file
- file
- folder
- image
- profile picture
- video file
- Select All to mark all file types.
- Select None to clear your selections from the check boxes.
- Click the Save button when you are finished making your changes.
9.6.1.6. Artefact type: Profile¶
For profile information you can decide which fields a user must provide when a user account is created manually or via CSV file. These fields are marked mandatory fields.
The profile fields marked searchable fields are available for all logged-in users to search on.
- Mandatory fields: Select the fields that you wish all users to fill in. Certain fields cannot be deselected.
- Searchable fields: Select the fields that can be searched on by others. Certain fields cannot be deselected.
- Click the Save button to keep your changes.
9.6.1.7. Authentication: SAML¶
If you wish to use SAML authentication anywhere on your site, you must provide the path to your SAML php file in these settings.
- SimpleSAMLphp lib directory: Provide the fully qualified path to the library directory of SimpleSAMLphp, e.g. if the full path to the bootstrap autoload.php is
/some_path_to/simplesamlphp_1_3/lib/_autoload.php
then this value should be/some_path_to/simplesamlphp_1_3/
- SimpleSAMLphp config directory: Provide the fully qualified path to the configuration directory to be used for this Service Provider (SP) SimpleSAMLphp, e.g. if the full path to the config.php is
/some_path_to/simplesamlphp_1_3/config/config.php
then this value should be/some_path_to/simplesamlphp_1_3/config/
- Click the Save button to keep your changes.
9.6.1.8. Search: Internal search¶
If your site has a lot of users and uses a PostgreSQL database, user searches will be faster with exact user searching enabled. The setting will still work with MySQL databases, but it is unlikely that it increases search performance significantly.
The advantage of the exact user search is that if you have 20 users with the first name “Percy” but different last names, you may find the user you are looking for more quickly because you can search for “Percy Pearle” and the result list will not show “Percy Pearl”, “Percy Sutter”, “Percy Townsend” etc.
However, partial matches on profile fields will not return results, so if for example you have a user called “Percy”, then typing “Perc” into the search box will not find that user anymore.
- Exact user searches: Check this box if you want to enable exact user searches.
- Click the Save button to keep your changes.
9.6.1.9. Search: Elasticsearch¶
The regular Mahara search is limited to finding users and in certain places titles, descriptions and tags of pages or collections. However, Mahara can be extended to use allow for fulltext search capabilities. The Mahara core project team chose to use Elasticsearch. This is a powerful and extensible fulltext search engine. It does require a Java server, e.g. Tomcat, to run and thus may not be available for small instances of Mahara.
Note
Currently, the plugin can only be used for Mahara instances running on a PostgreSQL database. Work is in progress to extend the support for MySQL for Mahara 1.9.
- Most of the Elasticsearch configuration needs to be done on the server level. Here you only see the settings, but cannot change them directly.
- Cron record limit: Decide on the maximum number of records to be passed from the queue to the Elasticsearch server on each cron run. An empty field or
0
means that there is no limit. - Artefact types: Check the artefact types that you want to include in the search index. Only artefact types that have a hierarchy defined below are valid. You will need to reset artefacts in the queue below for your changes to take effect.
- Artefact types hierarchy: Enter the hierarchy for each artefact type separated by
|
(a pipe). Place each artefact type on a row by itself. - Index reset: View the number of records of each type currently in the queue to be sent to the Elasticsearch server. Items are sent to the Elasticsearch server each time the search plugin’s cron task runs (every 5 minutes).
- Click the Reset button to clear the search index and thus deleting all records and requeuing them.
- Click the Save button to accept your changes.
See also
You can find more information about Elasticsearch in Mahara on the wiki. There are also some developer notes to get you started.
9.6.1.10. Interaction: Forum¶
The post delay setting determines the time (in minutes) that users have for editing their forum posts before they are mailed out. Once a forum post has been mailed and further edits are made, the date, time and editor are mentioned in the post.
- Post delay: Set the time in minutes before a post is finalised and further edits are marked as such.
- Click the Save button to keep your changes.
9.6.2. HTML filters¶
Administration → Extensions → HTML filters
Mahara uses HTML Purifier to filter out malicious code that could threaten the security of the system. If you have code, e.g. iFrames or JavaScript that you wish to use and that otherwise gets filtered out, you will have to write a filter to circumvent that. Filters should always be specific to their purpose and not give ‘carte blanche’ to ensure security as much as possible.
Mahara already comes with a number of installed filters. Others can be uploaded and then installed. If you have created a new set of HTML filters, you can install them by unzipping the files into the folder /htdocs/lib/htmlpurifiercustom
and then click the Install button.
Custom filters for iFrames that allow the embedding of media content such as YouTube and WikiEducator allow users to grab the URL of the page on which the media is displayed instead of having to find the actual embed code.
Note
You do not necessarily require bespoke filters for media that you wish to embed via <iframe> embed code. If you are happy to use the original embed code, you can add it to the list of allowed iframe sources.
If you wish to be able to paste the URL instead (like for a YouTube video), then you would need a bespoke filter.
9.6.3. Allowed iframe sources¶
Administration → Extensions → Allowed iframe sources
This feature allows you as site administrator to specify the base URLs for media that you want your users to be able to embed. These iframes are then considered safe and will not be stripped out of a text box, the external media block or a journal entry where you can use them. You do not have to write bespoke filters for using these iframe sources.
The administrator interface allows you to add and manage these sources easily. Mahara already comes with a number of built-in iframe sources that you can take as examples.
- Site: The base URL of the iframe code.
- Display name: What the user will see in the external media block.
- Click the Edit button to update the display name of an existing iframe source or the favicon source.
- Click the Delete button to remove an existing iframe source.
- Display name: Change the display name of an existing iframe source here after having clicked on the Edit button .
- Icon host: Choose the base URL where the favicon can be found for the site that you are updating in case it is not fetched automatically.
- Click the Save button to keep your changes for this site.
- Site: Add a new iframe source by entering its base URL here. Please make sure to leave out the
http://
. Only letters, digits and. / - _
are allowed. - Display name: Choose a display name for your iframe source. Typically, this is the name of the site that hosts the external content.
- Click the Add button to place your new site into the list of allowed iframe sources. If the favicon does not display, edit your site and specify the icon host as per Step 6.
Note
Some sites can be reached via a variety of URLs, e.g. GoogleApps, Glogster. You need to provide all possible base URLs to ensure that the iFrames are displayed. If you give the individual sites of one provider the same name, it will only show up once in the list of iFrame sources in the external media block and not clutter the space unnecessarily.
See also
Community members started to collect iFrame sources that they are using on their sites to share which URLs would need to be provided to get the iFrames to work. You can check out the list on the wiki and also add your own iFrame sources there.
9.6.4. Clean URLs¶
Administration → Extensions → Clean URLs
You can configure your site to use human-readable URLs for user profiles, groups and (group) portfolio pages. For example:
- profile page: http://mahara.example.com/user/bob
- portfolio page: http://mahara.example.com/user/bob/bobs-portfolio-page
- group homepage: http://mahara.example.com/group/bobs-group
- group portfolio page: http://mahara.example.com/group/bobs-group/an-interesting-group-page
This option allows you to create more memorable URLs.
See also
Please follow the configuration instructions on the wiki for enabling this feature on your site. You need access to the server to do so.
In the administration area you can generate clean URLs for existing users, groups and pages. This is handy when you upgraded from an earlier version of Mahara or want to reset all custom URLs.
- Click the Submit button to regenerate clean URLs. Please beware that all existing clean URLs are lost.
- You see the results of the action at the top of the screen.
Warning
If you generate clean URLs for all users from here, those who have already changed their URLs will lose their changes and links will be broken. We recommend you use this feature only when upgrading your Mahara site or when things have gone wrong with the clean URL generation.