Selaa lähdekoodia

[svn r10414] new forum icons and changing the style of the forum for consistency

Patrick Cool 18 vuotta sitten
vanhempi
commit
05aeda8903

+ 7 - 8
main/forum/index.php

@@ -158,11 +158,10 @@ if(is_array($all_groups))
 //if (api_is_allowed_to_edit() and !$_GET['action'])
 if (api_is_allowed_to_edit())
 {
-	echo '<a href="'.$_SERVER['PHP_SELF'].'?action=add&amp;content=forumcategory">'.get_lang('AddForumCategory').'</a>';
+	echo '<a href="'.$_SERVER['PHP_SELF'].'?action=add&amp;content=forumcategory"> '.Display::return_icon('forum_category_new.gif').' '.get_lang('AddForumCategory').'</a> ';
 	if (is_array($forum_categories_list))
 	{
-		echo ' | ';
-		echo '<a href="'.$_SERVER['PHP_SELF'].'?action=add&amp;content=forum">'.get_lang('AddForum').'</a>';
+		echo '<a href="'.$_SERVER['PHP_SELF'].'?action=add&amp;content=forum"> '.Display::return_icon('forum_new.gif').' '.get_lang('AddForum').'</a>';
 	}
 	//echo ' | <a href="forum_migration.php">'.get_lang('MigrateForum').'</a>';
 }
@@ -172,26 +171,26 @@ if (api_is_allowed_to_edit())
 	Display Forum Categories and the Forums in it
 ------------------------------------------------------------------------------------------------------
 */
