Forums | Mahara Community

Developers /
The local folder


Aaron Wells's profile picture
Posts: 896

29 April 2014, 16:09

Hi,

No, that's one of several areas where our developer documentation is somewhat lacking. Information about what can go in /local is spread throughout the wiki and the codebase, with no one central place.

I've been meaning to fix this for a while, so I've taken this opportunity to do so. After searching through the codebase for all occurrences of the string "local", I'm fairly confident this is the full list of things that can go there:

  1. It has its own version.php, install.xml, and upgrade.php files. You can use these to add and alter database structures, and apply database updates, via the standard Mahara upgrade process like a normal Mahara plugin. This is meant to be a place to put in a site's little customizations that don't fit into any other plugin.
  2. In local/install.php there are methods "localpreinst()" and "localpostinst()" which get called early and last, respectively, during the Mahara installation process, which allows the running of custom code during installation.
  3. Custom lang files: https://wiki.mahara.org/index.php/Developer_Area/Language_strings#Custom_lang_strings_in_.2Flocal
  4. Custom help files: https://wiki.mahara.org/index.php/Developer_Area/Language_strings#Custom_help_files_in_.2Flocal
  5. Custom theme templates: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides
  6. There are several "hook" functions which core will call if they are defined in local/lib.php. I've just now documented all of them in the Mahara 1.10dev branch. You can see the full list here: https://github.com/MaharaProject/mahara/blob/36db800e13c5f3657785682ab669f727c4c88170/htdocs/local/lib.php

Update: I've written this up in the wiki: https://wiki.mahara.org/index.php/Developer_Area/Local_customizations

Cheers,

Aaron

Edits to this post:

25 April 2014, 22:20

Hello Kristina,

This works well for php lang file. But what about the the content of the help folders ?

Cheers,

-dajan

A post by Account deleted was deleted

13 results