|
Table of Contents
Chapter 1 - about the directory structureLearning how to develop modules for pluck begins with the understanding of the directory structure of pluck. The root folder of pluck contains 3 directories: images, docs and data. The last one, data, is where most of plucks important files are stored. Inside the directory data, we see some other directories. Two of those directories are important when developing modules: these are the dirs data/modules and data/settings. The "data/modules" directoryThe name of the directory already suggests what it's for: in the dir data/modules, the installed pluck modules are stored. When a users installs a new module through the administration center, it is installed in this directory. For each module, a directory is created inside the data/modules dir. In a fresh pluck installation, you can already see three directories there: albums, blog and contactform. These are the modules that are installed by default. Most modules let their users save data. For example, the albums module lets the user save pictures and information about these pictures. This user generated data should not be saved in the directory data/modules. That's what the directory data/settings is for. The "data/settings" directoryIt's wise to seperate the place where the module code is stored from the place where user generated data is stored: this way it's very easy for the user to backup the entire pluck installation without having to backup all the files. When a module is installed, there will be automatically created a folder for the user generated data for that specific module. These folders for user-settings will be created in data/settings/modules. For example, if a module with the name polls is installed, the user-settings directory that will be created is data/settings/modules/polls. The module itself is installed in data/modules/polls.
So, remember…
Each installed module has two important directories:
Ok, let's go to the next chapter!The next chapter will learn you how to tell pluck about your module. Go to the next chapter... |