Make sideblocks into a normal plugin type

Bug #1315205 reported by Aaron Wells
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Wishlist
Aaron Wells

Bug Description

Sideblocks are the blocks that show up in the side column of the page. These include the login form, the user file quota, the tag cloud, etc. For more information about what sideblocks are and how they're currently implemented, see the developer's docs: https://wiki.mahara.org/index.php/Developer_Area/Sideblocks_API

I'm filing this bug because sideblocks are currently implemented as an API, and there's no easy way for a 3rd-party dev to add additional sideblocks without patching core code. Gregor has supplied a patch in https://bugs.launchpad.net/mahara/+bug/1314465 that adds a /local function for adding sideblocks, but this is still a little clunky because it requires the user to manually paste PHP code into their /local/lib.php file.

I think the best thing to do, would be to turn sideblocks into a full-featured plugin type, like blocktypes, artefacts, interactions, etc. Then admins could install new sideblocks the same as they install any other plugin, by simply copying it into the correct directory.

Some implementation ideas:

1. All the existing core sideblocks would also get turned into sideblock plugins.

2. Sideblocks, like blocktypes, could live inside other plugin types. So for instance an artefact plugin could include one or more sideblock plugins.

3. Each sideblock class would have a static method that gets called on each pageload and returns a boolean to indicate whether or not the sideblock should be displayed on that page. (Tricky to figure out what data should be passed to this method, though...)

4. Additionally, sideblocks could be added to page by the page itself using the existing $sideblocks param to the smarty() method.

5. Also, this might be a good time to rethink the name "sideblocks", since the term would now be exposed to our userbase and I foresee endless confusion about the difference between blocktypes and sideblocks.

Aaron Wells (u-aaronw)
description: updated
Changed in mahara:
assignee: nobody → Aaron Wells (u-aaronw)
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.10.0 → 1.11.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 15.04.0 → 15.04.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.04.1 → 15.10.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.10.0 → 16.04.0
Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Confirmed
milestone: 16.04.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.