Report#80:Add a custom block, managed in the ACP

This commit is contained in:
Kevin
2008-03-21 17:03:32 +00:00
parent b94f27aad8
commit 4ec3584b4c
22 changed files with 255 additions and 89 deletions

View File

@@ -464,6 +464,17 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
'module_auth' => ''
);
$modules->update_module_data($minicalendar);
$customblock = array(
'module_basename' => 'portal',
'module_enabled' => 1,
'module_display' => 1,
'parent_id' => $portal['module_id'],
'module_class' => 'acp',
'module_langname' => 'ACP_PORTAL_CUSTOM_INFO',
'module_mode' => 'customblock',
'module_auth' => ''
);
$modules->update_module_data($customblock);
// clear cache and log what we did
$cache->purge();
add_log('admin', $page_title . ' installed');
@@ -603,7 +614,8 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
OR module_langname = 'ACP_PORTAL_POLLS_INFO'
OR module_langname = 'ACP_PORTAL_BOTS_INFO'
OR module_langname = 'ACP_PORTAL_MOST_POSTER_INFO'
OR module_langname = 'ACP_PORTAL_MINICALENDAR_INFO'";
OR module_langname = 'ACP_PORTAL_MINICALENDAR_INFO'
OR module_langname = 'ACP_PORTAL_CUSTOM_INFO'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
@@ -800,6 +812,17 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
'module_auth' => ''
);
$modules->update_module_data($minicalendar);
$customblock = array(
'module_basename' => 'portal',
'module_enabled' => 1,
'module_display' => 1,
'parent_id' => $portal['module_id'],
'module_class' => 'acp',
'module_langname' => 'ACP_PORTAL_CUSTOM_INFO',
'module_mode' => 'customblock',
'module_auth' => ''
);
$modules->update_module_data($customblock);
// clear cache and log what we did
$cache->purge();
@@ -903,7 +926,8 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
OR module_langname = 'ACP_PORTAL_POLLS_INFO'
OR module_langname = 'ACP_PORTAL_BOTS_INFO'
OR module_langname = 'ACP_PORTAL_MOST_POSTER_INFO'
OR module_langname = 'ACP_PORTAL_MINICALENDAR_INFO'";
OR module_langname = 'ACP_PORTAL_MINICALENDAR_INFO'
OR module_langname = 'ACP_PORTAL_CUSTOM_INFO'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{

View File

@@ -72,6 +72,14 @@ INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_atta
# Version 0.2.3 #
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_permissions', '1');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_permissions', '1');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center', '0');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small', '0');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_code_center', '');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_code_small', '');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_bbcode', '0');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_bbcode', '0');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_headline', 'Headline center box');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_headline', 'Headline small box');
# POSTGRES COMMIT #

View File

@@ -14,6 +14,14 @@ $sql_update['0.2.2'] = array(
$sql_update['0.2.3'] = array(
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_permissions', '1')",
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_permissions', '1')",
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center', '0')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small', '0')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_code_center', '')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_code_small', '')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_bbcode', '0')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_bbcode', '0')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_headline', 'Headline center box')";
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_headline', 'Headline small box')";
);
?>