Gallery2:Developer Starterkit - Gallery Codex
Personal tools

Gallery2:Developer Starterkit

From Gallery Codex

This document is intended to give new G2-developers a glance of how to keep informed, what to read and what's important to know when working on this project. It might also be useful as a reference (or a link collection) for any other developer.

Getting started

The must-read documents are the G2 Vision Statement and Developer Guidelines. Although not yet complete, they include important information on the philosophy behind the G2 code, the coding style, and what you should know before starting to code.

After that you should get yourself confortable with the development team. Introduce yourself in the mailing lists (see later), stay for some time on IRC. Getting to know the "who is who" is not always easy, but we have some tools to help you on this task. Read a couple of posts in the main developers mailing lists, scan through the forums to get the first impression on what is going on right now. Use the rest of this guide to help you finding the information you want.

Also see: How to Join the Dev Team


There are several forms of communication that the Gallery development team uses:


The most interactive and transient form of communication happens on IRC.

IRC Channel

   Channel: #gallery

Most developers hang around there from time to time. Be aware of the different time zones! We have developers all over the world (take a look at the Gallery Developer Map), ranging from California (PST = GMT-8) to Australia (GMT+11). So usually when someone from Europe is waking up, the core Gallery developers from the US are going to bed.

On a weekly basis there is an official "Gallery Meeting" on IRC, which currently is Tuesdays at 1:00PM Pacific Time.

Every commit on SVN is also automatically announced on the IRC channel through a bot. Other interesting functionality of the bot will be explained someday here on the Wiki, meanwhile you should just hang around and see how others interact with it.

Mailing Lists

  • The -devel list is aimed at developers and users that want to help or send bug reports or suggestions.

  • You can subscribe to the -checkins list and get instant information about any commit that is done the the gallery SVN server. This is the easiest way of knowing "what's going on".

  • This list is restricted to core team members only
  • Important, timely and semi-permanent developer discussion should take place on the -core mailing list. Usually important stuff that is discussed on IRC should be summarized and send to this list so that everyone can enjoy it without having to go through IRC logs.


G2 Support Forums

G2 Development Forums

The forum is the easiest user-to-developer and user-to-user communication form. Many active gallery users will usually be around here sending bug reports, thanking the gallery team, suggesting new stuff or helping out other users.


The codex is a wiki, and the place where developers can share information that should be persistent and available all the time. This page, for example, is part of the Gallery Codex. Persistent, changeable and you can keep track of who changed what and when.



Project Tasks 

Requests for Enhancement 

We use the SourceForge's trackers to manage our time and have an overview of "what's going on". Each developer is responsible for their own tasks!

If you are unsure what we mean by those terms, read the Tracker Practices, where they are explained.

Common G2-Developer Routine


You can check the trackers at SF daily (if you want). If you read about a bug that no one is working on (be it in the forum, lists, etc) and you can confirm a bug, add it to the SF's bug interface so we can follow up on the bug without having to find the information. Make a link to the original post (e.g. the forum topic) in the tracker's comment.

If you have some time to work on G2, scan the bug or RFE tracker and find a bug or feature that you want to work on. Coordinate on IRC with bharat, mindless or valiant, if unsure, or just assign the track for yourself and start working. Be sure to update the tracker information as soon as possible!

If you have time, come by the Forums to see what users are saying about it. This is especially important right after our releases come out, since we have much more user activity in the forums at those times.


On a weekly basis we have the G2 meeting on IRC (currently it is Thursdays 10 AM PST = 6 PM GMT). Not everyone can attend every meeting (mainly because of the different timezones), so usually the G2 Meeting Notes are posted the next day on the Codex. If you can't attend and are actively doing something on G2, you should send an email to the -core list some days/hours before the meeting, so the information can be used in the discussion.


If you just need to know who is currently doing what, you should check the G2 "Who is doing what" wiki page. If you are a regular G2-helper, you should put in your name here and update the information as you go. It's each one's responsability to keep this list up-to-date.

The RecentChanges codex page is interesting to visit from time to time. Therefore, when you make changes to a page on Wiki, only tag the change as a "minor change" if you didn't change anything in the content (e.g. you make a orthographical or grammatical correction). If you change content (no matter how little), don't mark it as a minor change! It will appear in the RecentChanges and we can see what you changed in the "diff".

Source Control

We use Subversion to manage our code. Take a look at these SVN-Statistics to see how our work is performing. Here you also have a chance to see who did how much, what and when.

See: Using Subversion for Gallery


When you are working with G2, you might wonder what API calls are available. The API Documentation can help, but its a bit outdated right now. Currently its usually best to just read the source (from which this API Documentation was extracted from anyway), as its very well documented.

G2 API Documentation

Recommended Editors & IDEs

  • Emacs with bharat's modified php-style.el from /svnroot/gallery/trunk/docs/dev/php-style.el: Nice syntax highlighting, always correct indention (that's worth a lot!), efficiency of emacs
  • Vi: some of us prefer emacs over vi...
  • Vim: see the appropriate setting page
  • SubEthaEdit for Mac OS X. See how to set SubEthaEdit syntax highlighting for Gallery2
  • Eclipse + PHPeclipse: Eclipse is a full-blown IDE with a lot of features. See: Gallery Eclipse Tutorial
  • PHP Designer 2006: An excellent free PHP editor for Windows. Proper syntax hilighting, loads of debugging features and much more.

Code Reviews

See: Code Review Process and Tips