[svn r22098] FS#2867 - The "Wiki" tool: Eliminating the global variable $fck_attribute.

skala
Ivan Tcholakov 16 years ago
parent a9d6827e8c
commit ccf7bd67d1
  1. 2
      main/inc/lib/fckeditor/toolbars/wiki.php
  2. 2
      main/inc/lib/fckeditor/toolbars/wiki_student.php
  3. 2
      main/messages/message.class.php
  4. 22
      main/wiki/index.php
  5. 5
      main/wiki/wiki.inc.php

@ -44,4 +44,4 @@ $config['ToolbarSets']['Maximized'] = array(
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';
//$config['Height'] = '400';

@ -44,4 +44,4 @@ $config['BlockCopyPaste'] = true;
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...
//$config['Width'] = '100%';
//$config['Height'] = '300';
//$config['Height'] = '400';

@ -71,7 +71,7 @@ class MessageManager
* Displays the wysiwyg html editor.
*/
public static function display_html_editor_area($name, $resp) {
api_disp_html_area($name, get_lang('TypeYourMessage'), '', '100%', null, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
api_disp_html_area($name, get_lang('TypeYourMessage'), '', '', null, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
}
/**

@ -168,23 +168,6 @@ MAIN CODE
// Tool introduction
Display::display_introduction_section(TOOL_WIKI);
/*
-----------------------------------------------------------
Wiki configuration settings
-----------------------------------------------------------
*/
$fck_attribute['Width'] = '100%';
$fck_attribute['Height'] = '400';
if(!api_is_allowed_to_edit())
{
$fck_attribute['Config']['UserStatus'] = 'student';
$fck_attribute['ToolbarSet'] = 'Wiki_Student';
}
else
{
$fck_attribute['ToolbarSet'] = 'Wiki';
}
/*
-----------------------------------------------------------
@ -1349,7 +1332,10 @@ if ($_GET['action']=='edit')
echo '<input type="hidden" name="reflink" value="'.$page.'">';
echo '<input type="hidden" name="title" value="'.stripslashes($title).'">';
api_disp_html_area('content',stripslashes($content),'300px');
api_disp_html_area('content', stripslashes($content), '', '', null, api_is_allowed_to_edit()
? array('ToolbarSet' => 'Wiki', 'Width' => '100%', 'Height' => '400')
: array('ToolbarSet' => 'Wiki_Student', 'Width' => '100%', 'Height' => '400', 'UserStatus' => 'student')
);
echo '<br/>';
echo '<br/>';
//if(api_is_allowed_to_edit() || api_is_platform_admin()) //off for now

@ -490,7 +490,10 @@ function display_new_wiki_form()
}
echo '</div>';
echo '<div id="wikicontent">';
api_disp_html_area('content','','300px');
api_disp_html_area('content', '', '', '', null, api_is_allowed_to_edit()
? array('ToolbarSet' => 'Wiki', 'Width' => '100%', 'Height' => '400')
: array('ToolbarSet' => 'Wiki_Student', 'Width' => '100%', 'Height' => '400', 'UserStatus' => 'student')
);
echo '<br/>';
echo '<br/>';
echo get_lang('Comments').':&nbsp;&nbsp;<input type="text" name="comment" value="'.stripslashes($row['comment']).'"><br /><br />';

Loading…
Cancel
Save