-echo "<table width='100%'>\n";
+echo "<table class='data_table' width='100%'>\n";
 // Step 3: we display the forum_categories first
 foreach ($forum_categories_list as $forum_category_key => $forum_category)
 {
-	echo "\t<tr class=\"forum_category_header\">\n\t\t<td colspan=\"5\">";
+	echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"5\">";
 	echo '<a href="viewforumcategory.php?forumcategory='.prepare4display($forum_category['cat_id']).'" '.class_visible_invisible(prepare4display($forum_category['visibility'])).'>'.prepare4display($forum_category['cat_title']).'</a><br />';
 	if ($forum_category['cat_comment']<>'' AND trim($forum_category['cat_comment'])<>'&nbsp;')
 	{
 		echo '<span>'.prepare4display($forum_category['cat_comment']).'</span>';
 	}
-	echo "</td>\n";
+	echo "</th>\n";
 	if (api_is_allowed_to_edit())
 	{
-		echo "\t\t<td>";
+		echo "\t\t<th>";
 		echo "<a href=\"".$_SERVER['PHP_SELF']."?action=edit&amp;content=forumcategory&amp;id=".prepare4display($forum_category['cat_id'])."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
 		echo "<a href=\"".$_SERVER['PHP_SELF']."?action=delete&amp;content=forumcategory&amp;id=".prepare4display($forum_category['cat_id'])."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("DeleteForumCategory")))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>";
 		display_visible_invisible_icon('forumcategory', prepare4display($forum_category['cat_id']), prepare4display($forum_category['visibility']));
 		display_lock_unlock_icon('forumcategory',prepare4display($forum_category['cat_id']), prepare4display($forum_category['locked']));
 		display_up_down_icon('forumcategory',prepare4display($forum_category['cat_id']), $forum_categories_list);
-		echo "</td>\n";
+		echo "</th>\n";
 	}
 	echo "\t</tr>\n";
 	

+ 3 - 3
main/forum/newthread.php

@@ -169,13 +169,13 @@ handle_forum_and_forumcategories();
 	Display Forum Category and the Forum information
 -----------------------------------------------------------
 */
-echo "<table width='100%'>\n";
+echo "<table class=\"data_table\" width='100%'>\n";
 
 // the forum category
-echo "\t<tr class=\"forum_category\">\n\t\t<td colspan=\"2\">";
+echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\"  colspan=\"2\">";
 echo '<a href="index.php" '.class_visible_invisible($current_forum_category['visibility']).'>'.$current_forum_category['cat_title'].'</a><br />';
 echo '<span>'.$current_forum_category['cat_comment'].'</span>';
-echo "</td>\n";
+echo "</th>\n";
 echo "\t</tr>\n";
 
 // the forum 

+ 3 - 3
main/forum/reply.php

@@ -167,13 +167,13 @@ if (!$_user['user_id'] AND $current_forum['allow_anonymous']==0)
 	Display Forum Category and the Forum information
 -----------------------------------------------------------
 */
-echo "<table width='100%'>\n";
+echo "<table class=\"data_table\" width='100%'>\n";
 
 // the forum category
-echo "\t<tr class=\"forum_category_header\">\n\t\t<td colspan=\"2\">";
+echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"2\">";
 echo '<a href="index.php" '.class_visible_invisible($current_forum_category['visibility']).'>'.$current_forum_category['cat_title'].'</a><br />';
 echo '<span>'.$current_forum_category['cat_comment'].'</span>';
-echo "</td>\n";
+echo "</th>\n";
 echo "\t</tr>\n";
 
 // the forum 

+ 6 - 6
main/forum/viewforum.php

@@ -171,7 +171,7 @@ if (isset($message))
 // 3. a visitor is here and new threads AND allowed AND  anonymous posts are allowed
 if (api_is_allowed_to_edit() OR ($current_forum['allow_new_threads']==1 AND isset($_user['user_id'])) OR ($current_forum['allow_new_threads']==1 AND !isset($_user['user_id']) AND $current_forum['allow_anonymous']==1))
 {
-	echo '<a href="newthread.php?forum='.$_GET['forum'].'">'.get_lang('NewTopic').'</a>';
+	echo '<a href="newthread.php?forum='.$_GET['forum'].'">'.Display::return_icon('forumthread_new.gif').' '.get_lang('NewTopic').'</a>';
 }
 
 /*
@@ -179,20 +179,20 @@ if (api_is_allowed_to_edit() OR ($current_forum['allow_new_threads']==1 AND isse
 					Display 
 -----------------------------------------------------------
 */
-echo "<table width='100%'>\n";
+echo "<table class=\"data_table\" width='100%'>\n";
 
 // the forum category
-echo "\t<tr class=\"forum_category\">\n\t\t<td colspan=\"7\">";
+echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"7\">";
 echo '<a href="index.php" '.class_visible_invisible($current_forum_category['visibility']).'>'.prepare4display($current_forum_category['cat_title']).'</a><br />';
 echo '<span>'.prepare4display($current_forum_category['cat_comment']).'</span>';
-echo "</td>\n";
+echo "</th>\n";
 echo "\t</tr>\n";
 
 // the forum 
 echo "\t<tr class=\"forum_header\">\n";
 echo "\t\t<td colspan=\"7\">".prepare4display($current_forum['forum_title'])."<br />";
 echo '<span>'.prepare4display($current_forum['forum_comment']).'</span>';
-echo "</td>\n";
+echo "</th>\n";
 echo "\t</tr>\n";
 
 // The column headers (to do: make this sortable)
@@ -275,7 +275,7 @@ foreach ($threads as $row)
 			echo "<a href=\"".$_SERVER['PHP_SELF']."?forum=".$_GET['forum']."&amp;action=delete&amp;content=thread&amp;id=".$row['thread_id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("DeleteCompleteThread")))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>";
 			display_visible_invisible_icon('thread', $row['thread_id'], $row['visibility'], array("forum"=>$_GET['forum']));
 			display_lock_unlock_icon('thread',$row['thread_id'], $row['locked'], array("forum"=>$_GET['forum']));
-			echo "<a href=\"viewforum.php?forum=".$_GET['forum']."&amp;action=move&amp;thread=".$row['thread_id']."\">".icon('../img/forummovepost.gif',get_lang('Edit'))."</a>";
+			echo "<a href=\"viewforum.php?forum=".$_GET['forum']."&amp;action=move&amp;thread=".$row['thread_id']."\">".icon('../img/forummovepost.gif',get_lang('MoveThread'))."</a>";
 			echo "</td>\n";
 		}
 		echo "\t</tr>\n";

+ 6 - 6
main/forum/viewforumcategory.php

@@ -160,7 +160,7 @@ $groups_of_user=GroupManager::get_group_ids($_course['dbName'], $_user['user_id'
 if (api_is_allowed_to_edit())
 {
 	//echo '<a href="'.$_SERVER['PHP_SELF'].'?forumcategory='.$_GET['forumcategory'].'&amp;action=add&amp;content=forumcategory">'.get_lang('AddForumCategory').'</a> | ';
-	echo '<a href="'.$_SERVER['PHP_SELF'].'?forumcategory='.$_GET['forumcategory'].'&amp;action=add&amp;content=forum">'.get_lang('AddForum').'</a>';
+	echo '<a href="'.$_SERVER['PHP_SELF'].'?forumcategory='.$_GET['forumcategory'].'&amp;action=add&amp;content=forum">'.Display::return_icon('forum_new.gif').' '.get_lang('AddForum').'</a>';
 }
 
 /*
@@ -168,20 +168,20 @@ if (api_is_allowed_to_edit())
 	Display Forum Categories and the Forums in it
 -----------------------------------------------------------
 */
-echo "<table width='100%'>\n";
-echo "\t<tr class=\"forum_category\">\n\t\t<td colspan=\"5\">";
+echo "<table class=\"data_table\" width='100%'>\n";
+echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"5\">";
 echo '<a href="#" '.class_visible_invisible($forum_category['visibility']).'>'.prepare4display($forum_category['cat_title']).'</a><br />';
 echo '<span>'.prepare4display($forum_category['cat_comment']).'</span>';
-echo "</td>\n";
+echo "</th>\n";
 if (api_is_allowed_to_edit())
 {
-	echo "\t\t<td>";
+	echo "\t\t<th>";
 	echo "<a href=\"".$_SERVER['PHP_SELF']."?forumcategory=".$_GET['forumcategory']."&amp;action=edit&amp;content=forumcategory&amp;id=".$forum_category['cat_id']."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
 	echo "<a href=\"".$_SERVER['PHP_SELF']."?forumcategory=".$_GET['forumcategory']."&amp;action=delete&amp;content=forumcategory&amp;amp;id=".$forum_category['cat_id']."\" onclick=\"javascript:if(!confirm('".addslashes(htmlentities(get_lang("DeleteForumCategory")))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>";
 	display_visible_invisible_icon('forumcategory', $forum_category['cat_id'], $forum_category['visibility'], array("forumcategory"=>$_GET['forumcategory']));
 	display_lock_unlock_icon('forumcategory',$forum_category['cat_id'], $forum_category['locked'], array("forumcategory"=>$_GET['forumcategory']));
 	display_up_down_icon('forumcategory',$forum_category['cat_id'], $forum_categories_list);
-	echo "</td>\n";
+	echo "</th>\n";
 }
 echo "\t</tr>\n";
 

+ 3 - 3
main/forum/viewthread.php

@@ -220,13 +220,13 @@ if ($message<>'PostDeletedSpecial') // in this case the first and only post of t
 	// we are getting all the information about the current forum and forum category. 
 	// note pcool: I tried to use only one sql statement (and function) for this
 	// but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table
-	echo "<table width='100%'>\n";
+	echo "<table class=\"data_table\" width='100%'>\n";
 	
 	// the forum category
-	echo "\t<tr class=\"forum_category\">\n\t\t<td colspan=\"6\">";
+	echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"6\">";
 	echo '<a href="index.php" '.class_visible_invisible($current_forum_category['visibility']).'>'.prepare4display($current_forum_category['cat_title']).'</a><br />';
 	echo '<span>'.prepare4display($current_forum_category['cat_comment']).'</span>';
-	echo "</td>\n";
+	echo "</th>\n";
 	echo "\t</tr>\n";
 	
 	// the forum