Fullscreen
[Show/Hide Left Column]
[Show/Hide Right Column]

Print

Commit

How to Submit TikiWiki Code Changes

Here are step-by-step instructions on how to submit TikiWiki 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 an 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 TikiWiki program is downloaded (not just the files you want to change) so that you can install and test the TikiWiki 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 TikiWiki development version that includes your changes.

Below, the processes for both situations (hosted server and PC as server) are described.

Table of contents


Prerequisites

In Either Situation

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 (external link) to register for one.

  • Project Administrator Permission: A TikiWiki Project Administrator will need to grant you permission to write to the code repository by adding your SourceForge username to the TikiWiki project as developer. Project Administrators are listed at http://sourceforge.net/projects/tikiwiki/develop (external link).

  • 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 the SourceForge.net at http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/ (external link).

With a Hosted Server

The following are must-haves in order to commit on a hosted server in addition to the general prerequites 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 (external link) of such programs).

  • SVN: Your server will need to have SVN installed. If it's not installed, try typing apt-get install subversion while connected through Shell Access to install it.

With Your PC as Server

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 (external link), or see following Recommended Solution section.

  • 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 (external link), or see following Recommended Solution section.
    Close
    warning Warning
    It's very important to set your code editor to:
    (1) use Unix-style line breaks (LF) and not Windows style breaks (CF + LF), and
    (2) encode documents with UTF-8 without BOM (the "without BOM" is important).

Of course other software is required to set up your PC as a server in the first place (see Using Your PC as the Server on the next page or read on about a recommended solution for setting up a development environment.
One recommendation on how to set up a development environment on your machine is to use XAMPP (external link) to set up your machine as a server, and Aptana Studio (external link) for the code editor and SVN program (and more). The good thing about these is that they are multi-platform (LINUX, Mac, Windows) and they are packages that save you from having to install multiple programs (oh yes, and they're open source and free!). See Development Environment for some tips on using these programs together.

Using a Hosted Server

Overview of Steps

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 TikiWiki 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.

Close
note Note
These instructions assume you are using a standard shell on a Linux machine (i.e., your server is running Linux). If the server is using Windows, please make sure to run something like dos2unix before you commit.

Step 1: Get on Your Server Using SSH/Shell Access

  1. 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:
    1. The server's host name or IP Address
    2. Your username on that server
    3. The related password

    Connect to remote server via SSH
    ssh username@server.com
    enter password

    You can accept message about RSA key fingerprint.

  2. Once on your server, move to the web directory
    Move to the web directory, typically "www"
    cd www


  3. Create an empty directory on your server to download to like you would for a normal install of TikiWiki
    Create a directory, for example "tiki"
    mkdir tiki


  4. 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:
    Move to download directory
    cd tiki


Step 2: Checkout Files via SVN

Type in "svn co (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.
Close
tip Tip
See Where to commit for guidelines on deciding the appropriate version to commit 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 lib/wiki-plugins/wikiplugin_lastmod.php file.

  1. Example: Checking out Branch 4.x
    Checking out branch 4.x
    svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/4.x .

    Screenshot:


  2. Example: Checking out the Trunk
    Checking out the trunk
    svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/trunk .

Close
warning Important
In both cases the last space and period at the end is very important - it causes the download to be made to here, in the directory where you are at when the command is made.


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:


Step 3: Make Your Changes

You can make changes either using your normal edit interface or through the shell access.
Using Normal Edit Interface
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. 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.
Use Shell Access to Make Changes
[+]

Step 4: Check Your Changes

  1. Go back to the SSH/shell access screen and make sure you are in the top level tiki directory, www/tiki in our example

  2. In the SSH/shell access screen type "svn diff" to view your changes:
    Use svn diff to view changes
    svn diff

    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.

Step 5: Test Your TikiWiki Install

  1. If you haven't already, install the developer version you have downloaded and changed by following the normal Installation procedures through an internet browser.
    Close
    note Note
    If you get a server error, you may need to set the permissions for all of the files you downloaded to 755.


  2. Once installed, test TikiWiki to ensure that your changes work properly.

Step 6: Commit Your Changes

  1. Type the svn commit command which consists of 3 parts:
    1. The svn command: svn commit -m
    2. A note describing the change: " [FIX] (short description of fix) " for example
      Each description should begin with one of the following tags which identify the type of change
      • [MOD] is a modification; this implies a change in how things work
      • [NEW] apply if something new was added in tikiwiki
      • [ENH] is an enhancement; not really new but makes things work better (e.g. look and feel, performance, ...)
      • [FIX] can be used for bug fixes of any sort
      • [SEC] for security fix operations
      • [REL] changes for release process only
      • [KIL] removal of unused or obsolete files
      • [DB] for changes in the database
    3. The file path: filepath

    Following our example, this would be:
    Commit command
    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):


  2. When prompted, enter your SourceForge username and password
    Close
    tip. Tip
    You may be prompted for a password based on your server user name instead of your SourceForge user name. Just hit enter to move to a prompt for entering your SourceForge user name.


  3. You will get a message indicating that your commit was successful

Step 7: Disconnect Shell Connection

Shell command
exit



Step 8: Be Proud of Yourself

TikiWiki is the collective work of hundreds of people. It works because volunteers, like you take the time to make it better.

Notice of your commit will appear in the tikiwiki IRC chat channel. Go here (external link) to see it in the logs or, better yet, log on to the actual chat channel just before you commit to see the notice pop up live!

See next page for instructions when using your own PC as a development server.


First page Previous page page: 1/2 Next page Last page

Contributors to this page: lindon440 points  , SEWilco155 points  , Patrick_Allard8 points  , pkdille611 points  and marclaporte31748 points  .
Page last modified on Friday 05 March, 2010 04:23:52 UTC by lindon440 points .

Main Menu [toggle]


Bugs and Wishes
  1. Report a Bug (or suggest a feature enhancement)

  2. Search Bugs

  3. List yours



About Development

Mailing lists

Extra Stuff

Teams

External Links

Full list of Wiki Pages

TikiWiki on Social Networks


To register [toggle]

To have an account at this site, please register at Tikiwiki.org (external link), and then use that user name and password to log in here.

Search a Wiki Page [toggle]

Exact match

Search Tracker Items Subject [toggle]

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI – 508)
Action log 2.x
Administration
Ajax 2.x
Alert 3.x
Articles & Submissions
Backlinks
Banner
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Custom Home (and Group Home Page)
Database independence
Database MySQL
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tikiwiki.org (Help System)
DogFood
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Group
Help System
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interaction
Inter-User Messages
InterTiki
jQuery
Karma
Live Support
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tag
Missing features
MindMap 3.x
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Payment 5.x
Performance Speed / Load / Compression / Cache
Permission
Poll
Profile Manager
Quiz
Rating
RSS
Score
Search engine optimization (SEO)
Search
Security
Semantic links 3.x
Shoutbox
Site Identity
Slideshow
Smarty Template
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
System log
Tags 2.x
Task
Tell a Friend + Social Bookmarking 2.x
TikiTests 2.x
Theme
Toolbar (Quicktags)
Trackers
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace Ideas 4.x
WYSIWTSN 4.x
WYSIWYCA
WYSIWYG 2.x
XMLRPC

Last Comments [toggle]

  1. Home-made fix
  2. Tutorial
  3. Hack for Multiple Uploads
  4. More findings
  5. that could work