adding platform admin config setting for support svg, wiki: paste as text plain, and load google maps and image map plugins

skala
Juan Carlos Raña 15 years ago
parent ad06f41eb2
commit 04a77f084f
  1. 4
      main/document/document.inc.php
  2. 20
      main/document/document.php
  3. 90
      main/inc/lib/fckeditor/myconfig.php
  4. 8
      main/inc/lib/fckeditor/toolbars/default/wiki.php
  5. 9
      main/inc/lib/fckeditor/toolbars/default/wiki_student.php
  6. 8
      main/inc/lib/fckeditor/toolbars/extended/wiki.php
  7. 8
      main/inc/lib/fckeditor/toolbars/extended/wiki_student.php
  8. 14
      main/install/db_main.sql
  9. 14
      main/install/migrate-db-1.8.7-1.8.8-pre.sql

@ -299,8 +299,8 @@ function build_edit_icons($curdirpath, $type, $path, $visibility, $id, $is_templ
} else {
if ($is_certificate_mode) {
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'&selectcat='.$gradebook_category.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}else {
if($extension=='svg' && api_browser_support('svg')){
}else {
if($extension=='svg' && api_browser_support('svg') && api_get_setting('enabled_support_svg') == 'true'){
$modify_icons = '<a href="edit_drawing.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';
}else{
$modify_icons = '<a href="edit_document.php?'.api_get_cidreq().'&curdirpath='.$curdirpath.'&amp;file='.urlencode($path).$req_gid.'"><img src="../img/edit.gif" border="0" title="'.get_lang('Modify').'" alt="" /></a>';

@ -869,14 +869,18 @@ if ($is_allowed_to_edit || $group_member_with_upload_rights || is_my_shared_fold
<?php Display::display_icon('filenew.gif', get_lang('CreateDoc')); echo get_lang('CreateDoc'); ?></a>&nbsp;
<?php
// Create new draw
if (api_browser_support('svg')){
?>
<a href="create_drawing.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('draw_new.png', get_lang('Draw')); echo get_lang('Draw'); ?></a>&nbsp;
<?php
}else{
Display::display_icon('draw_new.png', get_lang('BrowserDontSupportsSVG')); echo get_lang('Draw').'&nbsp;';
// Create new draw
if (api_get_setting('enabled_support_svg') == 'true'){
if (api_browser_support('svg')){
?>
<a href="create_drawing.php?<?php echo api_get_cidreq(); ?>&dir=<?php echo $curdirpathurl.$req_gid; ?>">
<?php Display::display_icon('draw_new.png', get_lang('Draw')); echo get_lang('Draw'); ?></a>&nbsp;
<?php
}else{
Display::display_icon('draw_new.png', get_lang('BrowserDontSupportsSVG')); echo get_lang('Draw').'&nbsp;';
}
}
}

@ -132,50 +132,50 @@ if ((api_get_setting('youtube_for_students') == 'true')) {
}
// googlemaps : Adds a dilog for inserting Google maps.
$config['LoadPlugin'][] = 'googlemaps';
// API-key for the "googlemaps" plugin.
// The following key is valid for http://localhost (see myconfig.js where this key has been activated by default).
// You must get a new for each server where you intend to use the plugin 'googlemaps'. Just get the key for free after
// agreeing with the Terms of Use of the GoogleMaps API from here: http://www.google.com/apis/maps/signup.html.
// At you choice, you may activate the newly obtained API-key using the following setting or using the same setting in myconfig.js.
// Activated here API-key is not cached by browsers and overrides the key from the configuration file myconfig.js.
//$config['GoogleMaps_Key'] = 'ABQIAAAAlXu5Pw6DFAUgqM2wQn01gxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSy5hTGQdsosYD3dz6faZHVrO-02A';
// mimetex : Adds a dilog for inserting mathematical formulas. In order this plugin to work prpoperly, preliminary changes
// in your server configuration have to be done. The MimeTex executable file has to be installed, see the installation guide.
//
if ((api_get_setting('math_mimetex') == 'true')) {
$config['LoadPlugin'][] = 'mimetex';
if ((api_get_setting('enabled_googlemaps') == 'true')) {
$config['LoadPlugin'][] = 'googlemaps';
// API-key for the "googlemaps" plugin.
// The following key is valid for http://localhost (see myconfig.js where this key has been activated by default).
// You must get a new for each server where you intend to use the plugin 'googlemaps'. Just get the key for free after
// agreeing with the Terms of Use of the GoogleMaps API from here: http://www.google.com/apis/maps/signup.html.
// At you choice, you may activate the newly obtained API-key using the following setting or using the same setting in myconfig.js.
// Activated here API-key is not cached by browsers and overrides the key from the configuration file myconfig.js.
//$config['GoogleMaps_Key'] = 'ABQIAAAAlXu5Pw6DFAUgqM2wQn01gxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSy5hTGQdsosYD3dz6faZHVrO-02A';
}
//
// Some additional settings become active only when the 'mimetex' plugin has been enabled:
//
// The following setting determines whether MimeTeX executable file has been installed on the server or not. This file should be accessible
// for browsers at address http://mysite.com/cgi-bin/mimetex.cgi (Linux) or at address http://mysite.com/cgi-bin/mimetex.exe (Windows).
// How to test manually: Open your browser and enter in the address bar something like http://mysite.com/cgi-bin/mimetex.cgi?hello
// By default, the system tries to detect the MimeTeX executable file automatically.
// If you are sure that the MimeTeX executable has been correctly installed, you may set this option to boolean true value.
$config['MimetexExecutableInstalled'] = 'detect'; // 'detect' (default), true, false
// Sometimes detection fails (due to slow DNS service, security restrictions, ...). For better probability of success,
// the following methods for detection have been defined:
// 'bootstrap_ip' - detection is tried at address like http://127.0.0.1/cgi-bin/mimetex.cgi
// 'localhost' - detection is tried at address like http://localhost/cgi-bin/mimetex.cgi
// 'ip' - detection is tried at ip address, for example http://192.168.0.1/cgi-bin/mimetex.cgi
// 'server_name' - detection is tried at address based on server's name, for example http://mysite.com/cgi-bin/mimetex.cgi
if (IS_WINDOWS_OS) {
$config['MimetexExecutableDetectionMethod'] = 'bootstrap_ip'; // 'bootstrap_ip' for better chance on Windows (no firewall blocking).
} else {
$config['MimetexExecutableDetectionMethod'] = 'server_name';
}
// Timeout for MimeTeX executable file detection - keep this value as low as possible, especially on Windows servers.
$config['MimetexExecutableDetectionTimeout'] = 0.05;
// asciimath : Yet another plugin for inserting mathematical formulas.
// An additional javascript library ASCIIMathML.js has to be inserted within the pages with formulas.
// After enabling it, this plugin is configured to work with full-page html documents out-of-the box.
// You may try it in the "Documents" and "Wiki" tools.
// Browser compatibility: Internet Explorer 6.0+ with MathPlayer plugin, Mozilla Firefox 2.0+, Opera 9.5+
// mimetex : Adds a dilog for inserting mathematical formulas. In order this plugin to work prpoperly, preliminary changes.
if ((api_get_setting('math_mimetex') == 'true')) {
$config['LoadPlugin'][] = 'mimetex';
// in your server configuration have to be done. The MimeTex executable file has to be installed, see the installation guide.
// Some additional settings become active only when the 'mimetex' plugin has been enabled:
//
// The following setting determines whether MimeTeX executable file has been installed on the server or not. This file should be accessible
// for browsers at address http://mysite.com/cgi-bin/mimetex.cgi (Linux) or at address http://mysite.com/cgi-bin/mimetex.exe (Windows).
// How to test manually: Open your browser and enter in the address bar something like http://mysite.com/cgi-bin/mimetex.cgi?hello
// By default, the system tries to detect the MimeTeX executable file automatically.
// If you are sure that the MimeTeX executable has been correctly installed, you may set this option to boolean true value.
$config['MimetexExecutableInstalled'] = 'detect'; // 'detect' (default), true, false
// Sometimes detection fails (due to slow DNS service, security restrictions, ...). For better probability of success,
// the following methods for detection have been defined:
// 'bootstrap_ip' - detection is tried at address like http://127.0.0.1/cgi-bin/mimetex.cgi
// 'localhost' - detection is tried at address like http://localhost/cgi-bin/mimetex.cgi
// 'ip' - detection is tried at ip address, for example http://192.168.0.1/cgi-bin/mimetex.cgi
// 'server_name' - detection is tried at address based on server's name, for example http://mysite.com/cgi-bin/mimetex.cgi
if (IS_WINDOWS_OS) {
$config['MimetexExecutableDetectionMethod'] = 'bootstrap_ip'; // 'bootstrap_ip' for better chance on Windows (no firewall blocking).
} else {
$config['MimetexExecutableDetectionMethod'] = 'server_name';
}
// Timeout for MimeTeX executable file detection - keep this value as low as possible, especially on Windows servers.
$config['MimetexExecutableDetectionTimeout'] = 0.05;
// asciimath : Yet another plugin for inserting mathematical formulas.
// An additional javascript library ASCIIMathML.js has to be inserted within the pages with formulas.
// After enabling it, this plugin is configured to work with full-page html documents out-of-the box.
// You may try it in the "Documents" and "Wiki" tools.
// Browser compatibility: Internet Explorer 6.0+ with MathPlayer plugin, Mozilla Firefox 2.0+, Opera 9.5+
}
if ((api_get_setting('math_asciimathML') == 'true')) {
$config['LoadPlugin'][] = 'asciimath';
@ -189,12 +189,14 @@ if ((api_get_setting('enabled_wiris') == 'true')) {
$config['LoadPlugin'][] = 'fckeditor_wiris';
}
// imgmap : Adds a dialog for assigning hyperlinks to specified image areas.
if ((api_get_setting('enabled_imgmap') == 'true')) {
$config['LoadPlugin'][] = 'imgmap';
}
// wikilink : Adds a dialog for inserting wiki-formatted links.
$config['LoadPlugin'][] = 'wikilink';
// imgmap : Adds a dialog for assigning hyperlinks to specified image areas.
$config['LoadPlugin'][] = 'imgmap';
/*
* File manager.

@ -53,8 +53,12 @@ $config['ToolbarSets']['Maximized'] = array(
//$config['BlockCopyPaste'] = false;
// A setting for force paste as plain text.
// Possible values: true , false
$config['ForcePasteAsPlainText'] = true;
if ((api_get_setting('force_wiki_paste_as_plain_text') == 'true')) {
$config['ForcePasteAsPlainText'] = true;
}
else{
$config['ForcePasteAsPlainText'] = false;
}
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...

@ -45,8 +45,13 @@ $config['ToolbarSets']['Maximized'] = array(
//$config['BlockCopyPaste'] = true;
// A setting for force paste as plain text.
// Possible values: true , false
$config['ForcePasteAsPlainText'] = true;
// A setting for force paste as plain text.
if ((api_get_setting('force_wiki_paste_as_plain_text') == 'true')) {
$config['ForcePasteAsPlainText'] = true;
}
else{
$config['ForcePasteAsPlainText'] = false;
}
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...

@ -57,8 +57,12 @@ $config['ToolbarSets']['Maximized'] = array(
//$config['BlockCopyPaste'] = false;
// A setting for force paste as plain text.
// Possible values: true , false
$config['ForcePasteAsPlainText'] = true;
if ((api_get_setting('force_wiki_paste_as_plain_text') == 'true')) {
$config['ForcePasteAsPlainText'] = true;
}
else{
$config['ForcePasteAsPlainText'] = false;
}
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...

@ -57,8 +57,12 @@ $config['ToolbarSets']['Maximized'] = array(
//$config['BlockCopyPaste'] = true;
// A setting for force paste as plain text.
// Possible values: true , false
$config['ForcePasteAsPlainText'] = true;
if ((api_get_setting('force_wiki_paste_as_plain_text') == 'true')) {
$config['ForcePasteAsPlainText'] = true;
}
else{
$config['ForcePasteAsPlainText'] = false;
}
// Here new width and height of the editor may be set.
// Possible values, examples: 300 , '250' , '100%' , ...

@ -773,6 +773,10 @@ VALUES
('sso_authentication_protocol',NULL,'radio','Security','http://','SSOServerProtocolTitle','SSOServerProtocolComment',NULL,NULL,1),
('enabled_wiris',NULL,'radio','Editor','false','EnabledWirisTitle','EnabledWirisComment',NULL,NULL, 0),
('allow_spellcheck',NULL,'radio','Editor','false','AllowSpellCheckTitle','AllowSpellCheckComment',NULL,NULL, 0),
('force_wiki_paste_as_plain_text',NULL,'radio','Editor','true','ForceWikiPasteAsPlainTextTitle','ForceWikiPasteAsPlainTextComment',NULL,NULL, 0),
('enabled_googlemaps',NULL,'radio','Editor','true','EnabledGooglemapsTitle','EnabledGooglemapsComment',NULL,NULL, 0),
('enabled_imgmap',NULL,'radio','Editor','true','EnabledImageMapsTitle','EnabledImageMapsComment',NULL,NULL, 0),
('enabled_support_svg',NULL,'radio','Tools','true','EnabledSVGTitle','EnabledSVGComment',NULL,NULL, 0),
('chamilo_database_version', NULL, 'textfield', NULL, '1.8.8.12885', 'DokeosDatabaseVersion', '', NULL, NULL, 0);
@ -999,7 +1003,15 @@ VALUES
('enabled_wiris','true','Yes'),
('enabled_wiris','false','No'),
('allow_spellcheck','true','Yes'),
('allow_spellcheck','false','No');
('allow_spellcheck','false','No'),
('force_wiki_paste_as_plain_text','true','Yes'),
('force_wiki_paste_as_plain_text','false','No'),
('enabled_googlemaps','true','Yes'),
('enabled_googlemaps','false','No'),
('enabled_imgmap','true','Yes'),
('enabled_imgmap','false','No'),
('enabled_support_svg','true','Yes'),
('enabled_support_svg','false','No');
UNLOCK TABLES;

@ -50,16 +50,26 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('sso_authen
INSERT INTO settings_options (variable, value, display_text) VALUES ('sso_authentication', 'false', 'No');
INSERT INTO settings_options (variable, value, display_text) VALUES ('sso_authentication_protocol', 'http://', 'http://');
INSERT INTO settings_options (variable, value, display_text) VALUES ('sso_authentication_protocol', 'https://', 'https://');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_wiris',NULL,'radio','Editor','false','EnabledWirisTitle','EnabledWirisComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_wiris', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_spellcheck',NULL,'radio','Editor','false','AllowSpellCheckTitle','AllowSpellCheckComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_spellcheck', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_spellcheck', 'false', 'No');
ALTER TABLE course ADD INDEX idx_course_category_code (category_code);
ALTER TABLE course ADD INDEX idx_course_directory (directory(10));
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('force_wiki_paste_as_plain_text',NULL,'radio','Editor','true','ForceWikiPasteAsPlainText','ForceWikiPasteAsPlainTextComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('force_wiki_paste_as_plain_text', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('force_wiki_paste_as_plain_text', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_googlemaps',NULL,'radio','Editor','true','EnabledGooglemapsTitle','EnabledGooglemapsComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_googlemaps', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_googlemaps', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_imgmap',NULL,'radio','Editor','true','EnabledImageMapsTitle','EnabledImageMapsComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_imgmap', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_imgmap', 'false', 'No');
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_support_svg',NULL,'radio','Editor','true','EnabledSVGTitle','EnabledSVGComment',NULL,NULL, 0);
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_svg', 'true', 'Yes');
INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_support_svg', 'false', 'No');
-- xxSTATSxx
ALTER TABLE track_e_exercices ADD COLUMN orig_lp_item_view_id INT NOT NULL DEFAULT 0;

Loading…
Cancel
Save