Actions

Difference between revisions of "Developer Area/Specifications in Development/External media block extension"

From Mahara Wiki

< Developer Area‎ | Specifications in Development
(expanding on Kristina's description)
Line 1: Line 1:
 +
This feature is funded by the [http://www.canberra.edu.au/ University of Canberra] and carried out by [http://catalyst.net.nz Catalyst IT].
 +
 
Mahara 1.5 will have the [https://bugs.launchpad.net/mahara/+bug/922360 SafeIFrame feature of HTML Purifier].
 
Mahara 1.5 will have the [https://bugs.launchpad.net/mahara/+bug/922360 SafeIFrame feature of HTML Purifier].
  

Revision as of 14:17, 18 March 2012

This feature is funded by the University of Canberra and carried out by Catalyst IT.

Mahara 1.5 will have the SafeIFrame feature of HTML Purifier.

The existing "External media" block is to be expanded so that any iFrame that is allowed by the site admin can be used besides the special filters we already have which allow users not only to use the embed code but also to just provide the URL.

New config option for HTML Purifier

A site admin setting is created in the HTML Extensions (or the existing one is used) which allows a site admin to add URLs for iFrames from the frontend (add, edit, delete).

This setting will then pull the favicon from the service to be displayed and the admin can also add / edit / delete the alt text / title to be displayed with the favicon. The favicon is also displayed on the admin page so that the site admin sees them there.

External media block to use HTML Purifier

Currently, the external media block has a list of embedded code that it supports along with fragile parsers for each of these.

We will remove this custom parsing code and just let HTML Purifier filter the code when we detect that the user has pasted embed code (as opposed to just a URL). This will remove code duplication and will also enable admins to add new websites easily to the list of services supported by this block.

The current text field will be changed into a text area to make it easier to see the entire iframe code instead of only the first 50 or so characters.

Listing services supported by the external media block

  • The services for which a filter exists that allows users to put in the embed code or just the page URL are identified and listed first under a heading in alphabetical order according to their alt text.
  • All other embed codes for which only the entire iFrame embed code works are listed under another heading in alphabetical order according to their alt text.
  • The icon of any service displayed is linked to its homepage (as is currently the case already).