From c2834abfae4ac9bc02cb245d1bdb5bf78802ec26 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 6 Jun 2004 21:44:49 +0000 Subject: [PATCH] - added folder_moved image - new feature: bookmark topics - fixed post details link - added confirmation screen to cookie deletion git-svn-id: file:///svn/phpbb/trunk@4912 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/admin_board.php | 3 +- phpBB/common.php | 1 + phpBB/includes/functions.php | 2 +- phpBB/includes/mcp/mcp_main.php | 1 + phpBB/includes/session.php | 1 - phpBB/includes/template.php | 3 +- phpBB/includes/ucp/ucp_main.php | 161 ++++++++++++++++++ phpBB/includes/ucp/ucp_prefs.php | 1 + phpBB/install/schemas/mysql_schema.sql | 11 ++ phpBB/install/schemas/schema_data.sql | 5 +- phpBB/language/en/admin.php | 2 + phpBB/language/en/common.php | 1 + phpBB/language/en/ucp.php | 10 ++ phpBB/language/en/viewforum.php | 1 + phpBB/language/en/viewtopic.php | 4 + phpBB/posting.php | 8 +- .../subSilver/imageset/folder_moved.gif | Bin 0 -> 1131 bytes phpBB/styles/subSilver/imageset/imageset.cfg | 5 +- .../template/posting_progress_bar.html | 2 +- .../template/ucp_main_bookmarks.html | 49 ++++++ .../subSilver/template/viewforum_body.html | 3 + .../subSilver/template/viewtopic_body.html | 3 +- phpBB/ucp.php | 40 +++-- phpBB/viewforum.php | 3 +- phpBB/viewtopic.php | 147 +++++++++++----- 25 files changed, 394 insertions(+), 73 deletions(-) create mode 100644 phpBB/styles/subSilver/imageset/folder_moved.gif create mode 100644 phpBB/styles/subSilver/template/ucp_main_bookmarks.html diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php index 4ca7ac492d..c9b3257436 100644 --- a/phpBB/adm/admin_board.php +++ b/phpBB/adm/admin_board.php @@ -129,7 +129,8 @@ $display_vars = array( 'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'type' => 'radio:yes_no', 'explain' => false), 'allow_sig' => array('lang' => 'ALLOW_SIG', 'type' => 'radio:yes_no', 'explain' => false), 'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'type' => 'text:5:4', 'explain' => true), - 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true) + 'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'type' => 'radio:yes_no', 'explain' => true) ) ), 'message' => array( diff --git a/phpBB/common.php b/phpBB/common.php index 52638d2073..d1fb9ed49f 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -168,6 +168,7 @@ define('ACL_USERS_TABLE', $table_prefix.'auth_users'); define('ATTACHMENTS_TABLE', $table_prefix.'attachments'); define('BANLIST_TABLE', $table_prefix.'banlist'); define('BBCODES_TABLE', $table_prefix.'bbcodes'); +define('BOOKMARKS_TABLE', $table_prefix.'bookmarks'); define('BOTS_TABLE', $table_prefix.'bots'); define('CACHE_TABLE', $table_prefix.'cache'); define('CONFIG_TABLE', $table_prefix.'config'); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 19d72bf919..1f941d0baf 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -461,7 +461,7 @@ function tz_select($default = '') } // Topic and forum watching common code -function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id, $notify_status = 'unset') +function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id, $notify_status = 'unset', $start = 0) { global $template, $db, $user, $phpEx, $SID, $start, $phpbb_root_path; diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 44e1808f1c..f1f20a9006 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -990,6 +990,7 @@ class mcp_main extends mcp if ($this->confirm) { +// delete_topics('topic_id', $topic_id_list, true); return_link('RETURN_FORUM', "viewforum.$phpEx$SID&f={$this->forum_id}"); $template->assign_var('MESSAGE', (count($topic_id_list) == 1) ? $user->lang['TOPIC_DELETED_SUCCESS'] : $user->lang['TOPICS_DELETED_SUCCESS']); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index e035090ca6..9c086a639e 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -31,7 +31,6 @@ class session $this->page = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI']; // Generate Valid URL - // TODO: need another one with sid for normal redirects $this->cur_page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1.' . $phpEx . '?\2', str_replace('&', '&', htmlspecialchars($this->page))); $this->page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1\2', $this->page); diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 831f455f35..6c90b95b1b 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -223,7 +223,7 @@ class template // Try and open template for read if (!($fp = @fopen($this->files[$handle], 'r'))) { - trigger_error("template->_tpl_load(): File " . $this->files[$handle] . " does not exist or is empty", E_USER_ERROR); + trigger_error("template->_tpl_load_file(): File {$this->files[$handle]} does not exist or is empty", E_USER_ERROR); } $this->compiled_code[$handle] = $this->compile(trim(@fread($fp, filesize($this->files[$handle])))); @@ -346,7 +346,6 @@ class template { $this->compile_var_tags($text_blocks[$i]); } - $compile_blocks = array(); for ($curr_tb = 0; $curr_tb < count($text_blocks); $curr_tb++) diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 30a1a63ee0..cb0bd4f082 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -523,6 +523,167 @@ class ucp_main extends module break; + case 'bookmarks': + + if (!$config['allow_bookmarks']) + { + $template->assign_vars(array( + 'S_NO_DISPLAY_BOOKMARKS' => true) + ); + break; + } + + $move_up = request_var('move_up', 0); + $move_down = request_var('move_down', 0); + + $sql = 'SELECT MAX(order_id) as max_order_id FROM ' . BOOKMARKS_TABLE . ' + WHERE user_id = ' . $user->data['user_id']; + $result = $db->sql_query($sql); + $max_order_id = $db->sql_fetchfield('max_order_id', 0, $result); + $db->sql_freeresult($result); + + if ($move_up || $move_down) + { + if (($move_up && $move_up != 1) || ($move_down && $move_down != $max_order_id)) + { + $order = ($move_up) ? $move_up : $move_down; + $order_total = $order * 2 + (($move_up) ? -1 : 1); + + $sql = 'UPDATE ' . BOOKMARKS_TABLE . " + SET order_id = $order_total - order_id + WHERE order_id IN ($order, " . (($move_up) ? $order - 1 : $order + 1) . ') + AND user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + } + } + + if (isset($_POST['unbookmark'])) + { + $s_hidden_fields = ''; + $topics = (isset($_POST['t'])) ? array_map('intval', array_keys($_POST['t'])) : array(); + $url = "{$phpbb_root_path}ucp.$phpEx$SID&i=main&mode=bookmarks"; + + if (!sizeof($topics)) + { + trigger_error('NO_BOOKMARKS_SELECTED'); + } + + foreach ($topics as $topic_id) + { + $s_hidden_fields .= ''; + } + + if (confirm_box(true)) + { + $sql = 'DELETE FROM ' . BOOKMARKS_TABLE . ' + WHERE user_id = ' . $user->data['user_id'] . ' + AND topic_id IN (' . implode(', ', $topics) . ')'; + $db->sql_query($sql); + + // Re-Order bookmarks (possible with one query? This query massaker is not really acceptable...) + $sql = 'SELECT topic_id FROM ' . BOOKMARKS_TABLE . ' + WHERE user_id = ' . $user->data['user_id'] . ' + ORDER BY order_id ASC'; + $result = $db->sql_query($sql); + + $i = 1; + while ($row = $db->sql_fetchrow($result)) + { + $db->sql_query('UPDATE ' . BOOKMARKS_TABLE . " + SET order_id = $i + WHERE topic_id = {$row['topic_id']} + AND user_id = {$user->data['user_id']}"); + $i++; + } + $db->sql_freeresult($result); + + meta_refresh(3, $url); + $message = $user->lang['BOOKMARKS_REMOVED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + trigger_error($message); + } + else + { + confirm_box(false, 'REMOVE_SELECTED_BOOKMARKS', $s_hidden_fields); + } + } + + // We grab deleted topics here too... + // NOTE: At the moment bookmarks are not removed with topics, might be useful later (not really sure how though. :D) + // But since bookmarks are sensible to the user, they should not be deleted without notice. + $sql = 'SELECT b.order_id, b.topic_id as b_topic_id, t.*, f.forum_name + FROM ' . BOOKMARKS_TABLE . ' b + LEFT JOIN ' . TOPICS_TABLE . ' t ON b.topic_id = t.topic_id + LEFT JOIN ' . FORUMS_TABLE . ' f ON t.forum_id = f.forum_id + WHERE b.user_id = ' . $user->data['user_id'] . ' + ORDER BY b.order_id ASC'; + $result = $db->sql_query($sql); + + $i = 0; + while ($row = $db->sql_fetchrow($result)) + { + $forum_id = $row['forum_id']; + $topic_id = $row['b_topic_id']; + + $replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies']; + + $topic_type = ''; + switch ($row['topic_type']) + { + case POST_ANNOUNCE: + $topic_type = $user->lang['VIEW_TOPIC_ANNOUNCEMENT']; + $folder = 'folder_announce'; + break; + + case POST_STICKY: + $topic_type = $user->lang['VIEW_TOPIC_STICKY']; + $folder = 'folder_sticky'; + break; + + default: + if ($replies >= intval($config['hot_threshold'])) + { + $folder = 'folder_hot'; + } + else + { + $folder = 'folder'; + } + break; + } + + if ($row['topic_status'] == ITEM_LOCKED) + { + $topic_type = $user->lang['VIEW_TOPIC_LOCKED']; + $folder = 'folder_locked'; + } + + $folder_alt = ($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'TOPIC'; + $view_topic_url = "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id"; + $last_post_img = "' . $user->img('icon_post_latest', 'VIEW_LATEST_POST') . ''; + + $template->assign_block_vars('topicrow', array( + 'FORUM_ID' => $forum_id, + 'TOPIC_ID' => $topic_id, + 'S_DELETED_TOPIC' => (!$row['topic_id']) ? true : false, + 'TOPIC_TITLE' => censor_text($row['topic_title']), + 'TOPIC_TYPE' => $topic_type, + 'FORUM_NAME' => $row['forum_name'], + 'POSTED_AT' => $user->format_date($row['topic_time']), + + 'TOPIC_FOLDER_IMG' => $user->img($folder, $folder_alt), + 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_attach', '') : '', + + 'U_VIEW_TOPIC' => $view_topic_url, + 'U_VIEW_FORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&f={$row['forum_id']}", + 'U_MOVE_UP' => ($row['order_id'] != 1) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=main&mode=bookmarks&move_up={$row['order_id']}" : '', + 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=main&mode=bookmarks&move_down={$row['order_id']}" : '', + + 'S_ROW_COUNT' => $i++) + ); + } + + break; + case 'drafts': global $ucp; diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index f73157d1cd..1275d39eaf 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -19,6 +19,7 @@ class ucp_prefs extends module $submit = (isset($_POST['submit'])) ? true : false; $error = $data = array(); + $s_hidden_fields = ''; switch($mode) { diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 65006eb46f..a21d6d7349 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -98,6 +98,15 @@ CREATE TABLE phpbb_bbcodes ( PRIMARY KEY (bbcode_id) ); +CREATE TABLE phpbb_bookmarks ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + KEY topic_id (topic_id), + KEY user_id (user_id), + KEY notify_status (order_id) +); + # Table: 'phpbb_bots' CREATE TABLE phpbb_bots ( bot_id tinyint(3) unsigned NOT NULL auto_increment, @@ -718,6 +727,7 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum varchar(200) DEFAULT '' NOT NULL, sub_forum_new varchar(200) DEFAULT '' NOT NULL, folder varchar(200) DEFAULT '' NOT NULL, + folder_moved varchar(200) DEFAULT '' NOT NULL, folder_posted varchar(200) DEFAULT '' NOT NULL, folder_new varchar(200) DEFAULT '' NOT NULL, folder_new_posted varchar(200) DEFAULT '' NOT NULL, @@ -744,6 +754,7 @@ CREATE TABLE phpbb_styles_imageset ( poll_left varchar(200) DEFAULT '' NOT NULL, poll_center varchar(200) DEFAULT '' NOT NULL, poll_right varchar(200) DEFAULT '' NOT NULL, + attach_progress_bar varchar(200) DEFAULT '' NOT NULL, karma_left varchar(200) DEFAULT '' NOT NULL, karma_center varchar(200) DEFAULT '' NOT NULL, karma_right varchar(200) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index d48a67f00f..2217ed06b6 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -20,6 +20,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse','0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks','1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars','.*?'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable_msg',''); @@ -305,7 +306,7 @@ INSERT INTO phpbb_styles (style_id, style_name, style_copyright, template_id, th # MSSQL IDENTITY phpbb_styles_imageset ON # # -- phpbb_styles_imageset -INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_ip, btn_quote, btn_search, btn_edit, btn_report, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, karma_left, karma_center, karma_right, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES (1, 'subSilver', '© phpBB Group', 'subSilver', '', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_ip.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', '', '', '', '', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', '', 'karma/karma{SUFFIX}.gif*6*69', '', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_ip, btn_quote, btn_search, btn_edit, btn_report, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES (1, 'subSilver', '© phpBB Group', 'subSilver', '', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_ip.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_moved.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', '', '', '', '', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', 'progress_bar.gif*16*280', '', '', '', '', '', '', '', '', '', ''); # MSSQL IDENTITY phpbb_styles_imageset OFF # @@ -407,7 +408,7 @@ INSERT INTO phpbb_bots (bot_id, bot_active, bot_name, user_id, bot_agent, bot_ip # MSSQL IDENTITY phpbb_modules OFF # # -- Modules -INSERT INTO phpbb_modules (module_type, module_title, module_filename, module_order, module_enabled, module_subs, module_acl) VALUES ('ucp', 'MAIN', 'main', 1, 1, 'front\r\nsubscribed\r\ndrafts', ''); +INSERT INTO phpbb_modules (module_type, module_title, module_filename, module_order, module_enabled, module_subs, module_acl) VALUES ('ucp', 'MAIN', 'main', 1, 1, 'front\r\nsubscribed\r\nbookmarks\r\ndrafts', ''); INSERT INTO phpbb_modules (module_type, module_title, module_filename, module_order, module_enabled, module_subs, module_acl) VALUES ('ucp', 'PM', 'pm', 2, 1, 'view_messages\r\ncompose\r\nunread\r\ndrafts\r\noptions', 'cfg_allow_privmsg'); INSERT INTO phpbb_modules (module_type, module_title, module_filename, module_order, module_enabled, module_subs, module_acl) VALUES ('ucp', 'PROFILE', 'profile', 3, 1, 'profile_info\r\nreg_details\r\nsignature\r\navatar', ''); INSERT INTO phpbb_modules (module_type, module_title, module_filename, module_order, module_enabled, module_subs, module_acl) VALUES ('ucp', 'PREFS', 'prefs', 4, 1, 'personal\r\nview\r\npost', ''); diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index d8b9ea56bd..107848695c 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -871,6 +871,8 @@ $lang += array( 'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.', 'ALLOW_NO_CENSORS' => 'Allow Disable of Censors', 'ALLOW_NO_CENSORS_EXPLAIN' => 'User can disable word censoring.', + 'ALLOW_BOOKMARKS' => 'Allow bookmarking topics', + 'ALLOW_BOOKMARKS_EXPLAIN' => 'User is able to store personal bookmarks' ); // Karma settings diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 5435989395..7498a8ef5a 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -386,6 +386,7 @@ $lang += array( 'VIEWING_MEMBERS' => 'Viewing member details', 'VIEWING_ONLINE' => 'Viewing who is online', 'VIEWS' => 'Views', + 'VIEW_BOOKMARKS' => 'View bookmarks', 'VIEW_LATEST_POST' => 'View latest post', 'VIEW_NEWEST_POST' => 'View newest post', 'VIEW_ONLINE_TIME' => 'This data is based on users active over the past %d minute', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 7b93e011e2..dd7bd8a8bd 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -64,6 +64,9 @@ $lang += array( 'BOARD_LANGUAGE' => 'My language', 'BOARD_STYLE' => 'My board style', 'BOARD_TIMEZONE' => 'My timezone', + 'BOOKMARKS' => 'Bookmarks', + 'BOOKMARKS_DISABLED' => 'Bookmarks are disabled on this board', + 'BOOKMARKS_REMOVED' => 'Bookmarks removed successfully', 'CHANGE_PASSWORD' => 'Change password', 'CHANGE_PASSWORD_EXPLAIN' => 'Must be between %1$d and %2$d characters.', @@ -100,6 +103,7 @@ $lang += array( 'DELETE_ATTACHMENT_CONFIRM' => 'Are you sure you want to delete this attachment?', 'DELETE_ATTACHMENTS_CONFIRM'=> 'Are you sure you want to delete these attachments?', 'DELETE_AVATAR' => 'Delete Image', + 'DELETE_COOKIES_CONFIRM' => 'Are you sure you want to delete all cookies set by this board?', 'DELETE_MARKED_PM' => 'Delete Marked Messages', 'DELETE_MARKED_PM_CONFIRM' => 'Are you sure you want to delete all marked messages?', 'DELETE_OLDEST_MESSAGES' => 'Delete Oldest Messages', @@ -162,7 +166,9 @@ $lang += array( 'MESSAGE_REPORTED_MESSAGE' => 'Reported Message', 'MINIMUM_KARMA' => 'Minimum User Karma', 'MINIMUM_KARMA_EXPLAIN' => 'Posts by users with Karma less than this will be ignored.', + 'MOVE_DOWN' => 'Move down', 'MOVE_TO_FOLDER' => 'Move to Folder', + 'MOVE_UP' => 'Move up', 'NEW_EMAIL_ERROR' => 'The email addresses you entered do not match.', 'NEW_PASSWORD' => 'Password', @@ -217,6 +223,9 @@ $lang += array( 'REGISTRATION' => 'Registration', 'RELEASE_MESSAGES' => 'Click %sHere%s to release the on-hold messages, they will be re-sorted into the appropiate folder if enough space is made available.', 'REMOVE_ADDRESS' => 'Remove address', + 'REMOVE_SELECTED_BOOKMARKS' => 'Remove selected bookmarks', + 'REMOVE_SELECTED_BOOKMARKS_CONFIRM' => 'Are you sure you want to delete all selected bookmarks?', + 'REMOVE_BOOKMARK_MARKED' => 'Remove marked bookmarks', 'REMOVE_FOLDER' => 'Remove folder', 'REPLIED_MESSAGE' => 'Replied to Message', 'REPORT_PM' => 'Report PM', @@ -257,6 +266,7 @@ $lang += array( 'UCP_ICQ' => 'ICQ Number', 'UCP_JABBER' => 'Jabber Address', 'UCP_MAIN' => 'Overview', + 'UCP_MAIN_BOOKMARKS' => 'Bookmarks', 'UCP_MAIN_DRAFTS' => 'Saved drafts', 'UCP_MAIN_FRONT' => 'Front page', 'UCP_MAIN_SUBSCRIBED' => 'Subscribed', diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php index ae67f79962..0769970918 100644 --- a/phpBB/language/en/viewforum.php +++ b/phpBB/language/en/viewforum.php @@ -37,6 +37,7 @@ $lang += array( 'LOGIN_NOTIFY_FORUM' => 'You have been notified about this forum, please login to view it.', 'MARK_TOPICS_READ' => 'Mark Topics Read', + 'MOVED_TOPIC' => 'Moved Topic', 'NEW_POSTS_HOT' => 'New posts [ Popular ]', 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php index 3262803206..3b51a027f1 100644 --- a/phpBB/language/en/viewtopic.php +++ b/phpBB/language/en/viewtopic.php @@ -30,6 +30,10 @@ if (empty($lang) || !is_array($lang)) $lang += array( 'ATTACHMENT' => 'Attachment', + 'BOOKMARK_ADDED' => 'Bookmarked Topic successfully.', + 'BOOKMARK_REMOVED' => 'Removed Bookmarked Topic successfully.', + 'BOOKMARK_TOPIC' => 'Bookmark Topic', + 'BOOKMARK_TOPIC_REMOVE' => 'Remove from Bookmarks', 'BUMPED_BY' => 'Last bumped by %1$s on %2$s', 'BUMP_TOPIC' => 'Bump Topic', diff --git a/phpBB/posting.php b/phpBB/posting.php index 0b435adab2..c545718711 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -55,7 +55,7 @@ if ($cancel || ($current_time - $lastclick < 2 && $submit)) redirect($redirect); } -if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete')) && !$forum_id) +if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete', 'popup')) && !$forum_id) { trigger_error('NO_FORUM'); } @@ -964,7 +964,7 @@ $template->assign_vars(array( 'U_VIEW_FORUM' => "viewforum.$phpEx$SID&f=" . $forum_id, 'U_VIEWTOPIC' => ($mode != 'post') ? "viewtopic.$phpEx$SID&$forum_id&t=$topic_id" : '', - 'U_PROGRESS_BAR' => "posting.$phpEx$SID&mode=popup", + 'U_PROGRESS_BAR' => "posting.$phpEx$SID&f=$forum_id&mode=popup", // do NOT replace & with & here 'S_PRIVMSGS' => false, 'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']), @@ -2025,6 +2025,10 @@ function upload_popup($forum_style) 'popup' => 'posting_progress_bar.html') ); + $template->assign_vars(array( + 'PROGRESS_BAR' => $user->img('attach_progress_bar', $user->lang['UPLOAD_IN_PROGRESS'])) + ); + $template->display('popup'); } diff --git a/phpBB/styles/subSilver/imageset/folder_moved.gif b/phpBB/styles/subSilver/imageset/folder_moved.gif new file mode 100644 index 0000000000000000000000000000000000000000..3d6cc222791d779a7d9bfed9bd671e0d16431e81 GIT binary patch literal 1131 zcmdVZ{Zo<$0KoBwLd7s&*=}u?+0<0b;Y&NcxjULKGkepzZOz?IYo+ey(y+EpE78;j z6bd4fSqtB=biQ!Cxl~>>*n^}LA__j6AgH)hcz6};WY?du?|<<5;rsdFjHKi2w<#8!Ia-z_+(F8qKO2R6n6P7;%@ogff}z z=0nMq2crqs+Ff?oZntm#8n4xA7fG?3I_axx(S0w}N+MP)7OzkWf02)=nK_n!B!8BKkE!$r%GtBCv%hnCKoBf#8zSG~fRy7do%HM47LDPx z%jFWyXt$aZD!PSBOG_uHeP7T90t@NP;g`A0$FAY)4+o!R)wCKR$s31RzVKT2%Yja@ z^7hjgHLUhch$k4Am2~h7lvwTrRCwo!vnhV?Lb!h+J&$znyOyWLZ6h^3yqL?s8P;LT z?8v`nd&-Tj`T2RH(O5qqK%b*s?-f}Vm9Sn(y4y85IXQAMBDsnqm&>Q7ro8g0LZMJk zitPoJ%gf8s#&60xM?!v}SM-djnsQz>WVbz^KHbQ5vl0XXfpbC1<#I=+wRYC0S>$d) zC*SFGisu&dD6L0s_od%_U|-YQotvk~9L<8x$V>^n$cp=krK-kCA-zN*(d+f;q#lr# z+b}rcS3vhGpv}$Aq0drd%h_vlpvi1CL6WTv^E44#!v!G-!W1;HIK43h=8#Y%{y9>& zWH8w__+=3h7wAS4yt|~C+R;CwQr#O>*c#)4ix~!kVT)J!ab<_K^UDebTcJ=qD-C}n z`ZO{ZTFkg$J2r${glw|Y|yJ?|K2x) z-sjJb)%ot)qq)My;*p`#5l5ZFKQdbdRkr`RCg%#q$U%t%_n-DU}X3}mpl|K zgpWTMLR_MvlQM(FXKJ&aqvHc``##&ly>zlVgCEQl?LT!ZAT= - +

