G2 Development Task #1 (yes, you can be a G2 developer!)

bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2003-05-03 05:03

Hi all. I'm going to start posting development tasks that are up for grabs. Anybody who is interested can work on the task. If you're interested in working on it, post a follow up about it and keep us posted at regular intervals to show that you're still involved. If somebody else is working on it and you want to collaborate, use this post to coordinate your efforts.

Task #1 will be to rewrite the G2 installer. In its current incarnation it's very functional, but I want it to be greatly improved. I want the user to be guided every step of the way so that we don't have issues where users are unable to even install the application. I've come up with a series of requirements:

  1. Installer must start with a summary page that explains how many steps it is going to take.
  2. Each step of the way should give you an indication of where you are in the process and provide you with a means of going back and editing data you already entered, if possible.
  3. The user should be allowed to confirm all data entered at every step of the way
  4. The installer should have a System Check page that verifies that:
    • You've installed the config.php file correctly and that it does not have any PHP syntax errors in it
    • Your version of PHP is 4.0.4 or newer
    • The __FILE__ directive functions properly
    • Your PHP has gettext installed (or you should be informed that localization won't work properly).
    • Safe mode is off
  5. If your system does not meet these requirements you should be informed in clear English about what's missing and how to fix it.

  6. The installer should ask you for a password and verify that it matches the one entered in config.php. If not it should instruct you on how to edit config.php to fix this.
  7. The installer should verify that:
    • The gallerydata directory exists and is writeable by the webserver
    • The database configuration and authentication information you entered is correct
  8. If any of this info is incorrect it should inform you in clear language about what's wrong and how to fix it.

  9. The installer should allow you to change any of the information in your config.php and generate a *new* config.php. It will try to overwrite the existing config.php if possible and failing that it will offer to download to you a copy that you can copy to your webserver by hand, or it will detect if your server supports ftp and offer to ftp it to the server for you (prompting you for a username, password and directory path).
  10. All content (ie, english text visible to the end user) must be separated into string files so that they can be localized into different languages. Do not use gettext or anything fancy for this, since we don't know if gettext even exists on the system. Instead, define them as constants like PostNuke does.
  11. All PHP code should conform to the Gallery Code Conventions
  12. The resulting config.php should look just like the config.php-dist in the setup directory, except with the fields filled out properly.
  13. The installer should create all required data directories and files.

Suggestions:

  • Break the config.php-dist down into a set of data structures containing the comment and the variable so that the script can build up the document based on that. We can use the installer itself to create the config.php-dist. This will let us add new configuration parameters in just one place
  • Separate the PHP code from the HTML code as much as possible. This will let us sic some graphic designers on the HTML and make it look good without them having to know a lot of code. Don't focus on making it pretty at first
  • Look at the existing setup.php script to get ideas
  • Install PhpBB2.0 and look at their installer for ideas. Their installer is very clean and does the "download config.php or ftp it to the server" trick which is a VERY good idea.
  • Install PostNuke and watch their config wizard for ideas of how to show summary and status at every step of the way
  • Install SquirrelMail and see how clean and easy it is to install

[/]

[/]

[/]

[/]

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Tue, 2003-05-06 18:39

I think SquirrelMail is a bad example here. It's clean and easy (I use it),
but it uses a perl-script installer from the shell. The only web-based part
is the per-user options after you login. Don't think that is the direction you
are intending to go with this ;)

 
jive

Joined: 2003-03-21
Posts: 4
Posted: Wed, 2003-05-07 22:07

I didn't even install photo gallery because it was so complex and most of the instructions seemed to revolve around having shell access. I think that you should be able to run the installer after ftp'ing and chmoding to your domain and running the installer by typing something like "http://www.domain.com/galleryfolder/installer.php" . The rest would just lead you hand by hand.

Edited out off-topic content --Bharat

 
badtzjunk

Joined: 2002-09-25
Posts: 17
Posted: Fri, 2003-05-09 04:28

agreed. installation [for me] is confusing compared to G1 ;)

 
etesla

Joined: 2003-05-18
Posts: 3
Posted: Sun, 2003-05-18 02:20
bharat wrote:
Task #1 will be to rewrite the G2 installer. In its current incarnation it's very functional, but I want it to be greatly improved. I want the user to be guided every step of the way so that we don't have issues where users are unable to even install the application. I've come up with a series of requirements:

