diff --git a/composer.json b/composer.json index 26d0388..916fed9 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ ], "require": { "php": ">=7.1.3", - "composer/installers": "~1.0" + "composer/installers": "^1.0 || ^2.0" }, "require-dev": { "phing/phing": "~2.4" @@ -39,7 +39,7 @@ "extra": { "display-name": "phpBB Media Embed PlugIn", "soft-require": { - "phpbb/phpbb": ">=3.3.2,<4.0.0@dev" + "phpbb/phpbb": ">=3.3.2" }, "version-check": { "host": "www.phpbb.com", diff --git a/styles/all/template/event/posting_editor_buttons_custom_tags_before.html b/styles/all/template/event/posting_editor_buttons_custom_tags_before.html index 16087f7..7f6dfd9 100644 --- a/styles/all/template/event/posting_editor_buttons_custom_tags_before.html +++ b/styles/all/template/event/posting_editor_buttons_custom_tags_before.html @@ -1,5 +1,9 @@ {% if S_BBCODE_MEDIA %} {% endif %} diff --git a/styles/all/template/media_embed_bbcode_icon.html b/styles/all/template/media_embed_bbcode_icon.html new file mode 100644 index 0000000..bf5f0de --- /dev/null +++ b/styles/all/template/media_embed_bbcode_icon.html @@ -0,0 +1,2 @@ +{# This template will be used in phpBB 4 #} +{{ Icon('font', 'tv', '', true, 'fas c-button-icon') }} diff --git a/tests/functional/media_embed_test.php b/tests/functional/media_embed_test.php index 7f7e325..88d6f71 100644 --- a/tests/functional/media_embed_test.php +++ b/tests/functional/media_embed_test.php @@ -29,7 +29,12 @@ public function test_posting_media_bbcode() { $this->login(); - $post = $this->create_topic(2, 'Media Embed Test Topic 1', "[media]https://youtu.be/$this->youtubeId[/media]"); + $forum_id = 2; + + $crawler = self::request('GET', "posting.php?mode=post&f={$forum_id}&sid={$this->sid}"); + self::assertCount(1, $crawler->filter('button[name="addmedia"]')); + + $post = $this->create_topic($forum_id, 'Media Embed Test Topic 1', "[media]https://youtu.be/$this->youtubeId[/media]"); $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid=$this->sid"); self::assertStringContainsString("//www.youtube-nocookie.com/embed/$this->youtubeId", $crawler->filter("#post_content{$post['topic_id']} iframe")->attr('src')); }