{L_UPLOAD_IN_PROGRESS}



{L_CLOSE_WINDOW}


{L_UPLOAD_IN_PROGRESS}

{PROGRESS_BAR}


{L_CLOSE_WINDOW}

diff --git a/phpBB/styles/subSilver/template/ucp_main_bookmarks.html b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html new file mode 100644 index 0000000000..bbf40c678b --- /dev/null +++ b/phpBB/styles/subSilver/template/ucp_main_bookmarks.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_UCP}
{L_UCP_WELCOME}
{L_BOOKMARKS}
{L_BOOKMARKS_DISABLED}
{topicrow.TOPIC_FOLDER_IMG}{L_DELETED_TOPIC}

{topicrow.ATTACH_ICON_IMG}{topicrow.TOPIC_TYPE}{topicrow.TOPIC_TITLE}


{L_FORUM}: {topicrow.FORUM_NAME}
{L_POSTED}:
{topicrow.POSTED_AT}
{L_MOVE_UP} | {L_MOVE_DOWN}
{L_NO_BOOKMARKS}
 
+ + + + \ No newline at end of file diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html index 8be46db544..e8ea15f529 100644 --- a/phpBB/styles/subSilver/template/viewforum_body.html +++ b/phpBB/styles/subSilver/template/viewforum_body.html @@ -273,6 +273,9 @@    {FOLDER_LOCKED_IMG} {L_NO_NEW_POSTS_LOCKED} +    + {FOLDER_MOVED_IMG} + {L_MOVED_TOPIC} {rules.RULE}
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html index 66546ff13b..ab63f6de5e 100644 --- a/phpBB/styles/subSilver/template/viewtopic_body.html +++ b/phpBB/styles/subSilver/template/viewtopic_body.html @@ -46,7 +46,8 @@