Forums | Mahara Community

Developers /
What code goes into the "local" directory?


anonymous profile picture
Deleted user
Posts: 112

26 December 2013, 1:30 AM

What is the purpose of the "local" directory?  If I wanted to create a plugin, is that were the code is supposed to go?  What about if I wanted to override an existing plugin?  Or is it better to just create a new one?

Melissa

 

Kristina Hoeppner's profile picture
Posts: 3542

27 December 2013, 9:36 AM

Hello Melissa,

The "local" dir is used for any customizations that you want to make without having to touch core code. For example, if you want to change a template in a theme, you put it into local. If you want to change some language strings, you wouldn't update the strings in the /lang folder, but put the strings into a file in your local dir so that you don't run into problems when you update your code.

As far as plugins go, I think they always need to go into the artefact or block folders (or other folders if you are adding authentication etc.) because they need to be installed and thus database changes are being made.

Cheers

Kristina

 

anonymous profile picture
Deleted user
Posts: 112

29 December 2013, 3:31 PM

So is the file structure the same as the core file structure ... just located in the "local" directory?  But plugins, don't go into the local directory?  Am I correct in what I am understanding?

Melissa

 

Kristina Hoeppner's profile picture
Posts: 3542

30 December 2013, 1:00 PM

Hello Melissa,

You shouldn't always have to re-create the entire file path. See https://mahara.org/interaction/forum/topic.php?id=5830&post=24919 for some information for the lang strings for a plugin.

Cheers

Kristina

 

4 results