diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-10-20 19:19:07 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-10-20 19:19:07 +0000 |
| commit | 0e9f0ac4ecc636336603cc6932ce21a550c7087e (patch) | |
| tree | fbcfca6602b37f80a51fba1d459f94b3d93ca08f /phpBB/includes/forums_display.php | |
| parent | 4887cf1e49daa80a0736d753589c9995d7ddbd4b (diff) | |
| download | forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.gz forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.bz2 forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.xz forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.zip | |
Mostly changes to turn userdata into user->data, lang into user->lang + bitstring 2nd format + inheritance for permission admin and various other updates/fixes/changes ... note that user->lang & user->theme isn't final
git-svn-id: file:///svn/phpbb/trunk@2958 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/forums_display.php')
| -rw-r--r-- | phpBB/includes/forums_display.php | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/phpBB/includes/forums_display.php b/phpBB/includes/forums_display.php index ef86294f66..820d7cb2e3 100644 --- a/phpBB/includes/forums_display.php +++ b/phpBB/includes/forums_display.php @@ -53,57 +53,42 @@ foreach ($forum_rows as $row) switch ($forum_status) { case ITEM_CATEGORY: - $folder_image = $theme['sub_forum']; - $folder_alt = $lang['Category']; + $folder_image = 'sub_forum'; + $folder_alt = 'Category'; break; case ITEM_LOCKED: - $folder_image = $theme['forum_locked']; - $folder_alt = $lang['Forum_locked']; + $folder_image = 'forum_locked'; + $folder_alt = 'Forum_locked'; break; default: $unread_topics = false; - if ($userdata['user_id'] && $forum_last_post_time > $userdata['user_lastvisit']) + if ($user->data['user_id'] && $forum_last_post_time > $user->data['user_lastvisit']) { $unread_topics = true; - if (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'])) - { - if ($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time) - { - $unread_topics = false; - } - } - - if (isset($mark_topics[$forum_id]) || isset($mark_forums[$forum_id])) - { - if ($mark_forums[$forum_id] > $userdata['user_lastvisit'] || !max($mark_topics[$forum_id])) - { - $unread_topics = false; - } - } } - $folder_image = ($unread_topics) ? $theme['forum_new'] : $theme['forum']; - $folder_alt = ($unread_topics) ? $lang['New_posts'] : $lang['No_new_posts']; + $folder_image = ($unread_topics) ? 'forum_new' : 'forum'; + $folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts'; } if ($forum_last_post_id) { - $last_post = create_date($board_config['default_dateformat'], $forum_last_post_time, $board_config['board_timezone']) . '<br />'; + $last_post = $user->format_date($forum_last_post_time) . '<br />'; - $last_post .= ($forum_last_poster_id == ANONYMOUS) ? (($forum_last_poster_name != '') ? $forum_last_poster_name . ' ' : $lang['Guest'] . ' ') : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $forum_last_poster_id . '">' . $username . '</a> '; + $last_post .= ($forum_last_poster_id == ANONYMOUS) ? (($forum_last_poster_name != '') ? $forum_last_poster_name . ' ' : $user->lang['Guest'] . ' ') : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $forum_last_poster_id . '">' . $username . '</a> '; - $last_post .= '<a href="viewtopic.' . $phpEx . '$SID&f=' . $forum_id . '&p=' . $forum_last_post_id . '#' . $forum_last_post_id . '">' . create_img($theme['goto_post_latest'], $lang['View_latest_post']) . '</a>'; + $last_post .= '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&p=' . $forum_last_post_id . '#' . $forum_last_post_id . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>'; } else { - $last_post = $lang['No_Posts']; + $last_post = $user->lang['No_Posts']; } if (!empty($forum_moderators[$forum_id])) { - $l_moderator = (count($forum_moderators[$forum_id]) == 1) ? $lang['Moderator'] . ': ' : $lang['Moderators'] . ': ' ; + $l_moderator = (count($forum_moderators[$forum_id]) == 1) ? $user->lang['Moderator'] . ': ' : $user->lang['Moderators'] . ': ' ; $moderators_list = implode(', ', $forum_moderators[$forum_id]); } else @@ -127,7 +112,7 @@ foreach ($forum_rows as $row) } $subforums_list = implode(', ', $links); - $l_subforums = (count($subforums[$forum_id]) == 1) ? $lang['Subforum'] . ': ' : $lang['Subforums'] . ': '; + $l_subforums = (count($subforums[$forum_id]) == 1) ? $user->lang['Subforum'] . ': ' : $user->lang['Subforums'] . ': '; } else { @@ -157,7 +142,7 @@ foreach ($forum_rows as $row) $template->assign_block_vars('forumrow', array( $forum_type_switch => TRUE, - 'FORUM_FOLDER_IMG' => create_img($folder_image, $folder_alt), + 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), 'FORUM_NAME' => $forum_name, 'FORUM_DESC' => $forum_desc, |
