FAQ
Remository general
Hacking Remository
| Hacking Remository |
|
If you want to make modifications to Remository, it is relatively easy to find your way around the code, especially in recent versions. Some code is in the basic Remository user side directory, .../components/com_remository/ The overall control of the logic of the user side is in remository.php and you should be careful about modifying this. Some important display code is in remository.html.php including the code to do with file lists. Since file lists are needed in more than one place, this code is common to different Remository functions. It is reasonably safe to make changes here, provided you keep track of what you have done so as to be able to backtrack, and test as you go. In particular, it is easy to alter the fields that are displayed in lists of files. Below the main user side directory are some subdirectories:
The c-classes directory contains one controller class for each function available from Remository on the user side. You will see that the names of the classes tie up with the names you see in the browser URI bar. Take care changing any of the controller classes. The v-classes directory contains one view class for each user side function and should be relatively easy to modify. There is basic code in the admin side directory .../administrator/components/com_remository/ that mostly should not need changing. Most of the specific code is within the sub-directories listed above. Similar to the user side, there is a controller for each Remository admin function, to be found in c-admin-classes. Some very simple functions have no controller, only a viewer class. There is a view class that creates the browser display, one for each function, in the v-admin-classes directory. The images directory stores images, with file and folder icons in their own subdirectories. There are many languages supported for Remository, and the definitions are stored in the languages sub-directory. The correct language file should be loaded automatically, although this may have stopped working with the latest versions of Mambo. In this case, check what is the value of the language in the configuration and alter the appropriate language file to match. You are free to modify the language file, but I recommend adding your own definitions to the beginning of the file. Since the standard definitions are coded conditionally, they are not effective if the relevant symbol is already defined - so your modifications take precedence. Keeping them all at the start of the file will make it easier to handle upgrades. |