*snip*

Are you still looking for someone to do this?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2003-05-18 03:24
etesla wrote:
Are you still looking for someone to do this?

Yep! Haven't had any takers yet. Perhaps the list of requirements scared everybody off?

 
etesla

Joined: 2003-05-18
Posts: 3
Posted: Sun, 2003-05-18 19:37
bharat wrote:
Yep! Haven't had any takers yet. Perhaps the list of requirements scared everybody off?

Well, I wouldn't exactly call me a "taker" because I'm not 100% sure I know exactly how to do everything listed there. But I think I'd like to take a crack at it. If nothing else, I can do most of it and I can learn something while my (much more code-savvy) husband helps me with the rest.

And you can certainly throw out what I do if it's not up to snuff. It sounds like a cool challenge though. :D

(Plus, I love Gallery, and anything I can do to help get G2 finished sounds good to me.)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2003-05-24 04:55
etesla wrote:
But I think I'd like to take a crack at it. If nothing else, I can do most of it and I can learn something while my (much more code-savvy) husband helps me with the rest.

Please do! Let us know if you have any questions and we'll help you get going.

 
etesla

Joined: 2003-05-18
Posts: 3
Posted: Thu, 2003-06-12 05:56

Bharat--
I really apologize for not telling you sooner, but I've had a lot of things come to a head lately and I won't be able to work on the G2 installer without neglecting my other responsibilities, as much as I'd like to.

I'm sorry!
Erica

 
grnjelloman

Joined: 2003-01-06
Posts: 44
Posted: Sat, 2003-06-21 16:43

I've done some php programming in the past.. I'll download the G2 source again and start workin on some of the specs.. Wife just had a baby but I'm currently unemployed so I should have some time to work on this... No promises but will try..

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2003-06-22 05:46

etesla, no worries. I understand how that happens!

grnjelloman, cool! let us know if you have any questions or problems. Come by the #gallery channel on irc.freenode.net and chat with the dev team if you want to talk directly.

 
nick77
nick77's picture

Joined: 2003-07-22
Posts: 77
Posted: Sat, 2003-08-16 00:10

look at oscommerce ([url]www.oscommerce.com[/url]); they got a perfect installation process. Even after setup is done it always tells you when (and what kind of!!) problem occured (chmod issues, safe_mode issues, non existing directories and so on)

This program really works great with safe_mode on

*hope to be able to say that of G2 too, soon;-)*

nick

 
gambitdis

Joined: 2002-12-23
Posts: 47
Posted: Wed, 2003-10-01 01:28

I'm going to give the installer my best attempt...

 
stephenson

Joined: 2003-10-08
Posts: 2
Posted: Wed, 2003-10-08 15:31

Hi Bharat,

I've been using G1 on my website for a while now. Very nice piece of software and look forward to G2. Do you still need a hand with the installer or can I help anyone out who is undertaking this task?

Gambitdis, if you want help with this I'd be happy to join you in this,

Cheers,

 
gambitdis

Joined: 2002-12-23
Posts: 47
Posted: Wed, 2003-10-08 15:58

stephenson,

I'm just getting started at this point. I should have an initial version out sometime next week if things go as planned. Once I get that done, I can definitely use some help.

 
stephenson

Joined: 2003-10-08
Posts: 2
Posted: Wed, 2003-10-08 16:07

@Gambitdis:

sounds good to me. Just drop me a PM when your ready.

Cheers,

 
kacheng

Joined: 2003-07-20
Posts: 28
Posted: Mon, 2003-10-20 20:14

Hi gambitdis,

I'm willing to help out on the installer project.

Have you got any tasks identified that I can help out with? Drop me a PM when you have a moment.

[This would be my first open source devel. contribution, so please be a bit patient with me as I figure stuff out.]

Thanks.

 
gambitdis

Joined: 2002-12-23
Posts: 47
Posted: Tue, 2003-10-28 21:08

I will definitely need some help. I'm not quite far enough to have particular tasks, but as soon as I get to that point I'll message you.

 
theprotege
theprotege's picture

Joined: 2002-08-16
Posts: 58
Posted: Thu, 2004-02-19 13:11

if no one has managed to knock this off yet, pmachine (pmachine.com) has a pretty nice installer with status updates after each activity.