Adding WebFTP

From PMWH2 - PHPMyWebHosting's official wiki
Jump to: navigation, search

The following steps should be taken to add webftp support:

Add menu entry:

  INSERT INTO `menu` VALUES ('_WEBFTP', 'act=ftp&what=webftp', 0, 45, 20, 'N');

Add the translations:

  INSERT INTO `translations` ( `language` , `constant` , `translation` ) VALUES ('english', '_WEBFTP', 'WebFTP' );
  INSERT INTO `translations` ( `language` , `constant` , `translation` ) VALUES ('english', 'WEBFTP_TITLE', 'WebFTP path');
  INSERT INTO `translations` ( `language` , `constant` , `translation` ) VALUES ('english', 'WEBFTP_DESCRIPTION', 'Path to the WebFTP installation.');

Add the link to configure the path to your webftp installation:

  INSERT INTO `configuration` VALUES (46, 'WEBFTPLINK', '../../asPhpFtp/asPhpFtp.php', 1, 11, 'pmwh_cfg_text_field(');

Download the file webftp_module.tar.gz.

Untar it and copy the directory asPhpFtp to some place that is web-accessible. I changed some things in it, like theme and the way it gets the usernames (by using a php session variable). It loads in an iframe so that it looks integrated in pmwh. You can easily use other PHP FTP packages like this one.

Add the following files to your pmwh2 installation:
- webftp.php in includes/modules/ftp/
- webftp.tpl in templates/pmwh2/modules/ftp/

You don't necessarily have to use asPhpFtp, you can also install some other php FTP package.