File modules/cms/base/DefaultConfig.class.php

Last commit: Thu Feb 16 22:57:35 2023 +0100	Jan Dankert	New: More functions (adding, deleting) for tags.
1 <?php 2 // DO NOT MAKE ANY CHANGES IN THIS FILE, please edit the file 'config.yml' or 'config-<host>.yml' instead. 3 // This file should only be changed by developers. 4 5 namespace cms\base; 6 7 use cms\action\LanguageAction; 8 9 /** 10 * Default configuration. 11 */ 12 class DefaultConfig { 13 14 /** 15 * Gets the default configuration. 16 * @return array 17 */ 18 public static function get() 19 { 20 return 21 [ 22 'applications' => 23 [ 24 'phpmyadmin' => 25 [ 26 'name' => 'PHPYourAdmin', 27 'url' => 'https://example.com/anotherapplication/index.cgi', 28 'param' => 'ticketidforopenrat', 29 'group' => '0', 30 'description' => 'Your database administration', 31 ], 32 ], 33 'cache' => 34 [ 35 'conditional_get' => true, 36 'enable_cache' => false, 37 'tmp_dir' => '', 38 ], 39 'config' => 40 [ 41 'auto_reload' => true, 42 'session_destroy_on_config_reload' => true, 43 ], 44 'countries' => LanguageAction::LANGUAGE_LIST, 45 'database' => 46 [ 47 ], 48 'database-default' => 49 [ 50 'default-id' => '', 51 ], 52 'date' => 53 [ 54 'format' => 55 [ 56 'SHORT' => '', 57 'ISO8601SHORT' => 'Ymd', 58 'ISO8601' => 'Y-m-d', 59 'ISO8601BAS' => 'YmdTHis', 60 'ISO8601EXT' => 'Y-m-dTH:i:s', 61 'ISO8601FULL' => 'Y-m-dTH:i:sO', 62 'ISO8601WEEK' => 'YWW', 63 'GER1' => 'd.m.Y', 64 'GER2' => 'd.m.Y, H:i', 65 'GER3' => 'd.m.Y, H:i:s', 66 'GER4' => 'd. F Y, H:i:s', 67 'ENGLONG' => 'l dS of F Y h:i:s A', 68 'GMDATE' => 'D, d M Y H:i:s GMT', 69 'RFC822' => 'r', 70 'UNIX' => 'U', 71 'LONG' => 'F j, Y, g:i a', 72 ], 73 'timezone' => 74 [ 75 -6 => 'New York', 76 0 => 'UTC (GMT)', 77 60 => 'MET (Middle European Time)', 78 120 => 'MEST (Middle European Summertime)', 79 ], 80 ], 81 'editor' => 82 [ 83 'text-markup' => 84 [ 85 'strong-begin' => '*', 86 'strong-end' => '*', 87 'emphatic-begin' => '_', 88 'emphatic-end' => '_', 89 'image-begin' => '{', 90 'image-end' => '}', 91 'speech-begin' => 'QUOTE', 92 'speech-end' => 'QUOTE', 93 'code-begin' => '=', 94 'code-end' => '=', 95 'footnote-begin' => '[', 96 'footnote-end' => ']', 97 'pre-begin' => '=', 98 'pre-end' => '=', 99 'insert-begin' => '++', 100 'insert-end' => '++', 101 'remove-begin' => '--', 102 'remove-end' => '--', 103 'definition-sep' => '::', 104 'headline' => '+', 105 'headline_level1_underline' => '=', 106 'headline_level2_underline' => '-', 107 'headline_level3_underline' => '.', 108 'list-unnumbered' => '-', 109 'list-numbered' => '#', 110 'table-of-content' => '##TOC##', 111 'linkto' => '->', 112 'table-cell-sep' => '|', 113 'style-begin' => '\'', 114 'style-end' => '\'', 115 'quote' => '>', 116 'quote-line-begin' => '>', 117 'quote-line-end' => '>', 118 'macro-begin' => '<<', 119 'macro-end' => '>>', 120 'macro-attribute-quote' => '\'', 121 'macro-attribute-value-seperator' => '=', 122 ], 123 'html' => 124 [ 125 'tag_strong' => 'strong', 126 'tag_emphatic' => 'em', 127 'tag_teletype' => 'tt', 128 'tag_speech' => 'cite', 129 'override_speech' => false, 130 'override_speech_open' => '&laquo;', 131 'override_speech_close' => '&raquo;', 132 'rendermode' => 'xml', 133 'replace' => ['EUR:&euro;'], 134 ], 135 'wiki' => 136 [ 137 'convert_html' => true, 138 'convert_bbcode' => true, 139 ], 140 'text' => 141 [ 142 'linelength' => '70', 143 ], 144 'calendar' => 145 [ 146 'weekday_offset' => '1', 147 ], 148 'macro' => 149 [ 150 'show_errors' => false, 151 ], 152 ], 153 'filename' => 154 [ 155 'edit' => true, 156 'default' => 'index', 157 'style' => 'short', 158 'url' => 'relative', 159 ], 160 'ftp' => 161 [ 162 'ascii' => 'html,htm,php', 163 ], 164 'help' => 165 [ 166 'enabled' => true, 167 'url' => 'http://help.openrat.de/', 168 'suffix' => '.html', 169 ], 170 'html' => 171 [ 172 'tag_teletype' => 'tt', 173 'tag_emphatic' => 'em', 174 'tag_strong' => 'strong', 175 'tag_speech' => 'cite', 176 'speech_open' => '&bdquo', 177 'speech_close' => '&rdquo', 178 ], 179 'i18n' => 180 [ 181 'use_http' => true, 182 'default' => 'de', 183 'available' => ['de','en','es','fr','it','ru','cn'], 184 'locale' => 185 [ 186 'de' => 'de_DE.utf8', 187 'en' => 'en_US.utf8', 188 ], 189 ], 190 'image' => 191 [ 192 'truecolor' => true, 193 ], 194 'interface' => 195 [ 196 'theme' => 'default', 197 'timeout' => '0', 198 'override_title' => '', 199 'style' => 200 [ 201 'default' => 'elastique', 202 ], 203 'config' => 204 [ 205 'file_manager_url' => '', 206 'enable' => true, 207 'show_system' => true, 208 'show_interpreter' => true, 209 'show_extensions' => true, 210 ], 211 'gravatar' => 212 [ 213 'enable' => true, 214 'size' => '80', 215 'default' => '404', 216 'rating' => 'g', 217 ], 218 'session' => 219 [ 220 'auto_extend' => true, 221 ], 222 ], 223 'login' => 224 [ 225 'motd' => '', 226 'nologin' => false, 227 'register' => false, 228 'send_password' => false, 229 'gpl' => 230 [ 231 'url' => 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html', 232 ], 233 'logo' => 234 [ 235 'enabled' => false, 236 'image' => './modules/cms-ui/themes/default/images/logo.jpg', 237 'url' => 'http://www.openrat.de', 238 ], 239 'start' => 240 [ 241 'start_lastchanged_object' => true, 242 'start_single_project' => true, 243 ], 244 ], 245 246 'mail' => 247 [ 248 'enabled' => true, 249 'from' => 'OpenRat <user@example.com>', 250 'signature' => '', 251 'cc' => '', 252 'bcc' => '', 253 'priority' => '', 254 'header_encoding' => 'Quoted-printable', 255 'client' => 'php', 256 'whitelist' => [], 257 'blacklist' => [], 258 'smtp' => 259 [ 260 'host' => 'localhost', 261 'port' => '25', 262 'auth_username' => '', 263 'auth_password' => '', 264 'timeout' => 45, 265 'localhost' => '', 266 'tls' => false, 267 'ssl' => false, 268 ], 269 ], 270 'publish' => 271 [ 272 'edit' => true, 273 'default' => 'index', 274 'format' => '{filename}{language_sep}{language}{type_sep}{type}', 275 'language_sep' => '.', 276 'type_sep' => '.', 277 'filename_language' => 'auto', 278 'filename_type' => 'always', 279 'style' => 'id', 280 'url' => 'relative', 281 'enable_php_in_page_content' => false, 282 'enable_php_in_file_content' => false, 283 'escape_8bit_characters' => false, 284 'encode_utf8_in_html' => true, 285 'negotiation' => 286 [ 287 'page_negotiate_type' => true, 288 'page_negotiate_language' => true, 289 'file_negotiate_type' => true, 290 ], 291 'filesystem' => 292 [ 293 'per_project' => true, 294 'directory' => '/var/www/', 295 ], 296 'command' => 297 [ 298 'per_project' => true, 299 'enable' => false, 300 'command' => '', 301 ], 302 'ftp' => 303 [ 304 'enable' => true, 305 'per_project' => true, 306 'port' => '21', 307 'host' => '', 308 'path' => '', 309 'user' => 'anonymous', 310 'pass' => 'mail@example.com', 311 ], 312 'set_modification_date' => true, 313 ], 314 'replace' => 315 [ 316 'euro' => 'EUR,&euro;', 317 'copy' => '(c),&copy;', 318 ], 319 'search' => 320 [ 321 'minlength' => 3, 322 'quicksearch' => 323 [ 324 'flag' => 325 [ 326 'id' => true, 327 'name' => true, 328 'filename' => true, 329 'description' => true, 330 'content' => false, 331 ], 332 ], 333 ], 334 'security' => 335 [ 336 'key' => 'OAp5M3GYvm2U7r1FEdvVhqDBxJjMTWgKvN8VfJrHLa7D9pVdrYkMyA', 337 'authorization' => [ 338 'basic' => true, 339 'bearer' => false, 340 ], 341 'cookie' => 342 [ 343 'secure' => false, 344 'httponly' => true, 345 'samesite' => 'Lax', 346 'expire' => 720, 347 ], 348 'readonly' => false, 349 'nopublish' => false, 350 'umask' => '0', 351 'chmod' => '0', 352 'chmod_dir' => '0', 353 '' => '0', 354 'disable_dynamic_code' => true, 355 'show_system_info' => true, 356 'use_post_token' => true, 357 'default' => 358 [ 359 'username' => '', 360 'password' => '', 361 ], 362 'guest' => 363 [ 364 'enable' => false, 365 'user' => 'guest', 366 ], 367 'login' => 368 [ 369 'type' => 'form', 370 ], 371 'auth' => 372 [ 373 'type' => 'database', 374 'userdn' => false, 375 ], 376 'authorize' => 377 [ 378 'type' => 'ldap', 379 ], 380 'autologin' => 381 [ 382 'modules' => 383 [ 384 'Remember', 385 'Guest', 386 'SingleSignon', 387 ], 388 ], 389 'preselect' => 390 [ 391 'modules' => 392 [ 393 'Ident', 394 'SSL', 395 'Cookie', 396 'DefaultUser' 397 ], 398 ], 399 'authenticate' => 400 [ 401 'modules' => 402 [ 403 'Database', 404 'Internal' 405 ], 406 ], 407 'newuser' => 408 [ 409 'autoadd' => true, 410 'autogroups' => '', 411 ], 412 'password' => 413 [ 414 'random_length' => 10, 415 'min_length' => 6, 416 'pepper' => '', 417 'deny_after_expiration_duration' => '3d', 418 'force_change_if_cleartext' => false, 419 ], 420 'http' => 421 [ 422 'url' => 'http://example.net/restricted-area', 423 ], 424 'authdb' => 425 [ 426 'enable' => false, 427 'type' => 'postgresql', 428 'user' => 'dbuser', 429 'password' => 'dbpassword', 430 'host' => '127.0.0.1', 431 'database' => 'dbname', 432 'persistent' => false, 433 'prepare' => false, 434 'sql' => 'select 1 from table where user={username} and password={password}', 435 'hash_algo' => 'md5', 436 'add' => true, 437 ], 438 'ssl' => 439 [ 440 'trust' => false, 441 'client_cert_dn_env' => 'SSL_CLIENT_S_DN_CN', 442 ], 443 'openid' => 444 [ 445 // Google has discontinued OpenID support as of July 22nd 2015 446 ], 447 'oidc' => 448 [ 449 // OpenID connect 450 'enabled' => true, 451 'provider' => [ 452 'google' => [ 453 'enabled' => false, 454 'label' => 'Google', 455 'url' => 'https://acounts.google.com', 456 'client_id' => 'xyz', 457 'client_secret' => 'mysecret' 458 ] 459 460 ], 461 'add'=>true 462 ], 463 'sso' => 464 [ 465 'enable' => false, 466 'url' => 'https://www.example.com/phpmyadmin/main.php?server=1', 467 'auth_param_name' => 'authid', 468 'auth_param_serialized' => true, 469 'cookie' => true, 470 'cookie_name' => '0', 471 'force' => true, 472 'expect' => '0', 473 'expect_regexp' => '/running on/', 474 'username_regexp' => '/running on localhost as ([a-z]+)@localhost/', 475 ], 476 'user' => 477 [ 478 'show_admin_mail' => true, 479 'show_mail' => false, 480 'send_message' => true, 481 ], 482 'content-security-policy' => true, 483 ], 484 'style' => // style key names max length is 64 chars 485 [ 486 /* 487 'earlgrey' => 488 [ 489 'name' => 'Earl grey', 490 'defaults' => [ 491 'main_title_background_color' => 'grey', 492 'main_title_text_color' => 'white', 493 'text_color' => 'black', 494 'background_color' => '#e9e9e9', 495 'inactive_background_color' => 'silver', 496 ] 497 ],*/ 498 'elastique' => 499 [ 500 'name' => 'Elastique', // Taken from roundcube's elastic theme 501 'schemes' => [ 502 'dark'=> [ 503 'main_title_background_color' => '#21292C', 504 'main_title_text_color' => '#C5D1D3', 505 'nav_title_background_color' => '#21292C', 506 'nav_title_text_color' => '#C5D1D3', 507 'text_color' => '#C5D1D3', 508 'background_color' => '#21292C', 509 'inactive_background_color' => '#21292C', 510 ], 511 'light'=> [ 512 'main_title_background_color' => '#FFFFFF', 513 'main_title_text_color' => '#2C363A', 514 'main_background_color' => '#E4E4E4', 515 'main_text_color' => '#2C363A', 516 'nav_background_color' => '#2F3A3F', 517 'nav_text_color' => '#FFFFFF', 518 'background_color' => '#E4E4E4', 519 'text_color' => '#2C363A', 520 'inactive_background_color' => '#44475a', 521 ] 522 ], 523 'defaults'=> [ 524 'image_color' => '#3687AD', 525 ] 526 ], 527 'elastiquedark' => 528 [ 529 'name' => 'Elastique dark', 530 'schemes' => [ 531 ], 532 'defaults'=> [ 533 'main_title_background_color' => '#21292C', 534 'main_title_text_color' => '#C5D1D3', 535 'nav_title_background_color' => '#21292C', 536 'nav_title_text_color' => '#C5D1D3', 537 'text_color' => '#C5D1D3', 538 'background_color' => '#21292C', 539 'inactive_background_color' => '#21292C', 540 'image_color' => '#3687AD', 541 ] 542 ], 543 /* 544 'moorweide' => 545 [ 546 'name' => 'Moorweide daylight', // Moorweide is a green place in hamburg city 547 'defaults' => [ 548 'main_title_background_color' => '#EDF6F2', 549 'main_title_text_color' => '#4D4C4C', 550 'text_color' => 'black', 551 'background_color' => 'white', 552 'inactive_background_color' => 'white', 553 'nav_background_color' => '#EDF6F2', 554 'nav_text_color' => '#4D4C4C', 555 'image_color' => '#00A075', 556 ] 557 ],*/ 558 'jawed' => 559 [ 560 'name' => 'Jawed', // Jawed Karim is one of the YT founders 561 'schemes' => [ 562 'dark'=> [ 563 'main_background_color' => '#181818', 564 'background_color' => '#202020', 565 'nav_background_color' => '#202020', 566 'text_color' => '#FFFFFF', 567 ], 568 'light'=> [ 569 'main_background_color' => '#F9F9F9', 570 'background_color' => '#FFFFFF', 571 'nav_background_color' => '#FFFFFF', 572 'text_color' => '#030303', 573 ] 574 ], 575 'defaults'=> [ 576 'image_color' => '#FF0000', 577 ] 578 ], 579 'dracula' => 580 [ 581 'name' => 'Dracula', 582 'defaults' => [ 583 'main_title_background_color' => '#44475a', 584 'main_title_text_color' => '#f8f8f2', 585 'nav_title_background_color' => '#44475a', 586 'nav_title_text_color' => '#f8f8f2', 587 'text_color' => '#f8f8f2', 588 'background_color' => '#282a36', 589 'inactive_background_color' => '#44475a', 590 'image_color' => 'orange', 591 ] 592 ], 593 /* 594 'modern' => 595 [ 596 'name' => 'Blue sky', 597 'defaults' => [ 598 'main_title_background_color' => '#3F6194', 599 'main_title_text_color' => 'white', 600 'nav_title_background_color' => '#79afd9', 601 'nav_background_color' => '#e1effa', 602 'text_color' => 'black', 603 'background_color' => '#F3F3F3', 604 'inactive_background_color' => '#CCCCCC', 605 ] 606 ],*/ 607 /* 608 'dark' => 609 [ 610 'name' => 'Dark night', 611 'defaults' => [ 612 'main_background_color' => '#232525', 613 'main_text_color' => '#a8b7c6', 614 'text_color' => '#afb1b3', 615 'background_color' => '#3c3f41', 616 'nav_text_color' => '#afb1b3', 617 'nav_background_color' => '#3c3f41', 618 'inactive_background_color' => '#313335', 619 'image_color' => '#3e86a0', 620 ] 621 ],*/ 622 /*'mono' => 623 [ 624 'name' => 'Monochrome', 625 'schemes' => [ 626 'dark'=> [ 627 'text_color' => 'white', 628 'background_color' => 'black', 629 ], 630 'light'=>[ 631 'text_color' => 'black', 632 'background_color' => 'white', 633 634 ], 635 ], 636 'defaults' => [ 637 'transition_duration' => '0' 638 ], 639 ],*/ 640 ], 641 'theme' => 642 [ 643 'favicon' => 'modules/cms/ui/themes/default/images/openrat-logo.ico', 644 ], 645 'wiki' => 646 [ 647 'convert_html' => true, 648 'convert_bbcode' => true, 649 'tag_strong' => '*', 650 'tag_emphatic' => '_', 651 ], 652 'application' => 653 [ 654 'name' => Startup::TITLE, 655 'version' => Startup::VERSION, 656 'operator' => '', 657 ], 658 'production' => true, 659 'ui' => 660 [ 661 'keybinding' => 662 [ 663 'method' => 664 [ 665 'prop' => 'F4', 666 'add' => 'F1', 667 'pub' => 'F8', 668 'archive' => '', 669 'rights' => '', 670 ], 671 'action' => 672 [ 673 'profile' => 'ALT+P', 674 ], 675 ], 676 ], 677 ]; 678 } 679 }
Download modules/cms/base/DefaultConfig.class.php
History Thu, 16 Feb 2023 22:57:35 +0100 Jan Dankert New: More functions (adding, deleting) for tags. Thu, 28 Apr 2022 00:28:24 +0200 Jan Dankert New: Login with Json webtoken (JWT) Wed, 1 Dec 2021 00:34:06 +0100 dankert Removed 2 themes: Dark, Moorweide. Mon, 29 Nov 2021 22:30:24 +0100 Jan Dankert New: New Themes "Jawed" (YT clone) and removed some older themes. Mon, 29 Nov 2021 01:22:40 +0100 Jan Dankert New: Themes may contain multiple color schemes (for now only "dark" and "light"), modern browsers are selecting the right scheme. Sun, 28 Nov 2021 23:18:53 +0100 Jan Dankert Refactoring: Extracting default config to action class (do not know if this is good) Tue, 9 Nov 2021 00:35:42 +0100 Jan Dankert Fixes: Reading and writing template sources with the new content table. Wed, 27 Oct 2021 02:27:59 +0200 Jan Dankert Refactoring: Splitted the mail client into a.) sendmail and b.) smtp. Wed, 21 Apr 2021 21:15:17 +0200 Jan Dankert New: Accept human readable values for durations and memory sizes in the configuration. Mon, 22 Feb 2021 23:51:21 +0100 Jan Dankert Better look of styles. Fri, 12 Feb 2021 00:43:08 +0100 Jan Dankert New: Style colors; Fix: Mobile navigation, global search. Wed, 10 Feb 2021 23:05:46 +0100 Jan Dankert Moving the search form upon the navigation, because the search is more like a navigation. Wed, 10 Feb 2021 22:04:26 +0100 Jan Dankert Provide the theme configuration through a class. Thu, 12 Nov 2020 01:12:45 +0100 Jan Dankert Fix: Workflow for changing the users email adress; Mail sending; Forwarding forms Wed, 11 Nov 2020 20:53:45 +0100 Jan Dankert Cleaned up some view. Tue, 10 Nov 2020 00:35:56 +0100 Jan Dankert Navigation gets same color as the view. Sun, 1 Nov 2020 03:08:55 +0100 Jan Dankert Replaced the calls to "Configuration::rawConfig()" with the OO style calls; Cleanup LoginAction. Sun, 1 Nov 2020 00:36:50 +0100 Jan Dankert Refactoring: Only using the configuration object. Sat, 31 Oct 2020 00:43:29 +0100 Jan Dankert New: Support for OpenId Connect; Removed: Support for LDAP. Sat, 24 Oct 2020 00:23:19 +0200 Jan Dankert Fix: Do not set strict cookies (as they are not send on the first request); Using new configuraton class. Fri, 23 Oct 2020 23:09:52 +0200 Jan Dankert Refactoring: Using the new config classes. Fri, 23 Oct 2020 15:58:08 +0200 Jan Dankert Fix: database port needs a default value. Fri, 23 Oct 2020 10:31:36 +0200 Jan Dankert If the PDO DSN is not configured, it is generated. Wed, 14 Oct 2020 23:49:54 +0200 Jan Dankert Refactoring: Creating the target instance with a Factory (Java style); Asynchronous publishing of files. Fri, 2 Oct 2020 23:11:48 +0200 Jan Dankert Cleanup: No '.inputholder' any more, notices with links to objects. Tue, 29 Sep 2020 23:29:40 +0200 Jan Dankert Cleanup the 'moorweide'-theme. Tue, 29 Sep 2020 01:13:54 +0200 Jan Dankert Fix: The search function now finds objects id with a length less than 3. Sat, 26 Sep 2020 18:46:36 +0200 Jan Dankert Now compatible with PHP 5.4 again. Sat, 26 Sep 2020 13:11:23 +0200 Jan Dankert Refactoring: No global variables any more. All constants are capsulated by classes. Sat, 26 Sep 2020 00:08:15 +0200 Jan Dankert Faster implementation for the defaultl config - only 1 statement. Fri, 25 Sep 2020 23:59:08 +0200 Jan Dankert Refactoring: capsulate the default config in a class.