PDA

View Full Version : Add new/custom vb tables


ptmuldoon
11-03-2008, 05:00 PM
I'm learning/experimenting at creating a new mod for vb, and have a little bit of php experience, and just learned how to add new menu items to admin_cp.

But now I want to learn how to add/create new tables to include my vbulletin database. I looked through the installation directory, and have seen the below being used to create the initial tables


$schema['CREATE']['query']['mycustomtable'] = "
CREATE TABLE " . TABLE_PREFIX . "mycustomtable (
column_1 INT UNSIGNED NOT NULL DEFAULT '0',
column_2 SMALLINT UNSIGNED NOT NULL DEFAULT '0',
columns_3 SMALLINT UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY column_1 (column_1, column_2)
)
";

I've also been searching and learning about vb database class used to run various queries. Can anyone point me towards a simple howto or sample mod install script to add additional tables to your vb install?

Lynne
11-03-2008, 05:21 PM
You may want to read this article - [How-To] Product Managament (vBulletin 3.5 RC 1 and up) (https://vborg.vbsupport.ru/showthread.php?t=92953&highlight=product%2A)

ptmuldoon
11-04-2008, 11:27 AM
Thanks. I'll start trying to read and understand how to create a basic product.

I'm hoping to create somekind of multiple user registration hack that will enter a new registered user into multiple databases/tables.

For now, it would only be inserting the user into the database/tables you tell it to. Any type of single login would have to done separately, likely by passing the vbulletin user variables to other applications.