PDA

View Full Version : Creating a Product - process ?


saajjj
01-19-2010, 08:46 PM
Hello,
I want to release a product which adds a custom vB powered page to the navbar. I can't seem to figure out how some parts of the XML file are made.

The following is what I've got right now and needs to go into the product:

1x Query to create a table in the database
1x Template (to display the custom page)
1x Plugin (adds a button to the navbar)
3x PHP files (1 main file, 2 helper files)

What I've done till now:

Make product using: Plugin & Products > Manage Products > [Add/Import Product]
Put plugin inside product using: Plugin & Products > Plug-in Manager > [Edit] plugin > select Product in drop down box
Insert the database query for creating the table used by the product using: Plugin & Products > Manage Products > Edit product > Add New Install/Uninstall Code.

I can't figure out, where to:

Make the template a part of the product. I can see no setting which allow me to attach a template to any product.
Insert the 3 PHP files in the XML so that two go to the 'includes' directory and one goes into the root. Is this possible at all or will I have to add the PHP files and XML files to a zip and distribute that?

The standard response to a query such as mine has been to 'look at the XML of other products which are doing something similar'. Although I appreciate 'standing on the shoulders of giants' I would really like to know where those guys learnt this (I'm assuming this process is documented somewhere). I can't seem to find anything in the documentation. The current documentation is for vB3.x and the bit about adding a template to the product doesn't seem to be there at all.

Any help appreciated.

Vaupell
01-20-2010, 11:28 AM
Well you need to setup a "developer" board, basicly a vbulletin running in debug mode.

and then you start by creating the product.
then each item you add, much have the new product selected.

and new templates should be created in "master" template, not default.

Then in the product menu when using export it will include
phrases, plugins, templates, etc etc.

Php files, you just add manually along with the product xml
manually uploaded dureing installation.

---

Creating a product for vb4 is still excaktly like vb3
and the vb3 documentation on vb.com is sufficient for creating, import/export
only the codeing part thats not the same.

http://www.vbulletin.com/docs/html/creating_a_product

---

So you now need to create a board running in debug,
i run one on my computer, locally using XAMPP server(google it),
installed vb on it, set it in config to run debug then you will notice
you have alot more options availible for exspecially deveping products,
adding options, etc..

remember new templates in masterstyle not default, if they are in default
they wont be included in the export.

saajjj
01-20-2010, 11:43 AM
Hi Vaupell,
Thanks for your reply, enabling debug mode was the key.

Cheers,

Vaupell
01-20-2010, 11:56 AM
Hi Vaupell,
Thanks for your reply, enabling debug mode was the key.

Cheers,

btw, you dont want to enable debug mode on a live board.. :D

saajjj
01-20-2010, 12:21 PM
Noted and thanks, I've been working on my laptop.

BBR-APBT
01-20-2010, 07:40 PM
Well you can enable debug on a live site, But it is best to do it the following way.


if ($_SERVER['REMOTE_ADDR'] == 'xx.xxx.xx.xxx') {
$config['Misc']['debug'] = true;
} else {
$config['Misc']['debug'] = false;
}


Replace xx.xxx.xx.xxx with your ip address and the debug information will show only for you.

This will help to debug errors on your live site.

saajjj
01-20-2010, 07:51 PM
Thanks BBR_APBT. That looks useful.

--------------- Added 1264065850 at 1264065850 ---------------

Thanks again for all your help, I was able to export/install the product successfully :)