Congratulations! You now have developed a module and a plug-in for phpFox2. Now its time to export your product so it can be released to others. In order to do this you will need to log into your AdminCP and navigate to:
Extension >> Product >> Import/Export Products
From the Product drop down select:
phpFox Sample Product
and click on the Download button.
You should then be prompted to download an XML file. The contents of that file should be similar to this:
<product> <data> <product_id>superpoke</product_id> <is_core>0</is_core> <title>Superpoke</title> <description>Superpoke plug-in for phpFox v2</description> <version>0.3</version> <is_active>1</is_active> <url>http://www.phpfox.com/</url> <url_version_check></url_version_check> </data> <installs> <install> <version>0.2</version> <install_code><![CDATA[$this->database()->query("CREATE TABLE IF NOT EXISTS `" . Phpfox::getT('superpoke') . "` ( `poke_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `type_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `user_id` int(10) UNSIGNED NOT NULL, `profile_id` int(10) UNSIGNED NOT NULL, `time_stamp` int(10) UNSIGNED NOT NULL, PRIMARY KEY (`poke_id`), KEY `user_id` (`user_id`,`profile_id`), KEY `user_id_2` (`user_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1"); $this->database()->query("CREATE TABLE IF NOT EXISTS `" . Phpfox::getT('superpoke_type') . "` ( `type_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `name_post` varchar(50) NOT NULL, `total_usage` int(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`type_id`) ) ENGINE=MyISAM AUTO_INCREMENT=1;");]]></install_code> <uninstall_code></uninstall_code> </install> </installs> <modules> <module_id>superpoke</module_id> </modules> </product>
This XML file holds all the information phpFox2 needs to install your product on another site. Since we developed a module we will need to include the module folder in the package and this can't be done via the AdminCP for security reasons so you will need to simply navigate to the folder:
/module/
look for your module folder, which in this case is phpfoxsample. ZIP the folder and the recently downloaded XML file into one ZIP package and your product is ready to be released to the world.
The goal when creating products for phpFox2 is to be able to create robust features without the need to modify core or 3rd party source files. This will allow clients that use our core product and an easier time to upgrade to newer phpFox versions in the future.
If you plan on releasing your product(s) to others and want them to know when a new version of your product is completed you can connect it to a public server and check what is the latest version available. When you first created your product you were able to define where we should check for your products version number. In our example here we used
http://www.phpfox.com/version.php
In order for us to correctly parse and identify your current version of your live product you must using the following XML code:
<phpfox> <product_version>1.0.1</product_version> </phpfox>