[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2019 The s9e Authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Configurator\Bundles; 9 use s9e\TextFormatter\Configurator; 10 use s9e\TextFormatter\Configurator\Bundle; 11 class Fatdown extends Bundle 12 { 13 public function configure(Configurator $configurator) 14 { 15 $configurator->urlConfig->allowScheme('ftp'); 16 $configurator->Litedown->decodeHtmlEntities = \true; 17 $configurator->Autoemail; 18 $configurator->Autolink; 19 $configurator->Escaper; 20 $configurator->FancyPants; 21 $configurator->HTMLComments; 22 $configurator->HTMLEntities; 23 $configurator->PipeTables; 24 $htmlAliases = [ 25 'a' => ['URL', 'href' => 'url'], 26 'hr' => 'HR', 27 'em' => 'EM', 28 's' => 'S', 29 'strong' => 'STRONG', 30 'sup' => 'SUP' 31 ]; 32 foreach ($htmlAliases as $elName => $alias) 33 if (\is_array($alias)) 34 { 35 $configurator->HTMLElements->aliasElement($elName, $alias[0]); 36 unset($alias[0]); 37 foreach ($alias as $attrName => $alias) 38 $configurator->HTMLElements->aliasAttribute($elName, $attrName, $alias); 39 } 40 else 41 $configurator->HTMLElements->aliasElement($elName, $alias); 42 $htmlElements = [ 43 'abbr' => ['title'], 44 'b', 45 'br', 46 'code', 47 'dd', 48 'del', 49 'div' => ['class'], 50 'dl', 51 'dt', 52 'i', 53 'img' => ['alt', 'height', 'src', 'title', 'width'], 54 'ins', 55 'li', 56 'ol', 57 'pre', 58 'rb', 59 'rp', 60 'rt', 61 'rtc', 62 'ruby', 63 'span' => ['class'], 64 'strong', 65 'sub', 66 'sup', 67 'table', 68 'tbody', 69 'td' => ['colspan', 'rowspan'], 70 'tfoot', 71 'th' => ['colspan', 'rowspan', 'scope'], 72 'thead', 73 'tr', 74 'u', 75 'ul' 76 ]; 77 foreach ($htmlElements as $k => $v) 78 { 79 if (\is_numeric($k)) 80 { 81 $elName = $v; 82 $attrNames = []; 83 } 84 else 85 { 86 $elName = $k; 87 $attrNames = $v; 88 } 89 $configurator->HTMLElements->allowElement($elName); 90 foreach ($attrNames as $attrName) 91 $configurator->HTMLElements->allowAttribute($elName, $attrName); 92 } 93 $configurator->tags['html:dd']->rules->createParagraphs(\false); 94 $configurator->tags['html:dt']->rules->createParagraphs(\false); 95 $configurator->tags['html:td']->rules->createParagraphs(\false); 96 $configurator->tags['html:th']->rules->createParagraphs(\false); 97 $configurator->plugins->load('MediaEmbed', ['createMediaBBCode' => \false]); 98 $sites = [ 99 'bandcamp', 100 'dailymotion', 101 'facebook', 102 'liveleak', 103 'soundcloud', 104 'spotify', 105 'twitch', 106 'vimeo', 107 'vine', 108 'youtube' 109 ]; 110 foreach ($sites as $site) 111 $configurator->MediaEmbed->add($site); 112 } 113 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |