File modules/cms/base/DefaultConfig.class.php
Last commit: Mon Jan 6 22:48:11 2025 +0100 Jan Dankert New: Now it is possible to remove and create new login/api token for a user; new API authorization with the authorization scheme "api".
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' => '«', 131 'override_speech_close' => '»', 132 'rendermode' => 'xml', 133 'replace' => ['EUR:€'], 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,€', 317 'copy' => '(c),©', 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 'api' => true, 341 ], 342 'cookie' => 343 [ 344 'secure' => false, 345 'httponly' => true, 346 'samesite' => 'Lax', 347 'expire' => 720, 348 ], 349 'readonly' => false, 350 'nopublish' => false, 351 'umask' => '0', 352 'chmod' => '0', 353 'chmod_dir' => '0', 354 '' => '0', 355 'disable_dynamic_code' => true, 356 'show_system_info' => true, 357 'use_post_token' => true, 358 'default' => 359 [ 360 'username' => '', 361 'password' => '', 362 ], 363 'guest' => 364 [ 365 'enable' => false, 366 'user' => 'guest', 367 ], 368 'login' => 369 [ 370 'type' => 'form', 371 ], 372 'auth' => 373 [ 374 'type' => 'database', 375 'userdn' => false, 376 ], 377 'authorize' => 378 [ 379 'type' => 'ldap', 380 ], 381 'autologin' => 382 [ 383 'modules' => 384 [ 385 'Remember', 386 'Guest', 387 'SingleSignon', 388 ], 389 ], 390 'preselect' => 391 [ 392 'modules' => 393 [ 394 'Ident', 395 'SSL', 396 'Cookie', 397 'DefaultUser' 398 ], 399 ], 400 'authenticate' => 401 [ 402 'modules' => 403 [ 404 'Database', 405 'Internal' 406 ], 407 ], 408 'newuser' => 409 [ 410 'autoadd' => true, 411 'autogroups' => '', 412 ], 413 'password' => 414 [ 415 'random_length' => 10, 416 'min_length' => 6, 417 'pepper' => '', 418 'deny_after_expiration_duration' => '3d', 419 'force_change_if_cleartext' => false, 420 ], 421 'http' => 422 [ 423 'url' => 'http://example.net/restricted-area', 424 ], 425 'authdb' => 426 [ 427 'enable' => false, 428 'type' => 'postgresql', 429 'user' => 'dbuser', 430 'password' => 'dbpassword', 431 'host' => '127.0.0.1', 432 'database' => 'dbname', 433 'persistent' => false, 434 'prepare' => false, 435 'sql' => 'select 1 from table where user={username} and password={password}', 436 'hash_algo' => 'md5', 437 'add' => true, 438 ], 439 'ssl' => 440 [ 441 'trust' => false, 442 'client_cert_dn_env' => 'SSL_CLIENT_S_DN_CN', 443 ], 444 'openid' => 445 [ 446 // Google has discontinued OpenID support as of July 22nd 2015 447 ], 448 'oidc' => 449 [ 450 // OpenID connect 451 'enabled' => true, 452 'provider' => [ 453 'google' => [ 454 'enabled' => false, 455 'label' => 'Google', 456 'url' => 'https://acounts.google.com', 457 'client_id' => 'xyz', 458 'client_secret' => 'mysecret' 459 ] 460 461 ], 462 'add'=>true 463 ], 464 'sso' => 465 [ 466 'enable' => false, 467 'url' => 'https://www.example.com/phpmyadmin/main.php?server=1', 468 'auth_param_name' => 'authid', 469 'auth_param_serialized' => true, 470 'cookie' => true, 471 'cookie_name' => '0', 472 'force' => true, 473 'expect' => '0', 474 'expect_regexp' => '/running on/', 475 'username_regexp' => '/running on localhost as ([a-z]+)@localhost/', 476 ], 477 'user' => 478 [ 479 'show_admin_mail' => true, 480 'show_mail' => false, 481 'send_message' => true, 482 ], 483 'content-security-policy' => true, 484 ], 485 'style' => // style key names max length is 64 chars 486 [ 487 'earlgrey' => 488 [ 489 'name' => 'Earl grey', 490 'schemes' => [ 491 'dark'=> [ 492 'main_background_color' => '#232525', 493 'main_text_color' => '#a8b7c6', 494 'text_color' => '#afb1b3', 495 'background_color' => '#3c3f41', 496 'nav_text_color' => '#afb1b3', 497 'nav_background_color' => '#3c3f41', 498 'inactive_background_color' => '#313335', 499 'image_color' => '#3e86a0', 500 ], 501 'light'=> [ 502 'main_title_background_color' => 'grey', 503 'main_title_text_color' => 'white', 504 'text_color' => 'black', 505 'background_color' => '#e9e9e9', 506 'inactive_background_color' => 'silver', 507 ], 508 ], 509 'defaults' => [ 510 ] 511 ], 512 'elastique' => 513 [ 514 'name' => 'Elastique', // Taken from roundcube's elastic theme 515 'schemes' => [ 516 'dark'=> [ 517 'main_title_background_color' => '#21292C', 518 'main_title_text_color' => '#C5D1D3', 519 'nav_title_background_color' => '#21292C', 520 'nav_title_text_color' => '#C5D1D3', 521 'text_color' => '#C5D1D3', 522 'background_color' => '#21292C', 523 'inactive_background_color' => '#21292C', 524 ], 525 'light'=> [ 526 'main_title_background_color' => '#FFFFFF', 527 'main_title_text_color' => '#2C363A', 528 'main_background_color' => '#E4E4E4', 529 'main_text_color' => '#2C363A', 530 'nav_background_color' => '#2F3A3F', 531 'nav_text_color' => '#FFFFFF', 532 'background_color' => '#E4E4E4', 533 'text_color' => '#2C363A', 534 'inactive_background_color' => '#44475a', 535 ] 536 ], 537 'defaults'=> [ 538 'image_color' => '#3687AD', 539 ] 540 ], 541 'moorweide' => 542 [ 543 'name' => 'Moorweide', // Moorweide is a green place in hamburg city 544 'schemes' => [ 545 'dark' => [ 546 'main_title_background_color' => '#44475a', 547 'main_title_text_color' => '#f8f8f2', 548 'nav_title_background_color' => '#44475a', 549 'nav_title_text_color' => '#f8f8f2', 550 'text_color' => '#f8f8f2', 551 'background_color' => '#282a36', 552 'inactive_background_color' => '#44475a', 553 ], 554 'light'=> [ 555 'main_title_background_color' => '#EDF6F2', 556 'main_title_text_color' => '#4D4C4C', 557 'text_color' => 'black', 558 'background_color' => 'white', 559 'inactive_background_color' => 'white', 560 'nav_background_color' => '#EDF6F2', 561 'nav_text_color' => '#4D4C4C', 562 ], 563 ], 564 565 'defaults' => [ 566 'image_color' => '#00A075', 567 ] 568 ], 569 'jawed' => 570 [ 571 'name' => 'Jawed', // Jawed Karim is one of the YT founders 572 'schemes' => [ 573 'dark'=> [ 574 'main_background_color' => '#181818', 575 'background_color' => '#202020', 576 'nav_background_color' => '#202020', 577 'text_color' => '#FFFFFF', 578 ], 579 'light'=> [ 580 'main_background_color' => '#F9F9F9', 581 'background_color' => '#FFFFFF', 582 'nav_background_color' => '#FFFFFF', 583 'text_color' => '#030303', 584 ] 585 ], 586 'defaults'=> [ 587 'image_color' => '#FF0000', 588 ] 589 ], 590 'dracula' => 591 [ 592 'name' => 'Dracula', 593 'schemes' => [ 594 'dark' => [ 595 'main_title_background_color' => '#44475a', 596 'main_title_text_color' => '#f8f8f2', 597 'nav_title_background_color' => '#44475a', 598 'nav_title_text_color' => '#f8f8f2', 599 'text_color' => '#f8f8f2', 600 'background_color' => '#282a36', 601 'inactive_background_color' => '#44475a', 602 ], 603 'light'=> [ 604 'main_title_background_color' => '#FFFFFF', 605 'main_title_text_color' => '#2C363A', 606 'main_background_color' => '#E4E4E4', 607 'main_text_color' => '#2C363A', 608 'nav_title_background_color' => '#44475a', 609 'nav_title_text_color' => '#f8f8f2', 610 'background_color' => '#E4E4E4', 611 'text_color' => '#2C363A', 612 'inactive_background_color' => '#44475a', 613 ], 614 ], 615 'defaults' => [ 616 'image_color' => 'orange', 617 ] 618 ], 619 'modern' => 620 [ 621 'name' => 'Blue sky', 622 'schemes' => [ 623 'light' => [ 624 'main_title_background_color' => '#3F6194', 625 'main_title_text_color' => 'white', 626 'nav_title_background_color' => '#79afd9', 627 'nav_background_color' => '#e1effa', 628 'text_color' => 'black', 629 'background_color' => '#F3F3F3', 630 'inactive_background_color' => '#CCCCCC', 631 ], 632 'dark' => [ 633 'main_background_color' => '#232525', 634 'main_text_color' => '#a8b7c6', 635 'text_color' => '#afb1b3', 636 'background_color' => '#3c3f41', 637 'nav_text_color' => '#afb1b3', 638 'nav_background_color' => '#3c3f41', 639 'inactive_background_color' => '#313335', 640 'image_color' => '#3e86a0', 641 ], 642 ], 643 ], 644 'mono' => 645 [ 646 'name' => 'Monochrome', 647 'schemes' => [ 648 'dark'=> [ 649 'text_color' => 'white', 650 'background_color' => 'black', 651 ], 652 'light'=>[ 653 'text_color' => 'black', 654 'background_color' => 'white', 655 656 ], 657 ], 658 'defaults' => [ 659 'transition_duration' => '0' 660 ], 661 ], 662 ], 663 'theme' => 664 [ 665 'favicon' => 'modules/cms/ui/themes/default/images/openrat-logo.ico', 666 ], 667 'wiki' => 668 [ 669 'convert_html' => true, 670 'convert_bbcode' => true, 671 'tag_strong' => '*', 672 'tag_emphatic' => '_', 673 ], 674 'application' => 675 [ 676 'name' => Startup::TITLE, 677 'version' => Startup::VERSION, 678 'operator' => '', 679 ], 680 'production' => true, 681 'ui' => 682 [ 683 'keybinding' => 684 [ 685 'method' => 686 [ 687 'prop' => 'F4', 688 'add' => 'F1', 689 'pub' => 'F8', 690 'archive' => '', 691 'rights' => '', 692 ], 693 'action' => 694 [ 695 'profile' => 'ALT+P', 696 ], 697 ], 698 ], 699 ]; 700 } 701 }
Downloadmodules/cms/base/DefaultConfig.class.php
History Mon, 6 Jan 2025 22:48:11 +0100 Jan Dankert New: Now it is possible to remove and create new login/api token for a user; new API authorization with the authorization scheme "api". Sat, 7 Dec 2024 20:34:52 +0100 Jan Dankert UI: New Selection for user color scheme. 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.