Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

Configurator.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.36 KiB


 01  <?php
 02   
 03  /**
 04  * @package   s9e\TextFormatter
 05  * @copyright Copyright (c) 2010-2022 The s9e authors
 06  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
 07  */
 08  namespace s9e\TextFormatter\Plugins\Autovideo;
 09   
 10  use s9e\TextFormatter\Configurator\Helpers\RegexpBuilder;
 11  use s9e\TextFormatter\Plugins\ConfiguratorBase;
 12   
 13  class Configurator extends ConfiguratorBase
 14  {
 15      /**
 16      * @var string Name of attribute that stores the video's URL
 17      */
 18      protected $attrName = 'src';
 19   
 20      /**
 21      * @var string
 22      */
 23      protected $quickMatch = '://';
 24   
 25      /**
 26      * @var string
 27      */
 28      protected $regexp = '#\\bhttps?://[-.\\w]+/(?:[-+.:/\\w]|%[0-9a-f]{2}|\\(\\w+\\))+\\.(?:mp4|ogg|webm)(?!\\S)#i';
 29   
 30      /**
 31      * @var string Name of the tag used to represent videos
 32      */
 33      protected $tagName = 'VIDEO';
 34   
 35      /**
 36      * Creates the tag used by this plugin
 37      *
 38      * @return void
 39      */
 40      protected function setUp()
 41      {
 42          if (isset($this->configurator->tags[$this->tagName]))
 43          {
 44              return;
 45          }
 46   
 47          // Create a tag
 48          $tag = $this->configurator->tags->add($this->tagName);
 49   
 50          // Add an attribute using the default url filter
 51          $filter = $this->configurator->attributeFilters['#url'];
 52          $tag->attributes->add($this->attrName)->filterChain->append($filter);
 53   
 54          // Set the default template
 55          $tag->template = '<video controls="" src="{@' . $this->attrName . '}"/>';
 56   
 57          // Allow URL tags to be used as fallback
 58          $tag->rules->allowChild('URL');
 59      }
 60  }