From b3366f1e3518c5b46b379178eac191e3a3974dfa Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 31 Jul 2001 14:06:06 +0000 Subject: [PATCH] HTML 4.01 and XHTML 1.0 compliance changes git-svn-id: file:///svn/phpbb/trunk@767 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/page_header.php | 26 ++++++++----- phpBB/includes/page_tail.php | 2 +- phpBB/includes/sessions.php | 4 +- phpBB/index.php | 53 +++++++++----------------- phpBB/templates/PSO/index_body.tpl | 37 ++++++++---------- phpBB/templates/PSO/overall_footer.tpl | 10 ++--- phpBB/templates/PSO/overall_header.tpl | 31 +++++++-------- 7 files changed, 70 insertions(+), 93 deletions(-) diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php index 6e18dd7ca4..d44e018c37 100644 --- a/phpBB/includes/page_header.php +++ b/phpBB/includes/page_header.php @@ -73,8 +73,6 @@ else $l_login_logout = $lang['Login']; } - -$l_last_visit = $lang['You_last_visit']; $s_last_visit = create_date($board_config['default_dateformat'], $userdata['session_last_visit'], $board_config['default_timezone']); // @@ -100,7 +98,7 @@ while($row = $db->sql_fetchrow($result)) { if($row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN) { - $userlist_ary[] = "" . $row['username'] . ""; + $userlist_ary[] = "" . $row['username'] . ""; } else { @@ -171,6 +169,8 @@ $template->assign_vars(array( "META_INFO" => $meta_tags, "TOTAL_USERS_ONLINE" => $lang['There'] . " $l_is_are $logged_visible_online " . $lang['Registered'] . " $l_r_user_s, $logged_hidden_online " . $lang['Hidden'] . " $l_h_user_s ". $lang['and'] . " $guests_online " . $lang['Guest'] . " $l_g_user_s " . $lang['online'], "LOGGED_IN_USER_LIST" => $userlist, + "PRIVATE_MESSAGE_INFO" => $l_privmsgs_text, + "LAST_VISIT_DATE" => $s_last_visit, "L_USERNAME" => $lang['Username'], "L_PASSWORD" => $lang['Password'], @@ -203,8 +203,7 @@ $template->assign_vars(array( "L_MESSAGE" => $lang['Message'], "L_BY" => $lang['by'], "L_LOGIN_LOGOUT" => $l_login_logout, - "L_PRIVATE_MESSAGE_INFO" => $l_privmsgs_text, - "L_LAST_VISIT" => $l_last_visit, + "L_LAST_VISIT" => $lang['You_last_visit'], "U_INDEX" => append_sid("index.".$phpEx), "U_REGISTER" => append_sid("profile.".$phpEx."?mode=register"), @@ -221,7 +220,6 @@ $template->assign_vars(array( "S_TIMEZONE" => $lang['All_times'] . " " . $lang[$board_config['default_timezone']], "S_LOGIN_ACTION" => append_sid("login.$phpEx"), "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"), - "S_LAST_VISIT_DATE" => $s_last_visit, "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']), "T_HEAD_STYLESHEET" => $theme['head_stylesheet'], @@ -235,12 +233,21 @@ $template->assign_vars(array( "T_TR_COLOR1" => "#".$theme['tr_color1'], "T_TR_COLOR2" => "#".$theme['tr_color2'], "T_TR_COLOR3" => "#".$theme['tr_color3'], + "T_TR_CLASS1" => $theme['tr_class1'], + "T_TR_CLASS2" => $theme['tr_class2'], + "T_TR_CLASS3" => $theme['tr_class3'], "T_TH_COLOR1" => "#".$theme['th_color1'], "T_TH_COLOR2" => "#".$theme['th_color2'], "T_TH_COLOR3" => "#".$theme['th_color3'], + "T_TH_CLASS1" => $theme['th_class1'], + "T_TH_CLASS2" => $theme['th_class2'], + "T_TH_CLASS3" => $theme['th_class3'], "T_TD_COLOR1" => "#".$theme['td_color1'], "T_TD_COLOR2" => "#".$theme['td_color2'], "T_TD_COLOR3" => "#".$theme['td_color3'], + "T_TD_CLASS1" => $theme['td_class1'], + "T_TD_CLASS2" => $theme['td_class2'], + "T_TD_CLASS3" => $theme['td_class3'], "T_FONTFACE1" => $theme['fontface1'], "T_FONTFACE2" => $theme['fontface2'], "T_FONTFACE3" => $theme['fontface3'], @@ -250,10 +257,9 @@ $template->assign_vars(array( "T_FONTCOLOR1" => "#".$theme['fontcolor1'], "T_FONTCOLOR2" => "#".$theme['fontcolor2'], "T_FONTCOLOR3" => "#".$theme['fontcolor3'], - "T_IMG1" => $theme['img1'], - "T_IMG2" => $theme['img2'], - "T_IMG3" => $theme['img3'], - "T_IMG4" => $theme['img4']) + "T_SPAN_CLASS1" => $theme['span_class1'], + "T_SPAN_CLASS2" => $theme['span_class2'], + "T_SPAN_CLASS3" => $theme['span_class3']) ); // diff --git a/phpBB/includes/page_tail.php b/phpBB/includes/page_tail.php index 607b322b0b..c092f00fe5 100644 --- a/phpBB/includes/page_tail.php +++ b/phpBB/includes/page_tail.php @@ -37,7 +37,7 @@ $template->set_filenames(array( $template->assign_vars(array( "PHPBB_VERSION" => "2.0-alpha", - "ADMIN_LINK" => $admin_link)); + "ADMIN_LINK" => $admin_link . "
")); $template->pparse("overall_footer"); diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index c5f0db17f3..035bf8b2ea 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -413,8 +413,8 @@ function append_sid($url) if(!empty($SID) && !eregi("sid=", $url)) { - $url = ereg_replace("[&?]+$", "", $url); - $url .= ( (strpos($url, "?") != false) ? "&" : "?" ) . $SID; +// $url = ereg_replace("[&?]+$", "", $url); + $url .= ( (strpos($url, "?") != false) ? "&" : "?" ) . $SID; } return($url); diff --git a/phpBB/index.php b/phpBB/index.php index 4b18b0b996..a7c04f27f8 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -140,21 +140,6 @@ if($total_categories = $db->sql_numrows($q_categories)) AND u.user_id = ug.user_id ORDER BY aa.forum_id, g.group_id, u.user_id"; -/* $sql = "SELECT f.forum_id, g.group_name, g.group_id, u.user_id, u.username - FROM " . AUTH_ACCESS_TABLE . " aa, " . FORUMS_TABLE . " f, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u, " . GROUPS_TABLE . " g - WHERE aa.forum_id = f.forum_id - AND aa.auth_mod = " . TRUE . " - AND ( - ( ug.user_id = aa.user_id - AND u.user_id = ug.user_id - AND g.group_id = 0 ) - OR - ( ug.group_id = aa.group_id - AND u.user_id = ug.user_id - AND g.group_id <> 0 ) - ) - AND g.group_id = ug.group_id - ORDER BY f.forum_id, g.group_id, u.user_id";*/ if(!$q_forum_mods = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql); @@ -204,7 +189,7 @@ if($total_categories = $db->sql_numrows($q_categories)) "L_FORUM_LOCKED" => $lang['Forum_is_locked'], - "U_NEWEST_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid")) + "U_NEWEST_USER_PROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid")) ); // @@ -216,6 +201,8 @@ if($total_categories = $db->sql_numrows($q_categories)) { $cat_id = $category_rows[$i]['cat_id']; + $count = 0; + for($j = 0; $j < $total_forums; $j++) { $forum_id = $forum_rows[$j]['forum_id']; @@ -234,16 +221,16 @@ if($total_categories = $db->sql_numrows($q_categories)) if($forum_rows[$j]['forum_status'] == FORUM_LOCKED) { - $folder_image = ""; + $folder_image = "\"""; } else if($userdata['session_start'] == $userdata['session_time']) { - $folder_image = ($forum_rows[$i]['post_time'] > $userdata['session_last_visit']) ? "" : ""; + $folder_image = ($forum_rows[$i]['post_time'] > $userdata['session_last_visit']) ? "\""" : "\"""; } else { - $folder_image = ($forum_rows[$i]['post_time'] > $userdata['session_time'] - 300) ? "" : ""; + $folder_image = ($forum_rows[$i]['post_time'] > $userdata['session_time'] - 300) ? "\""" : "\"""; } $posts = $forum_rows[$j]['forum_posts']; @@ -262,9 +249,9 @@ if($total_categories = $db->sql_numrows($q_categories)) $last_post_time = create_date($board_config['default_dateformat'], $forum_rows[$j]['post_time'], $board_config['default_timezone']); $last_post = $last_post_time . "
by "; - $last_post .= "" . $last_poster . " "; + $last_post .= "" . $last_poster . " "; - $last_post .= "\"""; + $last_post .= "\"""; } else { @@ -283,14 +270,14 @@ if($total_categories = $db->sql_numrows($q_categories)) $moderators_links .= ", "; } - if(!($mod_count % 2) && $mod_count != 0) + if( !($mod_count % 2) && $mod_count != 0 ) { $moderators_links .= "
"; } if( $forum_mods_single_user[$forum_id][$mods]) { - $moderators_links .= "" . $forum_mods_name[$forum_id][$mods] . ""; + $moderators_links .= "" . $forum_mods_name[$forum_id][$mods] . ""; } else { @@ -305,30 +292,24 @@ if($total_categories = $db->sql_numrows($q_categories)) $moderators_links = " "; } - // - // This should end up in the template using IF...ELSE...ENDIF - // - if($row_color == "#DDDDDD") - { - $row_color = "#CCCCCC"; - } - else - { - $row_color = "#DDDDDD"; - } + $row_color = "#" . ( ( !($count%2) ) ? $theme['td_color1'] : $theme['td_color2'] ); + $row_class = ( !($count%2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("catrow.forumrow", array( + "ROW_COLOR" => $row_color, + "ROW_CLASS" => $row_class, "FOLDER" => $folder_image, "FORUM_NAME" => stripslashes($forum_rows[$j]['forum_name']), "FORUM_DESC" => stripslashes($forum_rows[$j]['forum_desc']), - "ROW_COLOR" => $row_color, "POSTS" => $forum_rows[$j]['forum_posts'], "TOPICS" => $forum_rows[$j]['forum_topics'], "LAST_POST" => $last_post, "MODERATORS" => $moderators_links, - "U_VIEWFORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&" . $forum_rows[$j]['forum_posts'])) + "U_VIEWFORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&" . $forum_rows[$j]['forum_posts'])) ); + + $count++; } else if($viewcat != -1) { diff --git a/phpBB/templates/PSO/index_body.tpl b/phpBB/templates/PSO/index_body.tpl index 9c1792499b..ce82025995 100644 --- a/phpBB/templates/PSO/index_body.tpl +++ b/phpBB/templates/PSO/index_body.tpl @@ -9,12 +9,12 @@ - + + + + + @@ -23,11 +23,11 @@ - + - + @@ -35,15 +35,15 @@ - - + + - - + +
  -  {L_FORUM}  -  {L_TOPICS}  -  {L_POSTS}  -  {L_LASTPOST}  -  {L_MODERATOR}  +   {L_FORUM}  {L_TOPICS}  {L_POSTS}  {L_LASTPOST}  {L_MODERATOR} 
{catrow.forumrow.FOLDER}{catrow.forumrow.FORUM_NAME}
{catrow.forumrow.FORUM_DESC}
{catrow.forumrow.FORUM_NAME}
{catrow.forumrow.FORUM_DESC}
{catrow.forumrow.TOPICS} {catrow.forumrow.POSTS} {catrow.forumrow.LAST_POST}{catrow.forumrow.MODERATORS}
{catrow.forumrow.MODERATORS}
{L_PRIVATEMSGS}
{L_PRIVATE_MESSAGE_INFO}{L_PRIVATEMSGS}{PRIVATE_MESSAGE_INFO}
{L_WHO_IS_ONLINE}
{TOTAL_USERS_ONLINE}
{LOGGED_IN_USER_LIST}
{L_WHO_IS_ONLINE}{TOTAL_USERS_ONLINE}
{LOGGED_IN_USER_LIST}
@@ -53,23 +53,16 @@ - + - + - +
{L_NEWPOSTS} {L_NEWPOSTS}   {L_NONEWPOSTS} {L_NONEWPOSTS}   {L_FORUM_LOCKED} {L_FORUM_LOCKED}
{S_TIMEZONE} - - diff --git a/phpBB/templates/PSO/overall_footer.tpl b/phpBB/templates/PSO/overall_footer.tpl index 4ca89331f1..35702d9af0 100644 --- a/phpBB/templates/PSO/overall_footer.tpl +++ b/phpBB/templates/PSO/overall_footer.tpl @@ -1,8 +1,7 @@ +
-
-{ADMIN_LINK} -

+
{ADMIN_LINK}
-Powered by phpBB 2.0a © 2001 phpBB Group -
- -
+Powered by phpBB 2.0a © 2001 phpBB Group
\ No newline at end of file diff --git a/phpBB/templates/PSO/overall_header.tpl b/phpBB/templates/PSO/overall_header.tpl index a49eae5103..66aee4c690 100644 --- a/phpBB/templates/PSO/overall_header.tpl +++ b/phpBB/templates/PSO/overall_header.tpl @@ -1,10 +1,11 @@ - - - - - + + + + -phpBB - {SITENAME} + + +{PAGE_TITLE}