Skip to content

Commit

Permalink
Updated s9e\TextFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Oct 2, 2016
1 parent 13122a1 commit 543c50f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 26 deletions.
16 changes: 6 additions & 10 deletions bundle.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "phpbb-extension",
"description": "Embed third-party content in your phpBB forum",
"homepage": "https://github.com/s9e/phpbb-ext-mediaembed/",
"version": "20160908",
"version": "20161002",
"keywords": ["phpbb","embed","forum","media"],
"license": "MIT",
"require": {
Expand Down
8 changes: 3 additions & 5 deletions listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace s9e\mediaembed;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use s9e\TextFormatter\Configurator\Bundles\MediaPack as MediaPackConfigurator;
use s9e\TextFormatter\Bundles\MediaPack;

class listener implements EventSubscriberInterface
Expand All @@ -27,11 +28,8 @@ public static function getSubscribedEvents()

public function onConfigure($event)
{
$configurator = $event['configurator'];
foreach ($configurator->MediaEmbed->defaultSites->getIds() as $siteId)
{
$configurator->MediaEmbed->add($siteId);
}
$bundleConfigurator = new MediaPackConfigurator;
$bundleConfigurator->configure($event['configurator']);
}

public function onDisplay($event)
Expand Down
3 changes: 1 addition & 2 deletions parsing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1607,8 +1607,7 @@ protected static function addSiteTag(Tag $tag, TagStack $tagStack, $siteId)
$endTag = $tag->getEndTag() ?: $tag;
$lpos = $tag->getPos();
$rpos = $endTag->getPos() + $endTag->getLen();
$newTag = $tagStack->addSelfClosingTag(\strtoupper($siteId), $lpos, $rpos - $lpos, $tag->getSortPriority());
$newTag->setAttributes($tag->getAttributes());
$tagStack->addTagPair(\strtoupper($siteId), $lpos, 0, $rpos, 0, $tag->getSortPriority())->setAttributes($tag->getAttributes());
}
protected static function addTagFromMediaId(Tag $tag, TagStack $tagStack, array $sites)
{
Expand Down
11 changes: 5 additions & 6 deletions rendering.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"stable":{"20160908":{"current":"20160908","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=456&t=2272431","download":"https:\/\/github.com\/s9e\/phpbb-ext-mediaembed\/releases\/download\/20160908\/s9e-mediaembed-20160908.zip","eol":null,"security":false}}}
{"stable":{"20161002":{"current":"20161002","announcement":"https:\/\/www.phpbb.com\/community\/viewtopic.php?f=456&t=2272431","download":"https:\/\/github.com\/s9e\/phpbb-ext-mediaembed\/releases\/download\/20161002\/s9e-mediaembed-20161002.zip","eol":null,"security":false}}}

0 comments on commit 543c50f

Please sign in to comment.