Here are step-by-step instructions on how to submit Tiki code changes under two different situations: when using a hosted server and when using your own PC as a server for development purposes. How to get commit access and Where to commit are recommended reading before starting these instructions.
Although the process is a little different for each situation, the basic idea is the same. First, you check out the developer version you wish to make changes to. Checking out means downloading the entire developer version from the repository (SourceForge.net) to your server using a SVN program. An SVN program is used because it will keep track of the changes you make and allow you to upload only the changed files to the repository. The entire Tiki program is downloaded (not just the files you want to change) so that you can install and test the Tiki version with your changes. After making and testing your changes, you commit them to the repository using the SVN program, which means your changed files are uploaded into the repository, creating a new Tiki development version that includes your changes.
Below, the processes for both situations (hosted server and PC as the server) are described.
- Using a Hosted Server
- Using Your PC as the Server
The following are must-haves in order to commit whether you are using a hosted server or your own PC as the server:
- SourceForge Account: You will need to have an account at SourceForge.net - click here to register for one.
- Project Administrator Permission: A Tiki Project Administrator will need to grant you permission to write to the code repository by adding your SourceForge username to the Tiki project as a developer. Project Administrators are listed at http://sourceforge.net/projects/tikiwiki/develop.
- Decide Version: There are different developer versions that changes can be made to. Before you begin, decide or get advice on which version you should download and make changes to. See Where to commit for more information. Which version you intend to change affects the path you will need to specify when checking out and downloading those files. The paths for the different versions can be found at SourceForge.net at https://svn.code.sf.net/p/tikiwiki/code/.
The following are must-haves in order to commit on a hosted server in addition to the general prerequisites noted above:
- SSH/Shell Access: You will need to access your server using shell access. This may be available from your web host (or you may be able to request it). If so, it will show up on the cPanel (if you have one) in the Security section. Otherwise, there are free third-party programs that do the same thing (like PuTTy - and here’s a list of such programs).
Linux and Mac‘’Linux and Mac machines already include a system utility called Terminal that provides shell access.’‘
- SVN: Your server will need to have SVN installed. If it’s not installed, try typing
apt-get install subversionwhile connected through shell access to install it.
In addition to the must-haves noted above for either situation, here are additional must-haves in order to commit when using your PC as a server:
- Third-Party SVN Program: You will need to install a third-party SVN program. A list of such programs can be found on this Wikipedia page, or see the Create an IDE page on this site which links to pages documenting how to create a development environment.
- Third-Party source code editor: You will need to download and install a third-party code editor to make the changes you wish to make. Do not use a plain text editor (like Word). A list of code editors can be found on this Wikipedia page, or see the Create an IDE page on this site for some tips.
Warning‘’It’s very important to set your code editor to:
(1) use Unix-style line breaks (LF) and not Windows style breaks (CRLF), and
(2) encode documents with UTF-8 without BOM (the “without BOM” is important).’‘
Here’s an overview of the steps for committing using a hosted server:
- Get onto your server through SSH/Shell Access
- Run the svn command to download the development version you want to change onto your server
- Make the code changes you want to make and save them
- Run the svn command to check your changes
- Test your the Tiki install that you just changed to see if it functions
- Run the svn command to commit your changes
- End the SSH/Shell Access connection
These steps are described in detail below.
- Access the server you want to download to through SSH/Shell Access (through cPanel or third-party software). You will need to enter the following at a minimum:
- The server’s host name or IP Address
- Your username on that server
- The related password
ssh email@example.com enter password
You can accept message about RSA key fingerprint.
- Once on your server, move to the web directory
- Create an empty directory on your server to download to like you would for a normal install of Tiki
- Move to the directory you want to download to. For example, if you want to download to tiki, then type the following and hit enter:
svn checkout (path) . and hit enter to check out a development version. The (path) in the command is the path on SourceForge.net to the version you wish to make changes to.
Below, two alternatives are shown: checking out a branch and checking out the trunk. In both cases, assume we found a bug in the last_mod plugin and therefore want to change the
- Example: Checking out Branch 12.x (see Get code for available Versions)
svn checkout https://svn.code.sf.net/p/tikiwiki/code/branches/12.x .
- Example: Checking out Trunk
svn checkout https://svn.code.sf.net/p/tikiwiki/code/trunk .
After hitting enter, you should see the file names scrolling up the screen as the files are downloaded. At the end, you should see a message telling which revision has been checked out, as in this screenshot:
You can make changes either using your normal edit interface or through the shell access.
The easiest way to make changes is usually through whatever interface you normally use, for example by going through cPanel > File Manager and opening the file with your server’s code editor, however using a editor like PhpStorm will save immeasurable amounts of time if moderate changes are made. You may also want to familiarize yourself with Tiki’s DevTips and Secure Coding Practice Guidelines. After you’ve made and saved your changes, go to Step 4.
Expand the instructions below if you’re making changes through the shell access instead.[+]
- Go back to the SSH/shell access screen and make sure you are in the top level tiki directory, www/tiki in our example
- In the SSH/shell access screen type
svn diffto view your changes:
All changes you have made to all files will be shown as in the following screenshot:
As you can see, only one line was changed here (actually one character, an O was changed to a Z). Since this was the intention, we will move on to test the change.
- If you haven’t already, install the developer version you have downloaded and changed by following the normal Installation procedures through an internet browser.
Note‘’If you get a server error, you may need to set the permissions for all of the files you downloaded to 755.’‘
- Once installed, test Tiki to ensure that your changes work properly.
- Type the
svn commitcommand which consists of 3 parts:
- The svn command:
svn commit -m
- A note describing the change, for example:
[FIX] (short description of fix)
Your commit message may start with one or more to distinguish changes. Descriptions with tags will go into the changelog and tags will help to classify.
- The svn command:
The following tags can be used to distinguish changes:
- NEW for additions of new features
- ENH is an enhancement; not really new but makes things work better (e.g. look and feel, performance...)
- DOC for improvements in the tips or contextual documentation provided to the user/admin
- FIX for bug fixes of any sort
- SEC for security fix operations. If you feel you have reason to put this tag, please first contact security at tiki.org.
- UPD for updates of third party/vendor libraries
- UX for user experience improvements; makes Tiki easier to use and understand (more details in https://dev.tiki.org/UX )
- DB for changes in the database
- MOD is a change which may be disruptive. For example, changing the default value of an option.
- REM for feature removals
- REF for refactoring; changes the structure of the code (to make it cleaner or clearer), without changing its actual behaviour.
- KIL for removals of unused or obsolete files. This tag was used in the sense of REM prior to Tiki 6.
- REL for the release process
- MRG for branch merges, generally performed by the merge scripts
- TRA for translation
When possible, it’s also nice to indicate what feature is concerned by the change.
The tags info is also online: https://dev.tiki.org/Commit+Tags
++ If there is a report of the issue solved, add a line to indicate it. For example, if the change addresses issue #426: “Ref: http://dev.tiki.org/wish426” ++ ++ In the case of a “backport,” (committing a change already made in trunk to an earlier version), a backport reference should be added in front. For example,
[bp/r61102] [FIX]...in a commit message to the branch branches/16x, means this fix is a backport of trunk revision 61102 to the next version of Tiki 16x. Depending on the period, backports are subject to an extra level of review so please read Quality Team and Where to commit first or ask on the mailing list or IRC if unsure. ++ ++ In the case of a “rolling back,” (reverting a commit), a “rb” reference should be added in front. For example,
[rb/r61102] ...in a commit message to the branch branches/16x, means the change committed in revision 61102 are rolled back (removed, reverted) to the previous state, before r61102. ++ ++ In the case of a typo fix only and/or while doing code reformatting that won’t need to be in the changelog.txt file it is ok to commit without a tag. ++
- The file path: filepath
- You can leave the file path off, in which case all changes are shown in svn diff will be committed (even if more than one file has been changed)
- Following our example, this would be:
svn commit -m "[FIX] Fixed display of time zone, which was showing as %O" lib/wiki-plugins/wikiplugin_lastmod.php
Here’s a screenshot (with a slightly different description):
- You will get a message indicating that your commit was successful
Tiki is the collective work of hundreds of people. It works because of volunteers, like you, take the time to make it better.
Notice of your commit will appear in the Tiki IRC chat channel. Go here to see it in the logs or, better yet, log on to the actual chat channel just before you commit and see the notice pop up live!
See next page for instructions when using your own PC as a development server.