About modding
You've probably done it before, either with Projectfork or any other component, or maybe even with Joomla itself: Modifying some files to change the layout or some features. To do this, you would normally search for the file and then do all the changes in it that you've wanted. The problem with this method is that could lose these changes whenever you update the component or Joomla to a new version. And this is where mods come into play to solve the problem:
Whenever you need to modify a source file of Projectfork, you create a copy of the file first and work on that instead of changing the original file. Then you create a mod package and install it in Projectfork. The system will recognize that a modified file exists and will load it instead of the original one. The advantage of this method is that whenever you update Projectfork, your mods will still be there. Additionally, you can now maintain and share the mod across multiple Projectfork installations because all you have to do is to install the mod package.
Limitations
For technical reasons certain files cannot be added to a mod. So make sure your changes do not affect any of these files:
- components/com_projectfork/projectfork.php
- administrator/components/com_projectfork/admin.projectfork.php
- administrator/components/com_projectfork/version.php
- administrator/components/com_projectfork/projectfork.xml
- administrator/components/com_projectfork/_core/init.php
- administrator/components/com_projectfork/_core/lib/debug.php
- administrator/components/com_projectfork/_core/lib/database.php
- administrator/components/com_projectfork/_core/lib/configuration.php
- administrator/components/com_projectfork/_core/lib/mod.php
- administrator/components/com_projectfork/_core/lib/loader.php
- administrator/components/com_projectfork/_core/lib/installer.php
Preparing the files
The first step in making a mod is to create a new folder on your desktop called "data" in which you want to place all the files you have modified. The "data" folder is equal to the backend component path: "administrator/components/com_projectfork/". All you have to do now is to place any modded files into the equivalent folder structure as the original file.
Here an example:
Original file path: administrator/components/com_projectfork/sections/tasks/output/list_tasks.php
Mod file path: data/sections/tasks/output/list_tasks.php
Creating the XML file
Once you have all your files in place, you now need an XML file which is used for the installation and config settings of your mod. An example mod package (example_mod.zip) can be found in any Projectfork package in: "administrator/components/com_projectfork/_dev". Open the package and extract the xml file from it to your desktop (not into the data folder!). Next, rename the file to what you want to call your mod (lowercase and no whitespaces). When you have that, open the file and edit it according to the descriptions inside.
Creating the ZIP package
Once you're done with the xml file, create a new .zip package and put the xml file and the "data" folder into the package. Now you should try to install and uninstall your mod in Projectfork to see if everything works.
Share it
Please share your mods with us and the Projectfork community! You can submit your install packages in the extensions forum. Thank you!