Exporting a Product 
When your product is complete (and fully tested of course!) the final step is to export it into a format that is easily usable by people who may want to install your product for themselves.

The vBulletin product manager includes a facility to do just this. Almost all the items you have added to your product can be exported in a single XML file. The following items are included in the exported product XML file:To export a product, simply select the Export option from the product's popup menu.

Export product

This will pop up a dialog asking if you would like to save an XML file. Click the [Save] button and save the XML file to a safe place on your computer's hard drive.

Save XML

The resulting XML file can then be packaged up with any bitfield or cpnav XML files, additional PHP, Javascript and CSS scripts and zipped for distribution.

Product Zip

The following is an example of an exported product XML file containing a plugin, two templates and six phrases:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="myproduct" active="1">
    <title>My Product</title>
    <description>A test product</description>
    <version>1.0</version>
    <codes>
        <code version="1.0">
            <installcode><![CDATA[$db->query("
  CREATE TABLE " . TABLE_PREFIX . "profilelog (
  userid INT UNSIGNED NOT NULL,
  dateline INT NOT NULL,
  INDEX (userid)
  )
");]]></installcode>
            <uninstallcode><![CDATA[$db->query("
            DROP TABLE " . TABLE_PREFIX . "profilelog
            ");]]></uninstallcode>
        </code>
        <code version="2.0">
            <installcode><![CDATA[$db->query("
  ALTER TABLE " . TABLE_PREFIX . "profilelog
  CHANGE dateline dateline INT UNSIGNED NOT NULL
");]]></installcode>
            <uninstallcode>//moo</uninstallcode>
        </code>
    </codes>
    <templates>
        <template name="profile_log"
            templatetype="template" date="1127469263" username="Administrator"
            version="3.5.0"><![CDATA[<div>
<div style="margin-bottom:10px">Most recent profile updates:</div>
$profile_logbits
</div>]]></template>
        <template name="profile_logbit"
        templatetype="template" date="1127472467" username="Administrator"
        version="3.5.0"><![CDATA[<div>
$log[username] @ $log[date] <span class="time">$log[date]</span>
</div>]]></template>
    </templates>
    <plugins>
        <plugin active="1">
            <title>Profile Update Logger</title>
            <hookname>profile_updateprofile</hookname>
            <phpcode><![CDATA[$tmp_uid =& $vbulletin->userinfo['userid'];

$db->query_write("
  INSERT INTO " . TABLE_PREFIX . "profilelog
  (userid, dateline)
  VALUES
  ($tmp_uid, " . TIMENOW . ")
");]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
        <phrasetype name="Permissions" fieldname="cppermission">
            <phrase name="can_bar"><![CDATA[Can Bar]]></phrase>
            <phrase name="can_foo"><![CDATA[Can Foo]]></phrase>
            <phrase name="myproduct_permissions"><![CDATA[My Product Permissions]]></phrase>
        </phrasetype>
        <phrasetype name="Control Panel Home Pages" fieldname="cphome">
            <phrase name="add_new_item"><![CDATA[Add New Item]]></phrase>
            <phrase name="my_product"><![CDATA[My Product]]></phrase>
            <phrase name="my_product_manager"><![CDATA[My Product Manager]]></phrase>
        </phrasetype>
    </phrases>
    <options>
    </options>
</product>
Copyright © 2024 MH Sub I, LLC dba vBulletin. All rights reserved. vBulletin® is a registered trademark of MH Sub I, LLC dba vBulletin.