Added script for converting Board3 Portal 1.0.6
Fixed a few small issues when installing Board3 Portal 2.0.0 on a vanilla board
This commit is contained in:
@@ -115,6 +115,7 @@ Weitere Sprachen kannst in unserem Internationalen Forum finden: http://www.boar
|
||||
<action-group>
|
||||
<copy>
|
||||
<file from="root/portal.php" to="portal.php" />
|
||||
<file from="root/adm/images/*.*" to="adm/images/*.*" />
|
||||
<file from="root/adm/mods/board3_portal_check_version.php" to="adm/mods/board3_portal_check_version.php" />
|
||||
<file from="root/adm/style/*.*" to="adm/style/*.*" />
|
||||
<file from="root/includes/acp/acp_portal.php" to="includes/acp/acp_portal.php" />
|
||||
|
||||
@@ -24,11 +24,35 @@ if (!file_exists($phpbb_root_path . 'umil/umil_auto.' . $phpEx))
|
||||
{
|
||||
trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR);
|
||||
}
|
||||
if(!function_exists('board3_basic_install'))
|
||||
if (!function_exists('board3_basic_install'))
|
||||
{
|
||||
include($phpbb_root_path . 'portal/includes/functions.' . $phpEx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if we need to convert from Board3 Portal 1.0.6
|
||||
*/
|
||||
global $config;
|
||||
|
||||
if (!defined('PORTAL_CONFIG_TABLE'))
|
||||
{
|
||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||
}
|
||||
|
||||
if (sql_table_exists(PORTAL_CONFIG_TABLE) && !isset($config['board3_portal_version']))
|
||||
{
|
||||
$portal_config = obtain_portal_config();
|
||||
|
||||
/**
|
||||
* We only allow conversions from Board3 Portal 1.0.6
|
||||
*/
|
||||
if (isset($portal_config['portal_version']) && $portal_config['portal_version'] == '1.0.6')
|
||||
{
|
||||
set_config('board3_portal_version', '1.0.6');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The name of the mod to be displayed during installation.
|
||||
$mod_name = 'Board3 Portal';
|
||||
|
||||
@@ -60,15 +84,180 @@ $language_file = 'mods/info_acp_portal';
|
||||
* The version numbering must otherwise be compatible with the version_compare function - http://php.net/manual/en/function.version-compare.php
|
||||
*/
|
||||
$versions = array(
|
||||
'2.0.0-dev2' => array(
|
||||
|
||||
'1.0.6' => array(
|
||||
'permission_add' => array(
|
||||
array('a_manage_portal', 1),
|
||||
array('u_view_portal', 1),
|
||||
array('a_portal_manage', 1),
|
||||
),
|
||||
|
||||
'permission_set' => array(
|
||||
array('ADMINISTRATORS', 'a_manage_portal', 'group'),
|
||||
),
|
||||
|
||||
'table_add' => array(
|
||||
array('phpbb_portal_config', array(
|
||||
'COLUMNS' => array(
|
||||
'config_name' => array('VCHAR:255', ''),
|
||||
'config_value'=> array('MTEXT', ''),
|
||||
),
|
||||
|
||||
'PRIMARY_KEY' => 'config_name',
|
||||
)),
|
||||
|
||||
),
|
||||
|
||||
'module_add' => array(
|
||||
array('acp', 'ACP_CAT_DOT_MODS', 'ACP_PORTAL_INFO'),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_GENERAL_INFO',
|
||||
'module_mode' => 'config',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_NEWS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_ANNOUNCEMENTS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_WELCOME_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_RECENT_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_WORDGRAPH_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_PAYPAL_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_ATTACHMENTS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_MEMBERS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_POLLS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_BOTS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_POSTER_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_MINICALENDAR_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_CUSTOMBLOCK_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_LINKS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_FRIENDS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
|
||||
array('acp', 'ACP_PORTAL_INFO', array(
|
||||
'module_basename' => 'portal',
|
||||
'module_langname' => 'ACP_PORTAL_BIRTHDAYS_INFO',
|
||||
'module_mode' => 'modules',
|
||||
'module_auth' => 'acl_a_manage_portal',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
'2.0.0-a1' => array(
|
||||
'permission_remove' => array(
|
||||
'a_portal_manage',
|
||||
),
|
||||
|
||||
'permission_add' => array(
|
||||
array('u_view_portal', 1),
|
||||
array('a_manage_portal', 1),
|
||||
),
|
||||
|
||||
'permission_set' => array(
|
||||
array('GUESTS', 'u_view_portal', 'group'),
|
||||
array('REGISTERED_COPPA', 'u_view_portal', 'group'),
|
||||
array('GLOBAL_MODERATORS', 'u_view_portal', 'group'),
|
||||
@@ -93,15 +282,6 @@ $versions = array(
|
||||
|
||||
'PRIMARY_KEY' => 'module_id',
|
||||
)),
|
||||
array('phpbb_portal_config', array(
|
||||
'COLUMNS' => array(
|
||||
'config_name' => array('VCHAR:255', ''),
|
||||
'config_value'=> array('MTEXT', ''),
|
||||
),
|
||||
|
||||
'PRIMARY_KEY' => 'config_name',
|
||||
)),
|
||||
|
||||
),
|
||||
|
||||
'config_add' => array(
|
||||
@@ -116,6 +296,26 @@ $versions = array(
|
||||
array('board3_display_jumpbox', 1, 0),
|
||||
),
|
||||
|
||||
'module_remove' => array(
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_GENERAL_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_NEWS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_ANNOUNCEMENTS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_WELCOME_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_RECENT_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_WORDGRAPH_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_PAYPAL_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_ATTACHMENTS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_MEMBERS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_POLLS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_BOTS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_POSTER_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_MINICALENDAR_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_CUSTOMBLOCK_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_LINKS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_FRIENDS_INFO'),
|
||||
array('acp', 'ACP_PORTAL_INFO', 'ACP_PORTAL_BIRTHDAYS_INFO'),
|
||||
),
|
||||
|
||||
'module_add' => array(
|
||||
array('acp', 'ACP_CAT_DOT_MODS', 'ACP_PORTAL'),
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ $lang = array_merge($lang, array(
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Füge Basismodule hinzu',
|
||||
'PORTAL_BASIC_UNINSTALL' => 'Entferne Module von Datenbank',
|
||||
'PORTAL_CONVERT_SUCCESS' => 'Konvertiere von Board3 Portal 1.0.6 & füge Basismodule hinzu',
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_CONFIG' => '<strong>Portal-Einstellungen geändert</strong><br />» %s',
|
||||
|
||||
@@ -111,6 +111,7 @@ $lang = array_merge($lang, array(
|
||||
// Install
|
||||
'PORTAL_BASIC_INSTALL' => 'Adding basic set of modules',
|
||||
'PORTAL_BASIC_UNINSTALL' => 'Removing modules from database',
|
||||
'PORTAL_CONVERT_SUCCESS' => 'Converting from Board3 Portal 1.0.6 & adding basic set of modules',
|
||||
|
||||
// Logs
|
||||
'LOG_PORTAL_CONFIG' => '<strong>Altered Portal settings</strong><br />» %s',
|
||||
|
||||
@@ -853,14 +853,14 @@ function get_portal_tracking_info($fetch_news)
|
||||
*/
|
||||
function board3_basic_install($mode = 'install', $purge_modules = true, $u_action = '')
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix;
|
||||
global $db, $phpbb_root_path, $phpEx, $cache, $user, $table_prefix, $config;
|
||||
|
||||
if(!defined('PORTAL_MODULES_TABLE'))
|
||||
{
|
||||
include($phpbb_root_path . 'portal/includes/constants.' . $phpEx);
|
||||
}
|
||||
|
||||
if($mode == 'install')
|
||||
if($mode == 'install' || $mode == 'update')
|
||||
{
|
||||
$directory = $phpbb_root_path . 'portal/modules/';
|
||||
|
||||
@@ -935,7 +935,129 @@ function board3_basic_install($mode = 'install', $purge_modules = true, $u_actio
|
||||
$c_class->install($db->sql_nextid());
|
||||
}
|
||||
|
||||
return $user->lang['PORTAL_BASIC_INSTALL'];
|
||||
if($mode == 'update')
|
||||
{
|
||||
/**
|
||||
* Check if we need to convert from Board3 Portal 1.0.6
|
||||
*/
|
||||
global $config;
|
||||
|
||||
if ($config['board3_portal_version'] == '1.0.6')
|
||||
{
|
||||
$convert = true;
|
||||
$portal_config = obtain_portal_config();
|
||||
}
|
||||
else
|
||||
{
|
||||
$convert = false;
|
||||
}
|
||||
|
||||
if($convert)
|
||||
{
|
||||
$portal_modules = obtain_portal_modules();
|
||||
|
||||
foreach($portal_modules as $row)
|
||||
{
|
||||
switch($row['module_classname'])
|
||||
{
|
||||
case 'announcements':
|
||||
set_config('board3_announcements_style_' . $row['module_id'], $portal_config['portal_announcements_style']);
|
||||
set_config('board3_number_of_announcements_' . $row['module_id'], $portal_config['portal_number_of_announcements']);
|
||||
set_config('board3_announcements_day_' . $row['module_id'], $portal_config['portal_announcements_day']);
|
||||
set_config('board3_announcements_length_' . $row['module_id'], $portal_config['portal_announcements_length']);
|
||||
set_config('board3_global_announcements_forum_' . $row['module_id'], $portal_config['portal_global_announcements_forum']);
|
||||
set_config('board3_announcements_forum_exclude_' . $row['module_id'], $portal_config['portal_announcements_forum_exclude']);
|
||||
set_config('board3_announcements_archive_' . $row['module_id'], $portal_config['portal_announcements_archive']);
|
||||
set_config('board3_announcements_permissions_' . $row['module_id'], $portal_config['portal_announcements_permissions']);
|
||||
set_config('board3_show_announcements_replies_views_' . $row['module_id'], $portal_config['portal_show_announcements_replies_views']);
|
||||
break;
|
||||
|
||||
case 'attachments':
|
||||
set_config('board3_attachments_number_' . $row['module_id'], $portal_config['portal_attachments_number']);
|
||||
set_config('board3_attach_max_length_' . $row['module_id'], $portal_config['portal_attach_max_length']);
|
||||
set_config('board3_attachments_forum_ids_' . $row['module_id'], $portal_config['portal_attachments_forum_ids']);
|
||||
set_config('board3_attachments_forum_exclude_' . $row['module_id'], $portal_config['portal_attachments_forum_exclude']);
|
||||
set_config('board3_attachments_filetype_' . $row['module_id'], $portal_config['portal_attachments_filetype']);
|
||||
set_config('board3_attachments_exclude_' . $row['module_id'], $portal_config['portal_attachments_exclude']);
|
||||
break;
|
||||
|
||||
case 'birthday_list':
|
||||
set_config('board3_birthdays_ahead_' . $row['module_id'], 'portal_birthdays_ahead');
|
||||
break;
|
||||
|
||||
case 'calendar':
|
||||
set_config('board3_sunday_first_' . $row['module_id'], $portal_config['portal_sunday_first']);
|
||||
set_config('board3_calendar_today_color_' . $row['module_id'], $portal_config['portal_minicalendar_today_color']);
|
||||
set_config('board3_calendar_sunday_color_' . $row['module_id'], $portal_config['portal_minicalendar_sunday_color']);
|
||||
set_config('board3_long_month_' . $row['module_id'], $portal_config['portal_long_month']);
|
||||
break;
|
||||
|
||||
case 'donation':
|
||||
set_config('board3_pay_acc_' . $row['module_id'], $portal_config['portal_pay_acc']);
|
||||
break;
|
||||
|
||||
case 'friends':
|
||||
set_config('board3_max_online_friends_' . $row['module_id'], $portal_config['portal_max_online_friends']);
|
||||
break;
|
||||
|
||||
case 'latest_bots':
|
||||
set_config('board3_last_visited_bots_number_' . $row['module_id'], $portal_config['portal_last_visited_bots_number']);
|
||||
break;
|
||||
|
||||
case 'latest_members':
|
||||
set_config('board3_max_last_member_' . $row['module_id'], $portal_config['portal_max_last_member']);
|
||||
break;
|
||||
|
||||
case 'leaders':
|
||||
set_config('board3_leaders_ext_' . $row['module_id'], $portal_config['portal_leaders_ext']);
|
||||
break;
|
||||
|
||||
case 'news':
|
||||
set_config('board3_news_length_' . $row['module_id'], $portal_config['portal_news_length']);
|
||||
set_config('board3_news_forum_' . $row['module_id'], $portal_config['portal_news_forum']);
|
||||
set_config('board3_news_permissions_' . $row['module_id'], $portal_config['portal_news_permissions']);
|
||||
set_config('board3_number_of_news_' . $row['module_id'], $portal_config['portal_number_of_news']);
|
||||
set_config('board3_show_all_news_' . $row['module_id'], $portal_config['portal_show_all_news']);
|
||||
set_config('board3_news_exclude_' . $row['module_id'], $portal_config['portal_news_exclude']);
|
||||
set_config('board3_news_archive_' . $row['module_id'], $portal_config['portal_news_archive']);
|
||||
set_config('board3_news_show_last_' . $row['module_id'], $portal_config['portal_news_show_last']);
|
||||
set_config('board3_show_news_replies_views_' . $row['module_id'], $portal_config['portal_show_news_replies_views']);
|
||||
set_config('board3_news_style_' . $row['module_id'], $portal_config['portal_news_style']);
|
||||
break;
|
||||
|
||||
case 'poll':
|
||||
set_config('board3_poll_allow_vote_' . $row['module_id'], $portal_config['portal_poll_allow_vote']);
|
||||
set_config('board3_poll_topic_id_' . $row['module_id'], $portal_config['portal_poll_topic_id']);
|
||||
set_config('board3_poll_exclude_id_' . $row['module_id'], $portal_config['portal_poll_exclude_id']);
|
||||
set_config('board3_poll_hide_' . $row['module_id'], $portal_config['portal_poll_hide']);
|
||||
set_config('board3_poll_limit_' . $row['module_id'], $portal_config['portal_poll_limit']);
|
||||
break;
|
||||
|
||||
case 'recent':
|
||||
set_config('board3_max_topics_' . $row['module_id'], $portal_config['portal_max_topics']);
|
||||
set_config('board3_recent_title_limit_' . $row['module_id'], $portal_config['portal_recent_title_limit']);
|
||||
set_config('board3_recent_forum_' . $row['module_id'], $portal_config['portal_recent_forum']);
|
||||
break;
|
||||
|
||||
case 'topposters':
|
||||
set_config('board3_topposters_' . $row['module_id'], $portal_config['portal_max_most_poster']);
|
||||
break;
|
||||
|
||||
case 'welcome':
|
||||
set_portal_config('board3_welcome_message_' . $row['module_id'], $portal_config['portal_welcome_intro']);
|
||||
break;
|
||||
|
||||
default:
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
return $user->lang['PORTAL_CONVERT_SUCCESS'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return $user->lang['PORTAL_BASIC_INSTALL'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BIN
root/styles/prosilver/theme/images/portal/arrowbullet.gif
Normal file
BIN
root/styles/prosilver/theme/images/portal/arrowbullet.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 B |
@@ -35,7 +35,7 @@ padding-bottom: 2px; /*bottom spacing between menu items*/
|
||||
}
|
||||
|
||||
.portal-navigation ul li a{
|
||||
background-image: url("images/portal/arrowbullet.gif");
|
||||
background-image: url("{T_THEME_PATH}/images/portal/arrowbullet.gif");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center left; /*custom bullet list image*/
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user