Adding Forum Categories var lang

skala
Julio Montoya 15 years ago
parent 27ef1003e4
commit 2a12222ea0
  1. 13
      main/forum/index.php
  2. 2
      main/forum/newthread.php
  3. 10
      main/forum/viewforum.php
  4. 14
      main/forum/viewforumcategory.php
  5. 4
      main/forum/viewthread.php

@ -29,12 +29,12 @@ $language_file = 'forum';
// Including the global initialization file.
require_once '../inc/global.inc.php';
$htmlHeadXtra[] = '<script type="text/javascript" language="javascript">
$(document).ready(function(){ $(\'.hide-me\').slideUp() });
function hidecontent(content){ $(content).slideToggle(\'normal\'); }
</script>';
$htmlHeadXtra[] = '<script type="text/javascript" language="javascript">
function advanced_parameters() {
if(document.getElementById(\'options\').style.display == \'none\') {
document.getElementById(\'options\').style.display = \'block\';
@ -83,22 +83,21 @@ if (!empty($gradebook) && $gradebook == 'view') {
$search_forum = isset($_GET['search']) ? Security::remove_XSS($_GET['search']) : '';
if (isset($_GET['action']) && $_GET['action'] == 'add') {
switch ($_GET['content']) {
case 'forum':
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.$search_forum, 'name' => $nameTools);
$interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=add&amp;content=forum', 'name' => get_lang('AddForum'));
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.$search_forum, 'name' => get_lang('ForumCategories'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('AddForum'));
break;
case 'forumcategory':
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.$search_forum, 'name' => $nameTools);
$interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq().'&amp;gradebook='.$gradebook.'&amp;action=add&amp;content=forumcategory', 'name' => get_lang('AddForumCategory'));
$interbreadcrumb[] = array('url' =>'index.php?gradebook='.$gradebook.'&amp;search='.$search_forum, 'name' => get_lang('ForumCategories'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('AddForumCategory'));
break;
default:
break;
}
} else {
$interbreadcrumb[] = array('url' => '#', 'name' => $nameTools);
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ForumCategories'));
}
Display::display_header('');

@ -31,7 +31,7 @@ require_once '../inc/global.inc.php';
require_once '../gradebook/lib/gradebook_functions.inc.php';
// The section (tabs).
$this_section=SECTION_COURSES;
$this_section = SECTION_COURSES;
// Notification for unauthorized people.
api_protect_course_script(true);

@ -52,7 +52,7 @@ if (isset($_GET['origin'])) {
require 'forumconfig.inc.php';
require_once 'forumfunction.inc.php';
$userid = api_get_user_id();
$userid = api_get_user_id();
$userinf = api_get_user_info($userid);
/* MAIN DISPLAY SECTION */
@ -106,17 +106,11 @@ if ($origin == 'group') {
$group_properties = GroupManager :: get_group_properties($_clean['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' => 'index.php?search='.Security::remove_XSS($my_search), 'name' => $nameTools);
//$interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;search='.Security::remove_XSS(urlencode($my_search)), 'name' => prepare4display($current_forum_category['cat_title']));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Forum').' '.Security::remove_XSS($current_forum['forum_title']));
//viewforum.php?forum=".Security::remove_XSS($my_forum)."&amp;origin=".$origin."&amp;gidReq=".$_SESSION['toolgroup']."&amp;search=".Security::remove_XSS(urlencode($my_search)),
} else {
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS($my_search), 'name' => $nameTools);
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS($my_search), 'name' => get_lang('ForumCategories'));
$interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;search='.Security::remove_XSS(urlencode($my_search)), 'name' => prepare4display($current_forum_category['cat_title']));
$interbreadcrumb[] = array('url' => '#', 'name' => Security::remove_XSS($current_forum['forum_title']));
//viewforum.php?forum=".Security::remove_XSS($my_forum)."&amp;origin=".$origin."&amp;search=".Security::remove_XSS(urlencode($my_search))
}
if ($origin == 'learnpath') {

@ -77,13 +77,16 @@ if (!empty($gradebook) && $gradebook == 'view') {
}
$current_forum_category = get_forum_categories($_GET['forumcategory']);
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS(urlencode(isset($_GET['search'])?$_GET['search']:'')),'name' => $nameTools);
$interbreadcrumb[] = array('url' => 'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;origin='.$origin.'&amp;search='.Security::remove_XSS(urlencode(isset($_GET['search'])?$_GET['search']:'')),'name' => prepare4display($current_forum_category['cat_title']));
$interbreadcrumb[] = array('url' => 'index.php?gradebook='.$gradebook.'&amp;search='.Security::remove_XSS(urlencode(isset($_GET['search'])?$_GET['search']:'')),'name' => get_lang('ForumCategories'));
if (!empty($_GET['action']) && !empty($_GET['content'])) {
if ($_GET['action']=='add' && $_GET['content']=='forum' ) {
$interbreadcrumb[] = array ('url' => api_get_self().'?'.api_get_cidreq().'&amp;action=add&amp;content=forum', 'name' => get_lang('AddForum'));
$interbreadcrumb[] = array('url' =>'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id'].'&amp;origin='.$origin,'name' => $current_forum_category['cat_title']);
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('AddForum'));
}
} else {
$interbreadcrumb[] = array('url' => '#','name' => $current_forum_category['cat_title']);
}
// Are we in a lp ?
@ -96,7 +99,6 @@ if ($origin=='learnpath') {
require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
} else {
Display :: display_header(null);
//api_display_tool_title($nameTools);
}
/* ACTIONS */
@ -120,9 +122,7 @@ echo '<div class="actions">';
echo '<span style="float:right;">'.search_link().'</span>';
echo '<a href="index.php?gradebook='.$gradebook.'">'.Display::return_icon('back.png', get_lang('BackToForumOverview'), '', '32').'</a>';
if (api_is_allowed_to_edit(false,true)) {
//echo '<a href="'.api_get_self().'?forumcategory='.$_GET['forumcategory'].'&amp;action=add&amp;content=forumcategory">'.get_lang('AddForumCategory').'</a> | ';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=add&amp;content=forum"> '.Display::return_icon('new_forum.png', get_lang('AddForum'),'','32').'</a>';
//echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;forumcategory='.Security::remove_XSS($_GET['forumcategory']).'&amp;action=add&amp;content=forum">'.Display::return_icon('new_forum.png', get_lang('AddForum'),'','32').'</a>';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='.$current_forum_category['cat_id'].'&amp;action=add&amp;content=forum"> '.Display::return_icon('new_forum.png', get_lang('AddForum'),'','32').'</a>';
}
echo '</div>';

@ -25,7 +25,7 @@ require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once 'forumconfig.inc.php';
require_once 'forumfunction.inc.php';
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('ForumCategories');
// Are we in a lp ?
$origin = '';
@ -140,7 +140,7 @@ if ($my_message != 'PostDeletedSpecial') {
echo '<a href="index.php?gradebook='.$gradebook.'">'.Display::return_icon('back.png', get_lang('BackToForumOverview'), '', '32').'</a>';
echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'&amp;gidReq='.$session_toolgroup.'">'.Display::return_icon('forum.png', get_lang('BackToForum'), '', '32').'</a>';
}*/
echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'&amp;gidReq='.$session_toolgroup.'">'.Display::return_icon('back.png', get_lang('BackToForum'), '', '32').'</a>';
echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'&amp;gidReq='.$session_toolgroup.'&amp;origin='.$origin.'">'.Display::return_icon('back.png', get_lang('BackToForum'), '', '32').'</a>';
}
// The reply to thread link should only appear when the forum_category is not locked AND the forum is not locked AND the thread is not locked.

Loading…
Cancel
Save