Changeset View
Changeset View
Standalone View
Standalone View
modules/in-bulletin/install.php
Show All 33 Lines | |||||
// install, using installation wizard | // install, using installation wizard | ||||
$toolkit =& $this->toolkit; | $toolkit =& $this->toolkit; | ||||
/* @var $toolkit kInstallToolkit */ | /* @var $toolkit kInstallToolkit */ | ||||
} | } | ||||
$application =& kApplication::Instance(); | $application =& kApplication::Instance(); | ||||
$application->Init(); | $application->Init(); | ||||
if ( $application->RecallVar('user_id') != USER_ROOT ) { | if ( !$application->permissionCheckingDisabled() ) { | ||||
die('restricted access!'); | die('restricted access!'); | ||||
} | } | ||||
$category =& $toolkit->createModuleCategory('Forums', 'Discussion Forums', '#in-bulletin/section_design#', 'in-bulletin/img/menu_topics.gif'); | $category =& $toolkit->createModuleCategory('Forums', 'Discussion Forums', '#in-bulletin/section_design#', 'in-bulletin/img/menu_topics.gif'); | ||||
$toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); | $toolkit->RunSQL('/' . $module_folder . '/install/install_schema.sql'); | ||||
$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{TopicCatId}', $category->GetID()); | $toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql', '{TopicCatId}', $category->GetID()); | ||||
$toolkit->ImportLanguage('/' . $module_folder . '/install/english'); | $toolkit->ImportLanguage('/' . $module_folder . '/install/english'); | ||||
$toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); | $toolkit->SetModuleRootCategory(basename($module_folder), $category->GetID()); | ||||
//$toolkit->linkCustomFields(basename($module_folder), 'bb', 3); // to create Custom Fields for Topics | //$toolkit->linkCustomFields(basename($module_folder), 'bb', 3); // to create Custom Fields for Topics | ||||
$toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field | $toolkit->linkCustomFields('KERNEL', 'c', 1); // to create ItemTemplate custom field | ||||
$toolkit->setModuleItemTemplate($category, 'bb', '#in-bulletin/item_design#'); | $toolkit->setModuleItemTemplate($category, 'bb', '#in-bulletin/item_design#'); | ||||
$toolkit->finalizeModuleInstall($module_folder, true); | $toolkit->finalizeModuleInstall($module_folder, true); |