From 637316f69eb16f2e5f5d44afcca2d53b67f35a89 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 2 Jun 2011 19:22:56 +0200 Subject: [PATCH] Improving forum title --- main/css/base_chamilo.css | 17 ++++++++--------- main/forum/forumfunction.inc.php | 4 +++- main/forum/forumsearch.php | 3 ++- main/forum/index.php | 14 ++++++++++---- main/forum/reply.php | 1 - main/forum/viewthread_flat.inc.php | 19 +++++++++---------- 6 files changed, 32 insertions(+), 26 deletions(-) diff --git a/main/css/base_chamilo.css b/main/css/base_chamilo.css index 2c06b540dc..2e2da308f5 100644 --- a/main/css/base_chamilo.css +++ b/main/css/base_chamilo.css @@ -810,7 +810,6 @@ input.liteoption { border: 2px solid #f00; } - #courseintro { clear: both; width: 80%; @@ -1310,6 +1309,7 @@ tr.forum_threadheader td { font-weight: bold; background-color: #F7F7F7; height: 20px; + font-size:20px; } .forum_message_post_title_2_be_approved { /*border-bottom: 1px solid #666666;*/ @@ -2877,9 +2877,9 @@ span.form_required { border-collapse: collapse; width: 100%; padding: 5px; - border-left: 1px solid gray; - border-top: 1px solid gray; - border-right: 1px solid gray; + border-left: 1px solid #ccc; + border-top: 1px solid #ccc; + border-right: 1px solid #ccc; padding:5px; } @@ -2894,7 +2894,7 @@ span.form_required { border-collapse: collapse; width: 100%; padding: 5px; - border: 1px solid gray; + border: 1px solid #ccc; margin-bottom:15px; } @@ -2902,12 +2902,10 @@ span.form_required { padding:5px; text-align: left; font-size:14px; - } .forum_table th { padding-right: 12px; - /*border: 1px solid gray;*/ background-color: #E5EDF9; } .forum_table tr.row_odd { @@ -2922,13 +2920,14 @@ span.form_required { .forum_table td { padding: 5px; vertical-align: top; - border-bottom: 1px solid #b0b0b0; + border-bottom: 1px solid #ccc; border-right: 1px dotted #e1e1e1; border-left: 1px dotted #e1e1e1; + border-top: 1px solid #ccc; } .post { - border: 1px solid gray; + border: 1px solid #ccc; margin-bottom:5px; } diff --git a/main/forum/forumfunction.inc.php b/main/forum/forumfunction.inc.php index 5060202c6a..55559ed15a 100755 --- a/main/forum/forumfunction.inc.php +++ b/main/forum/forumfunction.inc.php @@ -3398,7 +3398,9 @@ function search_link() { $return = ''; if ($origin != 'learnpath') { - $return = ' '.Display::return_icon('search.png', get_lang('Search'),'','32').''; + $return = ' '; + $return .= Display::return_icon('search.png', get_lang('Search'),'','32').''; + if (!empty($_GET['search'])) { $return .= ': '.Security::remove_XSS($_GET['search']).' '; $url = api_get_self().'?'; diff --git a/main/forum/forumsearch.php b/main/forum/forumsearch.php index ea3f6360b7..516df2a638 100755 --- a/main/forum/forumsearch.php +++ b/main/forum/forumsearch.php @@ -75,7 +75,8 @@ if ($origin == 'group') { $interbreadcrumb[] = array('url' => 'forumsearch.php','name' => get_lang('ForumSearch')); } else { $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'', 'name' => $nameTools); - $interbreadcrumb[] = array('url' => 'forumsearch.php', 'name' => get_lang('ForumSearch')); + //$interbreadcrumb[] = array('url' => 'forumsearch.php', 'name' => ); + $nameTools = get_lang('ForumSearch'); } // Display the header. diff --git a/main/forum/index.php b/main/forum/index.php index 64c9d82fb4..e2999972ff 100755 --- a/main/forum/index.php +++ b/main/forum/index.php @@ -80,19 +80,23 @@ if (!empty($gradebook) && $gradebook == 'view') { } $search_forum = isset($_GET['search']) ? Security::remove_XSS($_GET['search']) : ''; -$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&search='.$search_forum, 'name' => $nameTools); + if (isset($_GET['action']) && $_GET['action'] == 'add') { switch ($_GET['content']) { case 'forum': + $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&search='.$search_forum, 'name' => $nameTools); $interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=add&content=forum', 'name' => get_lang('AddForum')); break; case 'forumcategory': + $interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&search='.$search_forum, 'name' => $nameTools); $interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=add&content=forumcategory', 'name' => get_lang('AddForumCategory')); break; - default: + default: break; } +} else { + $interbreadcrumb[] = array('url' => '#', 'name' => $nameTools); } Display::display_header(''); @@ -182,13 +186,15 @@ echo '
'; if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])){ echo "".Display::return_icon('back.png', get_lang("BackTo").' '.get_lang("LearningPaths"),'','32').""; } -echo ''.search_link().''; +if (!empty($forum_list)) { + echo search_link(); +} + if (api_is_allowed_to_edit(false, true)) { echo ' '.Display::return_icon('new_folder.png', get_lang('AddForumCategory'),'','32').''; if (is_array($forum_categories_list) and !empty($forum_categories_list)) { echo ' '.Display::return_icon('new_forum.png', get_lang('AddForum'),'','32').''; } - //echo ' | '.get_lang('MigrateForum').''; } echo '
'; diff --git a/main/forum/reply.php b/main/forum/reply.php index f21871bc5f..92b22d87da 100755 --- a/main/forum/reply.php +++ b/main/forum/reply.php @@ -115,7 +115,6 @@ if ($origin == 'learnpath') { } else { // The last element of the breadcrumb navigation is already set in interbreadcrumb, so give an empty string. Display :: display_header(''); - api_display_tool_title($nameTools); } /* Is the user allowed here? */ diff --git a/main/forum/viewthread_flat.inc.php b/main/forum/viewthread_flat.inc.php index 2717a16c3f..67084d8d0f 100755 --- a/main/forum/viewthread_flat.inc.php +++ b/main/forum/viewthread_flat.inc.php @@ -30,16 +30,9 @@ if (isset($current_thread['thread_id'])){ $messageclass='forum_message_post_text'; $leftclass='forum_message_left'; } - - echo ''; - echo ''; - echo ''.prepare4display($row['post_title']).""; - echo ''; - echo ''; - echo ""; - //echo ""; - echo ""; + echo ""; + if ($row['user_id']=='0') { $name=prepare4display($row['poster_name']); } else { @@ -123,9 +116,15 @@ if (isset($current_thread['thread_id'])){ // The post title echo ""; - + + // The post title + echo ""; + echo Display::tag('td', prepare4display($row['post_title']), array('class'=>'forum_message_post_title')); + echo ""; + // The post message echo ""; + // see comments inside forumfunction.inc.php to lower filtering and allow more visual changes echo "".prepare4display($row['post_text']).""; echo "";