Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Classes/Hooks/BootstrapLinkHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,18 @@ public function canHandleLink(array $linkParts) {
if ( ! $linkParts['url']) {
return false;
}
if ( substr($linkParts['url'], 0, 10) !== 'bootstrap:' ) {
if ( $linkParts['type'] != 'bootstrap' ){
return false;
}
$this->linkParts = $linkParts;
$this->linkParts = $linkParts['url'];

// get type from e.g. url = "bootstrap:type=popover"
$partOne = explode(':', $linkParts['url'], 2);
$partOne = explode(':', $linkParts['url']['url'], 2);
if ( isset($partOne[1]) ) {
list($typeKey, $typeValue) = explode('=', $partOne[1], 2);

// get type from e.g. url = "bootstrap:type=popover&desc=TestPopover&pos=right&trigger=click"
if ( isset($linkParts['data-htmlarea-external']) && $linkParts['data-htmlarea-external'] == 1 ) {
list($typeValue, $linkParts['params']) = explode('&', $typeValue, 2);
}
list($typeValue, $linkParts['params']) = explode('&', $typeValue, 2);

if( $typeKey == 'type' ) {
$this->activeTab = $typeValue;
Expand Down Expand Up @@ -314,4 +312,4 @@ protected function getTabContentWrapped($type, $innerHtml) {
}


?>
?>
4 changes: 2 additions & 2 deletions Classes/Hooks/LinkHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function modifyParamsLinksRte($parameters, $parentObj) {
* @return array
*/
protected function getKeyValueArray($valueString) {
$keyValuePairs = explode('&', $valueString);
$keyValuePairs = explode('&', html_entity_decode($valueString));
$keyValueArray = array();
if ( is_array($keyValuePairs) ) {
foreach ( $keyValuePairs as $keyValue ) {
Expand All @@ -122,4 +122,4 @@ protected function getKeyValueArray($valueString) {
}


?>
?>
4 changes: 2 additions & 2 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

} else {
// --- Hook in TYPO3\CMS\Core\Html\RteHtmlParser.php and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer ---
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']['bootstrap'] = 'EXT:bootstrap_links/Classes/Hooks/LinkHandler.php:&Laxap\BootstrapLinks\Hooks\LinkHandler';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']['bootstrap'] = 'Laxap\BootstrapLinks\Hooks\LinkHandler';

if ( isset($extConf['addBootstrapLinkStyles']) && $extConf['addBootstrapLinkStyles'] ) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:bootstrap_links/Configuration/TypoScript/tsconfig.ts">');
}
}
?>
?>