Many thanks, after adding "global $foruminfo;", it is working.
But now I've another problem. I've added a custom field to the 'forum' table. I did this directly in phpMyAdmin, because I could not make the following installcode work:
Code:
require_once(DIR . '/includes/class_dbalter.php');
$db_alter = new vB_Database_Alter_MySQL($db);
if($db_alter->fetch_table_info('forum')) {
$db_alter->add_field(
array(
'name' => 'ivw_code',
'type' => 'varchar',
'length' => '25',
'attributes' => '',
'null' => true,
'default' => '',
'extra' => ''
)
);
}
unset($db_alter);
Anyway, now the SQL field is existing in the table 'forum', but in my hook, $foruminfo does not include this field: $foruminfo['ivw_code'] is not set, although the database contains data for this forum in this column. What am I doing wrong?