diff --git a/main/forum/viewthread.php b/main/forum/viewthread.php index 052fa3b0a1..915282c24e 100755 --- a/main/forum/viewthread.php +++ b/main/forum/viewthread.php @@ -73,8 +73,8 @@ if (!empty($_SESSION['toolgroup'])) { $group_properties = GroupManager :: get_group_properties($session_toolgroup); $interbreadcrumb[] = array("url"=>"../group/group.php", "name" => get_lang('Groups')); $interbreadcrumb[] = array("url"=>"../group/group_space.php?gidReq=".$session_toolgroup, "name"=> get_lang('GroupSpace').' ('.$group_properties['name'].')'); - $interbreadcrumb[] = array("url"=>"viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&gidReq=".$session_toolgroup."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => prepare4display($current_forum['forum_title'])); - $interbreadcrumb[] = array("url"=>"viewthread.php?forum=".Security::remove_XSS($_GET['forum'])."&gradebook=".$gradebook."&thread=".Security::remove_XSS($_GET['thread']),"name" => prepare4display($current_thread['thread_title'])); + $interbreadcrumb[] = array("url"=>"viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&gidReq=".$session_toolgroup."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => Security::remove_XSS($current_forum['forum_title'])); + $interbreadcrumb[] = array("url"=>"viewthread.php?forum=".Security::remove_XSS($_GET['forum'])."&gradebook=".$gradebook."&thread=".Security::remove_XSS($_GET['thread']),"name" => Security::remove_XSS($current_thread['thread_title'])); Display :: display_header(''); api_display_tool_title($nameTools); @@ -87,8 +87,8 @@ if (!empty($_SESSION['toolgroup'])) { require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php'; } else { $interbreadcrumb[]=array("url" => "index.php?gradebook=$gradebook&search=".Security::remove_XSS(urlencode($my_search)),"name" => $nameTools); - $interbreadcrumb[]=array("url" => "viewforumcategory.php?forumcategory=".$current_forum_category['cat_id']."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => prepare4display($current_forum_category['cat_title'])); - $interbreadcrumb[]=array("url" => "viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => prepare4display($current_forum['forum_title'])); + $interbreadcrumb[]=array("url" => "viewforumcategory.php?forumcategory=".$current_forum_category['cat_id']."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => Security::remove_XSS($current_forum_category['cat_title'])); + $interbreadcrumb[]=array("url" => "viewforum.php?forum=".Security::remove_XSS($_GET['forum'])."&origin=".$origin."&search=".Security::remove_XSS(urlencode($my_search)),"name" => Security::remove_XSS($current_forum['forum_title'])); $message = isset($message) ? $message : ''; // the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string Display :: display_header(''); diff --git a/main/forum/viewthread_flat.inc.php b/main/forum/viewthread_flat.inc.php index 162888a480..b92891eb66 100755 --- a/main/forum/viewthread_flat.inc.php +++ b/main/forum/viewthread_flat.inc.php @@ -1,7 +1,8 @@ UI Improvements + lots of bugfixes * @package chamilo.forum */ //delete attachment file @@ -14,7 +15,7 @@ if (isset($current_thread['thread_id'])){ $rows=get_posts($current_thread['thread_id']); $increment=0; foreach ($rows as $row) { - echo ""; + echo '
'; // the style depends on the status of the message: approved or not if ($row['visible']=='0') { $titleclass='forum_message_post_title_2_be_approved'; @@ -108,12 +109,12 @@ if (isset($current_thread['thread_id'])){ $post_image.=icon('../img/forumnotification.gif',get_lang('YouWillBeNotified')); } // The post title - echo ""; + echo ""; echo ""; // The post message echo ""; - echo ""; + echo ""; echo ""; // The check if there is an attachment diff --git a/main/forum/viewthread_nested.inc.php b/main/forum/viewthread_nested.inc.php index 4de01b834a..2de988d31e 100755 --- a/main/forum/viewthread_nested.inc.php +++ b/main/forum/viewthread_nested.inc.php @@ -2,19 +2,17 @@ /* For licensing terms, see /license.txt */ /** -* @Author Patrick Cool , Ghent University -* @Copyright Ghent University -* @Copyright Patrick Cool -* -* @package dokeos.forum +* @author Patrick Cool , Ghent University +* @author Julio Montoya UI Improvements + lots of bugfixes +* @copyright Ghent University +* @package chamilo.forum */ require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; //are we in a lp ? $origin = ''; -if(isset($_GET['origin'])) -{ +if(isset($_GET['origin'])) { $origin = Security::remove_XSS($_GET['origin']); } @@ -41,8 +39,8 @@ foreach ($rows as $post) { $indent=$post['indent_cnt']*'20'; echo "
"; echo "
".prepare4display(Security::remove_XSS($row['post_title'], STUDENT))."".prepare4display($row['post_title'])."
".prepare4display(Security::remove_XSS($row['post_text'], STUDENT))."".prepare4display($row['post_text'])."
"; - echo "\t"; - echo "\t\t"; + echo ""; - echo "\t"; + echo ""; + echo ""; // The post message - echo "\t"; - echo "\t\t"; - echo "\t"; + echo ""; + echo ""; + echo ""; // The check if there is an attachment diff --git a/main/forum/viewthread_threaded.inc.php b/main/forum/viewthread_threaded.inc.php index 3317d00019..130172dcbf 100755 --- a/main/forum/viewthread_threaded.inc.php +++ b/main/forum/viewthread_threaded.inc.php @@ -15,24 +15,12 @@ * - new view option: nested view * - quoting a message * -* @Author Patrick Cool , Ghent University -* @Copyright Ghent University -* @Copyright Patrick Cool +* @author Patrick Cool , Ghent University +* @author Julio Montoya UI Improvements + lots of bugfixes * -* @package dokeos.forum +* @package chamilo.forum */ -/** - ************************************************************************** - * IMPORTANT NOTICE - * Please do not change anything is this code yet because there are still - * some significant code that need to happen and I do not have the time to - * merge files and test it all over again. So for the moment, please do not - * touch the code - * -- Patrick Cool - ************************************************************************** - */ - require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; $rows = get_posts($_GET['thread']); // note: this has to be cleaned first @@ -81,7 +69,7 @@ foreach ($rows as $post) { $thread_structure.= $post_image; if ($_GET['post']==$post['post_id'] OR ($counter==1 AND !isset($_GET['post']))) { - $thread_structure.=''.prepare4display(Security::remove_XSS($post['post_title'],STUDENT)).''; + $thread_structure.=''.prepare4display($post['post_title']).''; $prev_next_array[]=$post['post_id']; } else @@ -95,7 +83,7 @@ foreach ($rows as $post) { $class=''; } $count_loop=($count==0)?'&id=1' : ''; - $thread_structure.= "".prepare4display(Security::remove_XSS($post['post_title'],STUDENT)).""; + $thread_structure.= "".prepare4display($post['post_title']).""; $prev_next_array[]=$post['post_id']; } $count++; @@ -173,16 +161,14 @@ else $leftclass='forum_message_left'; } -// -------------------------------------- // Displaying the message -// -------------------------------------- // we mark the image we are displaying as set unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']][$rows[$display_post_id]['post_id']]); echo "
"; + echo "
"; if ($post['user_id']=='0') { $name=$post['poster_name']; } else { @@ -108,13 +106,13 @@ foreach ($rows as $post) { $post_image.=icon('../img/forumnotification.gif',get_lang('YouWillBeNotified')); } // The post title - echo "\t\t".prepare4display(Security::remove_XSS($post['post_title'], STUDENT))."
".prepare4display($post['post_title'])."
".prepare4display(Security::remove_XSS($post['post_text'], STUDENT))."
".prepare4display($post['post_text'])."
"; -echo "\t"; -echo "\t\t"; +echo ""; -echo "\t"; +echo ""; +echo ""; // The post message -echo "\t"; -echo "\t\t"; -echo "\t"; +echo ""; +echo ""; +echo ""; // The check if there is an attachment $attachment_list = get_attachment($display_post_id); @@ -312,8 +298,6 @@ unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id unset($_SESSION['whatsnew_post_info'][$current_forum['forum_id']][$current_thread['thread_id']][$row['post_id']]); echo "
"; +echo "
"; if ($rows[$display_post_id]['user_id']=='0') { $name=prepare4display($rows[$display_post_id]['poster_name']); } else { @@ -278,13 +264,13 @@ if ($rows[$display_post_id]['post_notification']=='1' AND $rows[$display_post_id $post_image.=icon('../img/forumnotification.gif',get_lang('YouWillBeNotified')); } // The post title -echo "\t\t".prepare4display(Security::remove_XSS($rows[$display_post_id]['post_title'], STUDENT))."
".prepare4display($rows[$display_post_id]['post_title'])."
".prepare4display(Security::remove_XSS($rows[$display_post_id]['post_text'], STUDENT))."
".prepare4display($rows[$display_post_id]['post_text'])."
"; -// -------------------------------------- // Displaying the thread (structure) -// -------------------------------------- echo $thread_structure;