Page 1 of 14

[BETA] phPKG - MOD installer with repositories & packages

Posted: Sun Aug 26, 2007 7:02 pm
by Dabroz
Hello! I hope I won't do anything wrong with posting this, I have never posted files here. I would like to share with phPKG. This is a set of scripts (you can call it a MOD, however it doesn't modify anything ;) ) that allows you to retrieve packages list from a repository (including new packages and updates) and to install them (something like EasyMod). It will (as for now) use FTP and some other things to setup MODs properly. If you ever have used Debian or Ubuntu, you could see some similarities to apt-get system. I would like you to check it out - there could be some errors, but it does work well in my home system (Ubuntu) and few servers I tested it on (Debian, Gentoo and PLD). It should work on Win32, however I didn't test it (i don't have one ;) ) - you only need to select TAR CLASS as method of unpacking files.

Installation is quite simple - you just have to copy all files and add (and enable) ACP module. It will setup its directories and configs at first run. Then you have to configure your FTP. Later, retrieve packages list from repository (PHP repository server code will go public with release version of phPKG) and install as many packages as you like. :)

dev3: Now, since dev3 you are also able to install any valid MOD (with MODX file), given in ZIP or TAR.GZ format. The SQL issues has also been fixed, I hope. Try it out.

As for now (26.08) there are following MODs in repository:
  • Sort by topic time
  • Welcome PM on First Login
  • Clickable rows
  • Graphical User Agent
  • Post User Agent
  • Textual User Agent in Viewtopic
  • Graphical User Agent in Viewtopic
  • Graphical User Agent Stats in Viewprofile
If you want to see it before use, there are few screens:
  1. main screen new - dev3
  2. versions screen new - dev3
  3. repository update
  4. repositories list
  5. config - methods
  6. config - FTP
  7. packages list new - dev3
  8. package info
  9. package install requirements
  10. installation summary
  11. installation progress
  12. some packages suggest other
TODO list for next release (I could split it into few releases if anybody would be interested in):
  • checking versions from multiple repos when updating
  • other upload/download methods
  • conflicts
  • requires versions, recommended requires (xx|yy)
  • fixes and modifications to interface
  • feedback
  • automagic update
  • remove, update
  • modification table for each file
  • much better error handling
  • use of "automagically installed" marker
  • separate configuration from packager (different auth levels?)
(already done - but not released yet - items are in bold)

And now, the best part - download: edit: you can also visit project's SF.net site:
http://sourceforge.net/projects/phpkg/

I look forward to your opinions.

It does require PHP5.
Some hints on enabling PHP5 on your server can be found in Internet and in this topic.

If you are expecting this error:

Code: Select all

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in XXX\pkg\bb3phpkg.php on line 27
then please remember that IT DOES REQUIRE PHP5.[/color][/b]

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 7:33 pm
by XBLFan
Wow that looks very nice. I'll be looking to install it when I have time.

Edit: I uploaded everything and enabled it, but I get this error when I try to go to it
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in forum/pkg/bb3phpkg.php on line 27

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 9:54 pm
by Dabroz
Oh, I have forgotten to mention: it does require PHP5 due to XML processing.

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 10:05 pm
by JunglistPerfection
Dabroz wrote:Oh, I have forgotten to mention: it does require PHP5 due to XML processing.
But does it still work with PHP 4?

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 10:11 pm
by Dabroz
No, it does not. It makes use of SimpleXML, available only in PHP5 (and it also uses some features of PHP5 classes). It could be - of course - backported to PHP4, downgrading OO code and replacing SimpleXML with another XML parser - but PHP4 is running out of its time (and support) ;) .

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 10:13 pm
by JunglistPerfection
So I have to install this mod on a separate database for it to work with my forum?

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Sun Aug 26, 2007 10:19 pm
by Dabroz
No, you just should enable PHP5 in your server configuration (if you don't have PHP5 available on your server, it's the high time to ask administrator for reconfiguration, or to change the server :mrgreen: ).

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 12:33 am
by XBLFan
Dabroz wrote:Oh, I have forgotten to mention: it does require PHP5 due to XML processing.
My host says: PHP version 4.4.6
Soo I'll have to wait to see if they ever upgrade to 5?
I guess I'll be waiting then :?

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 1:17 am
by RedTrinity
Our host is version 4.4.7 so looks like we will be waiting too!

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 1:56 am
by playerfr
Mine is 5 :D doese this will work with other Styles (prosilver based) ? And for other mod's you have to add them to the script or we can do it by ourself ?

Thanks :)

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 7:57 am
by Dabroz
As for now, it processes all templates and languages included in XML file. Next version will process all remaining templates and languages using prosilver (or special “default-template”) and English.

Try it out! 8-)

PS. For those complaining about their hosts: there is a big possibility that PHP5 is already supported, but the default version is 4 (for compatibility). If you are using Apache, you should try creating .htaccess file with following content:

Code: Select all

AddHandler application/x-httpd-php5 php

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 5:19 pm
by MacFrog
I know with my host (a small orange) we have to add the following in a .htaccess file for php5 support:

Code: Select all

AddType application/x-httpd-php5 .php

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 7:38 pm
by gfc
AWSOME!

:o

Just one question: De-installation is not possible, is it? guess that it would be to hard to backcode the diffs.. :|

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Mon Aug 27, 2007 8:30 pm
by Dabroz
playerfr wrote: And for other mod's you have to add them to the script or we can do it by ourself ?
The idea is that every support site has it's own repository, and mods should be submitted to those repositories (being checked by forum staff). But - for testing purposes - there will be a possibility to direct upload a mod to install (in next release).
gfc wrote:De-installation is not possible, is it? guess that it would be to hard to backcode the diffs..
In future release the remove option will be added. One possibility to remove a MOD is that MOD author has prepared update pack by himself - in this case everything is simple. But if it's not applicable, internal remove system will be used. There will be a list of modifications made to each file and using it, the MOD will be removed. But it's a complex process, because if any other MOD has modified same files, they will have to be removed in reverse order, then all MODs but the one we are removing should be installed again. I see no other possibility, because diff doesn't handle in-line edits. It could also produce un-MODX file (changing all ADDS into REMOVES, for example), but it would be complex task to do, and I'm afraid that it could fail anyway.

Re: [BETA] phPKG - auto-installer, repositories, packages

Posted: Tue Aug 28, 2007 12:18 pm
by Matoking
Looks SWEET! When you get this MOD to RC version or something, I could start translating this (to Finnish). Still, I'm not going to install this, because this is BETA.