1/* 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben 4 * 5 * == BEGIN LICENSE == 6 * 7 * Licensed under the terms of any of the following licenses at your 8 * choice: 9 * 10 * - GNU General Public License Version 2 or later (the "GPL") 11 * http://www.gnu.org/licenses/gpl.html 12 * 13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 14 * http://www.gnu.org/licenses/lgpl.html 15 * 16 * - Mozilla Public License Version 1.1 or later (the "MPL") 17 * http://www.mozilla.org/MPL/MPL-1.1.html 18 * 19 * == END LICENSE == 20 * 21 * Editor configuration settings. 22 * 23 * Follow this link for more information: 24 * http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings 25 */ 26 27function test_cookie(name, value) { 28 var allcookies = document.cookie; 29 var pos = allcookies.indexOf(name); 30 if(pos != -1) { 31 var start = pos + (name.length+1); 32 var end = allcookies.indexOf(";",start); 33 if(end == -1) end = allcookies.length; 34 var cookie_value = allcookies.substring(start,end); 35 cookie_value=decodeURIComponent(cookie_value); 36 if(value) return (cookie_value == value); 37 return cookie_value; 38 } 39 return false; 40} 41 42var AdminSelectedSpellChecker = 'SpellerPages'; 43if(test_cookie('SCAYT', 'on')) { 44 AdminSelectedSpellChecker = 'SCAYT'; 45 if(test_cookie('FCK_SCAYT_AUTO', 'on')) { 46 FCKConfig.ScaytAutoStartup = true; 47 } 48 AdminSelectedLang = test_cookie('FCK_SCAYT_LANG'); 49 if(AdminSelectedLang) { 50 FCK.Config.ScaytDefLang = AdminSelectedLang; 51 } 52} 53 54FCKConfig.CustomConfigurationsPath = '' ; 55 56FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; 57FCKConfig.EditorAreaIEHackCSS = FCKConfig.BasePath + 'css/ie_hack.css' ; 58FCKConfig.EditorAreaStyles = '' ; 59FCKConfig.ToolbarComboPreviewCSS = '' ; 60 61FCKConfig.DocType = '' ; 62 63FCKConfig.BaseHref = '' ; 64 65FCKConfig.FullPage = false ; 66 67// The following option determines whether the "Show Blocks" feature is enabled or not at startup. 68FCKConfig.StartupShowBlocks = false ; 69 70FCKConfig.Debug = false ; 71FCKConfig.AllowQueryStringDebug = true ; 72 73FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/silver/' ; 74 75FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; 76FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ; 77FCKConfig.fckgRTLCSS=FCKConfig.BasePath + 'css/fck_editorarea_RTL.css'; 78//alert(FCKConfig.fckgRTLCSS); 79FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ; 80 81FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ; 82 83FCKConfig.AutoGrowMax = 400 ; 84 85// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%> 86// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code 87// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control> 88 89FCKConfig.AutoDetectLanguage = true ; 90FCKConfig.DefaultLanguage = 'en' ; 91if(top.fckg_isRTL() ) { 92 FCKConfig.ContentLangDirection = 'rtl' 93 FCKConfig.EditorAreaCSS = FCKConfig.fckgRTLCSS; 94} 95else { 96 FCKConfig.ContentLangDirection = 'ltr' 97} 98FCKConfig.ProcessHTMLEntities = true ; 99FCKConfig.IncludeLatinEntities = true ; 100FCKConfig.IncludeGreekEntities = true ; 101 102FCKConfig.ProcessNumericEntities = false ; 103 104FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'" 105 106FCKConfig.FillEmptyBlocks = true ; 107 108FCKConfig.FormatSource = true ; 109FCKConfig.FormatOutput = true ; 110FCKConfig.FormatIndentator = ' ' ; 111 112FCKConfig.EMailProtection = 'none' ; // none | encode | function 113FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ; 114 115//FCKConfig.GeckoUseSPAN = false ; 116FCKConfig.StartupFocus = false ; 117FCKConfig.ForcePasteAsPlainText = false ; 118FCKConfig.AutoDetectPasteFromWord = true ; // IE only. 119FCKConfig.ShowDropDialog = true ; 120FCKConfig.ForceSimpleAmpersand = false ; 121FCKConfig.TabSpaces = 0 ; 122FCKConfig.ShowBorders = true ; 123FCKConfig.SourcePopup = true ; 124FCKConfig.ToolbarStartExpanded = true ; 125FCKConfig.ToolbarCanCollapse = true ; 126FCKConfig.IgnoreEmptyParagraphValue = true ; 127//FCKConfig.PreserveSessionOnFileBrowser = false ; 128FCKConfig.FloatingPanelsZIndex = 10000 ; 129FCKConfig.HtmlEncodeOutput = false ; 130 131FCKConfig.TemplateReplaceAll = true ; 132FCKConfig.TemplateReplaceCheckbox = true ; 133 134FCKConfig.ToolbarLocation = 'In' ; 135 136 137FCKConfig.Plugins.Add('tableformat') ; 138FCKConfig.Plugins.Add('plugintool', 'en,fr,nl') ; 139FCKConfig.Plugins.Add( 'paradelete' ) ; 140FCKConfig.Plugins.Add( 'range' ) ; 141FCKConfig.Plugins.Add( 'insertHtmlCode') ; // this is the footnote plugin 142FCKConfig.Plugins.Add( 'geshi') ; 143FCKConfig.Plugins.Add( 'fonts', 'en,nl') ; 144FCKConfig.Plugins.Add('keyboard') ; 145FCKConfig.Plugins.Add('signature') ; 146 147FCKConfig.ToolbarSets["Default"] = [ 148 ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'], 149 ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], 150 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 151 ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'], 152 '/', 153 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], 154 ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'], 155 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], 156 ['Link','Unlink','Anchor'], 157 ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], 158 '/', 159 ['Style','FontFormat','FontName','FontSize'], 160 ['TextColor','BGColor'], 161 ['FitWindow','ShowBlocks','-','About'] // No comma for the last row. 162] ; 163 164FCKConfig.ToolbarSets["Basic"] = [ 165 ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About'] 166] ; 167 168FCKConfig.EnterMode = 'p' ; // p | div | br 169FCKConfig.ShiftEnterMode = 'br' ; // p | div | br 170 171FCKConfig.Keystrokes = [ 172 [ CTRL + 65 /*A*/, true ], 173 [ CTRL + 67 /*C*/, true ], 174 [ CTRL + 70 /*F*/, true ], 175 [ CTRL + 83 /*S*/, true ], 176 [ CTRL + 84 /*T*/, true ], 177 [ CTRL + 88 /*X*/, true ], 178 [ CTRL + 86 /*V*/, 'Paste' ], 179 [ CTRL + 45 /*INS*/, true ], 180 [ SHIFT + 45 /*INS*/, 'Paste' ], 181 [ CTRL + 88 /*X*/, 'Cut' ], 182 [ SHIFT + 46 /*DEL*/, 'Cut' ], 183 [ CTRL + 90 /*Z*/, 'Undo' ], 184 [ CTRL + 89 /*Y*/, 'Redo' ], 185 [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ], 186 [ CTRL + 76 /*L*/, 'Link' ], 187 [ CTRL + 66 /*B*/, 'Bold' ], 188 [ CTRL + 73 /*I*/, 'Italic' ], 189 [ CTRL + 85 /*U*/, 'Underline' ], 190 [ CTRL + SHIFT + 83 /*S*/, 'Save' ], 191 [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ], 192 [ SHIFT + 32 /*SPACE*/, 'Nbsp' ] 193] ; 194 195FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','Table','Form'] ; 196FCKConfig.BrowserContextMenuOnCtrl = false ; 197FCKConfig.BrowserContextMenu = false ; 198 199FCKConfig.EnableMoreFontColors = true ; 200FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ; 201 202FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5'; // code 203FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana;Gill Sans,Gill Sans MT,Arial;Copperplate Gothic Light,CopperplateLight;Baskerville,Baskerville Old Face;Lucida Bright;Palatino, Palatino Linotype;Garamond'; 204 205//FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ; 206FCKConfig.FontSizes = '6pt;8pt;9pt;10pt;11pt;12pt;14pt;16pt;18pt;24pt;36pt' ; 207 208FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ; 209FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ; 210 211//FCKConfig.SpellChecker = 'SCAYT' ;//'SpellerPages'; // = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' 212FCKConfig.SpellChecker = AdminSelectedSpellChecker; 213//FCKConfig.ScaytAutoStartup = true; 214FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ; 215FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl 216FCKConfig.FirefoxSpellChecker = false ; 217 218FCKConfig.MaxUndoLevels = 15 ; 219 220FCKConfig.DisableObjectResizing = false ; 221FCKConfig.DisableFFTableHandles = true ; 222 223FCKConfig.LinkDlgHideTarget = false ; 224FCKConfig.LinkDlgHideAdvanced = false ; 225 226FCKConfig.ImageDlgHideLink = false ; 227FCKConfig.ImageDlgHideAdvanced = false ; 228 229FCKConfig.FlashDlgHideAdvanced = false ; 230 231// Tags for DokuWikiFCK 232FCKConfig.ProtectedTags = 'indent' ; 233FCKConfig.ProtectedTags = 'header' ; 234FCKConfig.ProtectedTags = 'plugin' ; 235FCKConfig.ProtectedTags = 'fckg' ; 236//FCKConfig.ProtectedTags = 'font' ; 237 238// This will be applied to the body element of the editor 239FCKConfig.BodyId = '' ; 240FCKConfig.BodyClass = '' ; 241 242FCKConfig.DefaultStyleLabel = '' ; 243FCKConfig.DefaultFontFormatLabel = '' ; 244FCKConfig.DefaultFontLabel = '' ; 245FCKConfig.DefaultFontSizeLabel = '' ; 246 247FCKConfig.DefaultLinkTarget = '' ; 248 249// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word 250FCKConfig.CleanWordKeepsStructure = false ; 251 252// Only inline elements are valid. 253FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ; 254 255// Attributes that will be removed 256//FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ; 257FCKConfig.RemoveAttributes = 'lang,width,height,align,hspace,valign' ; 258 259FCKConfig.CustomStyles = 260{ 261// 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } } 262}; 263 264FCKConfig.FontNamesArray = Array( 265'Arial', 266'Arial Black', 267'Arial Narrow', 268'Arial Rounded MT Bold', 269'Baskerville, Baskerville Old Face', 270'Bauhaus 93', 271'Comic Sans MS', 272'Copperplate, Copperplate Gothic Bold', 273'Courier', 274'Courier New', 275'Futura, Futura Md BT', 276'Georgia', 277'Garamond', 278'Helvetica', 279'Impact', 280'Sans-serif', 281'Microsoft Sans Serif', 282'Serif', 283'Palatino, Palatino Linotype', 284'Papyrus', 285'Tahoma', 286'Times New Roman', 287'Trebuchet MS', 288'Verdana' 289); 290 291// Do not add, rename or remove styles here. Only apply definition changes. 292FCKConfig.CoreStyles = 293{ 294 // Basic Inline Styles. 295 'Bold' : { Element : 'b', Overrides : 'strong' }, 296 'Italic' : { Element : 'i', Overrides : 'em' }, 297 'Underline' : { Element : 'u' }, 298 'StrikeThrough' : { Element : 'strike' }, 299 'Subscript' : { Element : 'sub' }, 300 'Superscript' : { Element : 'sup' }, 301 302 303 // Basic Block Styles (Font Format Combo). 304 'p' : { Element : 'p' }, 305 'div' : { Element : 'div' }, 306 'pre' : { Element : 'pre' }, 307 'address' : { Element : 'address' }, 308 'h1' : { Element : 'h1' }, 309 'h2' : { Element : 'h2' }, 310 'h3' : { Element : 'h3' }, 311 'h4' : { Element : 'h4' }, 312 'h5' : { Element : 'h5' }, 313 'h6' : { Element : 'h6' }, 314 'code' : { Element : 'code' }, 315 316 // Other formatting features. 317 'FontFace' : 318 { 319 Element : 'span', 320 Styles : { 'font-family' : '#("Font")' }, 321 Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ] 322 }, 323 324 'Size' : 325 { 326 Element : 'span', 327 Styles : { 'font-size' : '#("Size","fontSize")' }, 328 Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ] 329 }, 330 331 'Color' : 332 { 333 Element : 'span', 334 Styles : { 'color' : '#("Color","color")' }, 335 Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ] 336 }, 337 338 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } }, 339 340 'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } } 341}; 342 343//FCKConfig.CoreStyles['Code'] = { Element : 'code' }; 344// The distance of an indentation step. 345FCKConfig.IndentLength = 40 ; 346FCKConfig.IndentUnit = 'px' ; 347 348// Alternatively, FCKeditor allows the use of CSS classes for block indentation. 349// This overrides the IndentLength/IndentUnit settings. 350FCKConfig.IndentClasses = [] ; 351 352// [ Left, Center, Right, Justified ] 353FCKConfig.JustifyClasses = [] ; 354 355// The following value defines which File Browser connector and Quick Upload 356// "uploader" to use. It is valid for the default implementaion and it is here 357// just to make this configuration file cleaner. 358// It is not possible to change this value using an external file or even 359// inline when creating the editor instance. In that cases you must set the 360// values of LinkBrowserURL, ImageBrowserURL and so on. 361// Custom implementations should just ignore it. 362var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py 363var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py 364 365// Don't care about the following two lines. It just calculates the correct connector 366// extension to use for the default File Browser (Perl uses "cgi"). 367var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ; 368var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ; 369 370FCKConfig.LinkBrowser = true ; 371FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; 372FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% 373FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% 374 375FCKConfig.ImageBrowser = true ; 376FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; 377FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ; 378FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ; 379 380FCKConfig.FlashBrowser = true ; 381FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ; 382FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ; 383FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ; 384 385FCKConfig.LinkUpload = true ; 386FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ; 387//FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all 388FCKConfig.LinkUploadAllowedExtensions = ""; 389FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one 390 391FCKConfig.ImageUpload = true ; 392FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ; 393//FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp|svg)$" ; // empty for all 394FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all 395FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one 396 397FCKConfig.FlashUpload = true ; 398FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ; 399FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all 400FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one 401 402FCKConfig.dokuSmileyPath = 'http://' + top.dokuBase + 'lib/images/smileys/'; 403// FCKConfig.insertedDokuSmiley = top.insertedDokuSmiley; 404 405FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ; 406FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ; 407FCKConfig.SmileyColumns = 8 ; 408FCKConfig.SmileyWindowWidth = 350 ; 409FCKConfig.SmileyWindowHeight = 400 ; 410//FCKConfig.SmileyWindowHeight = 400 ; 411 412FCKConfig.ToolbarSets["DokuwikiNoGuest"] = [ 413 ['Source' ], 414 ['About'] 415] ; 416 417FCKConfig.ToolbarSets["DokuwikiGuest"] = [ 418 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], 419 ['OrderedList','UnorderedList'], 420 ['Rule', 'Smiley', 'SpecialChar', 'Style'], [], 421 ['Cut','Copy','Paste','PasteText', 'SpellCheck', 'Find'], 422 ['FontFormat'], ['Undo','Redo','RemoveFormat', '-','Table' ], 423 ['Plugin_Tool', 'Delete_P' ], 424 ['Source' ], 425 ['About'] 426] ; 427 428 429FCKConfig.ToolbarSets["Dokuwiki"] = [ 430 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], 431 ['OrderedList','UnorderedList','Outdent','Indent', 'insertHtmlCode' ], // insertHtmlCode is footnote plugin 432 ['Rule', 'Smiley', 'SpecialChar', 'Style'], [],['fonts'], 433 ['Cut','Copy','Paste','PasteText','PasteWord', 'SpellCheck', 'Find'], 434 ['FontFormat'], ['Undo','Redo','RemoveFormat', '-','Table' ], 435 ['Plugin_Tool', 'Delete_P' ],['FitWindow'], 436 ['Link','Unlink'], ['Image', 'Source','geshi' ], 437 ['About','keyboard'] 438] ; 439 440FCK.getCurrentWikiNS = function () { 441 var ns = ""; 442 if(top.getCurrentWikiNS) { 443 ns = top.getCurrentWikiNS(); 444 } 445 446 return ns; 447} 448 449 450FCKConfig.BackgroundBlockerColor = '#ffffff' ; 451FCKConfig.BackgroundBlockerOpacity = 0.50 ; 452 453FCKConfig.MsWebBrowserControlCompat = false ; 454 455FCKConfig.PreventSubmitHandler = false ; 456 457FCKConfig.Geshi_Types = new Array( 458"actionscript","actionscript3","ada","apache","applescript","asm","asp", 459"autoit","avisynth","bash","basic4gl","bf","bibtex","blitzbasic","bnf","boo","c", 460"c_mac","caddcl","cadlisp","cfdg","cfm","cil","cmake","cobol","cpp","cpp-qt", 461"csharp","css","d","dcs","delphi","diff","div","dos","dot","eiffel","email","erlang","fo", 462"fortran","freebasic","genero","glsl","gml","gnuplot","groovy","gettext","haskell","hq9plus", 463"html","idl","ini","inno","intercal","io","java5","java","javascript", 464"kixtart","klonec","klonecpp","latex","lisp","locobasic","lolcode", 465"lotusformulas","lotusscript","lscript","lsl2","lua","m68k","make","matlab", 466"mirc","modula3","mpasm","mxml","mysql","nsis","oberon2","objc","ocaml-brief", 467"ocaml","oobas","oracle8","oracle11","pascal","perl","per","php-brief","php", 468"pic16","pixelbender","plsql","povray","powershell","progress","prolog","properties", 469"providex","python","qbasic","rails","rebol","reg","robots","ruby","sas","scala", 470"scheme","scilab","sdlbasic","smalltalk","smarty","sql","tcl","teraterm","text", 471"thinbasic","tsql","typoscript","vbnet","vb","verilog","vhdl","vim", 472"visualfoxpro","visualprolog","whitespace","winbatch","whois","xml","xorg_conf","xpp","z80" 473 474); 475 476 477function get_image_extensions(){ 478 var ajx = new sack(); 479 ajx.requestFile = "../extensions.php"; 480 ajx.method = 'POST'; 481 ajx.onCompletion = function() { 482 if(ajx.responseStatus && ajax.responseStatus[0] == 200) { 483 var image_types = ajx.response; 484 if(image_types) 485 FCKConfig.ImageUploadAllowedExtensions = '.(' + image_types+ ')$' ; 486 } 487 488 }; 489 ajx.runAJAX(); 490} 491 492 493FCKConfig.dokuSmileyConfImages; 494try { 495var ajax = new sack(); 496 do_smileys(); 497}catch(ex){ 498 499} 500 501try { 502get_image_extensions(); 503}catch(ex) {alert(ex)} 504 505function do_smileys(){ 506 ajax.requestFile = "../dwsmileys.php"; 507 ajax.method = 'POST'; 508 ajax.onCompletion = whenCompleted; 509 ajax.runAJAX(); 510} 511 512 513function whenCompleted(){ 514 515 if(ajax.responseStatus && ajax.responseStatus[0] == 200) { 516 517 FCKConfig.dokuSmileyConfImages = new Array(); 518 smileys = ajax.response.replace(/#.*?\n/g,""); 519 smileys = smileys.replace(/^[\s\n]+$/mg,""); 520 smileys=smileys.split(/\n/); 521 if(!smileys[0]) smileys.shift(); 522 if(!smileys[smileys.length-1]) smileys.pop(); 523 for(var i=0; i < smileys.length; i++) { 524 var a = smileys[i].split(/\s+/); 525 if(a[0].match(/DELETEME/) || a[0].match(/FIXME/)) continue; 526 FCKConfig.dokuSmileyConfImages[i] = a; 527 } 528 } 529} 530 531FCKConfig.dokuSmileyImages = 532 [['8-)','icon_cool.gif'], 533 ['8-O','icon_eek.gif'], 534 [':-(','icon_sad.gif'], 535 [':-)','icon_smile.gif'], 536 ['=)','icon_smile2.gif'], 537 [':-/','icon_doubt.gif'], 538 [':-?','icon_confused.gif'], 539 [':-D','icon_biggrin.gif'], 540 [':-P','icon_razz.gif'], 541 542 [':-O','icon_surprised.gif'], 543 [':-X','icon_silenced.gif'], 544 545 [':-|','icon_neutral.gif'], 546 [';-)','icon_wink.gif'], 547 ['^_^','icon_fun.gif'], 548 [':?:','icon_question.gif'], 549 [':!:','icon_exclaim.gif'], 550 ['LOL','icon_lol.gif']]; 551 552 553FCK.get_FCK = function(){ 554 return FCK; 555} 556 557FCK.get_FCKConfig = function(){ 558 return FCKConfig; 559} 560 561