dsboyce8624
07-01-2005, 12:36 AM
Okay, with newer version we are not allowed to use DEFAULT '0' like we were and this is causing problems in some older, but still popular hacks. Shoutbox, and Member Album to name a couple.
If we are will to to make the corrections we need to know what changes to make.
In Shoutbox there is this code:
$query['new'][] = 'CREATE TABLE '.TABLE_PREFIX.'shoutbox_posts (
`shoutid` BIGINT (255) UNSIGNED DEFAULT \'0\' AUTO_INCREMENT,
`text` TEXT,
`userid` BIGINT (255) UNSIGNED DEFAULT \'0\',
`username` VARCHAR (255) DEFAULT \'0\',
`ip` VARCHAR (25) DEFAULT \'0\',
`time` BIGINT (20) UNSIGNED DEFAULT \'0\',
`edittime` BIGINT (20) UNSIGNED DEFAULT \'0\',
`edituser` VARCHAR (255) DEFAULT \'0\',
`deleted` TINYINT(1) UNSIGNED DEFAULT \'0\',
PRIMARY KEY(`shoutid`))';
$query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'usergroup
ADD `shoutboxpermissions` INT(10) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD `shouthierarchy` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD `shoutmaxdaily` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL';
$query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'user
ADD `shouts` BIGINT(10) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD`shoutbanned` TINYINT(1) UNSIGNED DEFAULT \'0\' NOT NULL';
And I know it breaks there, because mine broke there.
There doesn't seem to be any support for this, at least not enough to make it worth mentioning. So, can somebody tell me how to modify these queries so they work?
Thanks a bunch.
If we are will to to make the corrections we need to know what changes to make.
In Shoutbox there is this code:
$query['new'][] = 'CREATE TABLE '.TABLE_PREFIX.'shoutbox_posts (
`shoutid` BIGINT (255) UNSIGNED DEFAULT \'0\' AUTO_INCREMENT,
`text` TEXT,
`userid` BIGINT (255) UNSIGNED DEFAULT \'0\',
`username` VARCHAR (255) DEFAULT \'0\',
`ip` VARCHAR (25) DEFAULT \'0\',
`time` BIGINT (20) UNSIGNED DEFAULT \'0\',
`edittime` BIGINT (20) UNSIGNED DEFAULT \'0\',
`edituser` VARCHAR (255) DEFAULT \'0\',
`deleted` TINYINT(1) UNSIGNED DEFAULT \'0\',
PRIMARY KEY(`shoutid`))';
$query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'usergroup
ADD `shoutboxpermissions` INT(10) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD `shouthierarchy` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD `shoutmaxdaily` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL';
$query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'user
ADD `shouts` BIGINT(10) UNSIGNED DEFAULT \'0\' NOT NULL,
ADD`shoutbanned` TINYINT(1) UNSIGNED DEFAULT \'0\' NOT NULL';
And I know it breaks there, because mine broke there.
There doesn't seem to be any support for this, at least not enough to make it worth mentioning. So, can somebody tell me how to modify these queries so they work?
Thanks a bunch.