Skip to content

Commit da23c6a

Browse files
committed
Merge branch 'master' into dev/4.0
2 parents e361968 + 1d6eded commit da23c6a

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
],
3232
"require": {
33-
"php": ">=8.1",
33+
"php": ">=7.1.3",
3434
"composer/installers": "^1.0 || ^2.0"
3535
},
3636
"require-dev": {
@@ -39,7 +39,7 @@
3939
"extra": {
4040
"display-name": "phpBB Media Embed PlugIn",
4141
"soft-require": {
42-
"phpbb/phpbb": ">=4.0.0@dev"
42+
"phpbb/phpbb": ">=3.3.2"
4343
},
4444
"version-check": {
4545
"host": "www.phpbb.com",
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{% if S_BBCODE_MEDIA %}
22
<button type="button" class="button button-icon-only bbcode-media" accesskey="m" name="addmedia" value="Media" onclick="bbfontstyle('[media]', '[/media]');" title="{{ lang('BBCODE_MEDIA_HELP') }}">
3-
{{ Icon('font', 'tv', '', true, 'fas c-button-icon') }}
3+
{% if constant('PHPBB_VERSION') starts with '4' %}
4+
{{ include('@phpbb_mediaembed/media_embed_bbcode_icon.html') }}
5+
{% else %}
6+
<i class="icon fa-television fa-fw" aria-hidden="true"></i>
7+
{% endif %}
48
</button>
59
{% endif %}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{# This template will be used in phpBB 4 #}
2+
{{ Icon('font', 'tv', '', true, 'fas c-button-icon') }}

tests/functional/media_embed_test.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ public function test_posting_media_bbcode()
2929
{
3030
$this->login();
3131

32-
$post = $this->create_topic(2, 'Media Embed Test Topic 1', "[media]https://youtu.be/" . self::YOUTUBE_ID . "[/media]");
32+
$forum_id = 2;
33+
34+
$crawler = self::request('GET', "posting.php?mode=post&f={$forum_id}&sid={$this->sid}");
35+
self::assertCount(1, $crawler->filter('button[name="addmedia"]'));
36+
37+
$post = $this->create_topic($forum_id, 'Media Embed Test Topic 1', "[media]https://youtu.be/" . self::YOUTUBE_ID . "[/media]");
3338
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid=$this->sid");
3439
self::assertStringContainsString("//www.youtube-nocookie.com/embed/" . self::YOUTUBE_ID, $crawler->filter("#post_content{$post['topic_id']} iframe")->attr('src'));
3540
}

0 commit comments

Comments
 (0)