first commit
This commit is contained in:
54
Configuration/FlexForms/Bookmarks.xml
Normal file
54
Configuration/FlexForms/Bookmarks.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<T3DataStructure>
|
||||
<meta>
|
||||
<langDisable>1</langDisable>
|
||||
</meta>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT type="array">
|
||||
<TCEforms>
|
||||
<sheetTitle>General</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el type="array">
|
||||
<settings.listType>
|
||||
<TCEforms>
|
||||
<label>LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:ff.listType</label>
|
||||
<config type="array">
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<default>default</default>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:default</numIndex>
|
||||
<numIndex index="1">default</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:alternative</numIndex>
|
||||
<numIndex index="1">alternative</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.listType>
|
||||
<settings.isComplementary>
|
||||
<TCEforms>
|
||||
<label>LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:ff.isComplementary</label>
|
||||
<description>LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:ff.isComplementary.description</description>
|
||||
<config>
|
||||
<type>check</type>
|
||||
<default>0</default>
|
||||
<items>
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">LLL:EXT:ws_bookmark_pages/Resources/Private/Language/locallang.xlf:yes</numIndex>
|
||||
<numIndex index="1"></numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</settings.isComplementary>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
15
Configuration/TCA/Overrides/sys_template.php
Normal file
15
Configuration/TCA/Overrides/sys_template.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the package buepro/bookmark_pages.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
/**
|
||||
* add TypoScript to template record
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('ws_bookmark_pages', 'Configuration/TypoScript/', 'Bookmark Pages');
|
45
Configuration/TCA/Overrides/tt_content.php
Normal file
45
Configuration/TCA/Overrides/tt_content.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the package buepro/bookmark_pages.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
defined('TYPO3') || die('Access denied.');
|
||||
|
||||
(function () {
|
||||
$version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version();
|
||||
$version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version);
|
||||
/**
|
||||
* Register Plugin
|
||||
*/
|
||||
if ($version < 10000000) {
|
||||
// For TYPO3 < V10
|
||||
// @extensionScannerIgnoreLine
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'WapplerSystems.BookmarkPages',
|
||||
'Bookmarks',
|
||||
'Bookmark Pages'
|
||||
);
|
||||
} else {
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'BookmarkPages',
|
||||
'Bookmarks',
|
||||
'Bookmark Pages'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add flexForm
|
||||
*/
|
||||
$pluginSignature = 'bookmarkpages_bookmarks';
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
$pluginSignature,
|
||||
'FILE:EXT:ws_bookmark_pages/Configuration/FlexForms/Bookmarks.xml'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'recursive,select_key,pages';
|
||||
})();
|
16
Configuration/TypoScript/constants.typoscript
Normal file
16
Configuration/TypoScript/constants.typoscript
Normal file
@@ -0,0 +1,16 @@
|
||||
plugin.tx_wsbookmarkpages {
|
||||
view {
|
||||
# cat=plugin.tx_wsbookmarkpages/file; type=string; label=Path to template root (FE)
|
||||
templateRootPath = EXT:ws_bookmark_pages/Resources/Private/Templates/
|
||||
# cat=plugin.tx_wsbookmarkpages/file; type=string; label=Path to template partials (FE)
|
||||
partialRootPath = EXT:ws_bookmark_pages/Resources/Private/Partials/
|
||||
# cat=plugin.tx_wsbookmarkpages/file; type=string; label=Path to template layouts (FE)
|
||||
layoutRootPath = EXT:ws_bookmark_pages/Resources/Private/Layouts/
|
||||
}
|
||||
settings {
|
||||
# cat=plugin.tx_wsbookmarkpages/general; type=boolean; label=Store bookmarks local:If set the bookmarks will be stored in the local storage from the clients browser.
|
||||
storeLocal = 1
|
||||
# cat=plugin.tx_wsbookmarkpages/general; type=int; label=Local storage TTL (s):Time in seconds bookmarks might be read from the browsers local storage before they get queried from the server. Just used when storeLocal is set.
|
||||
localStorageTTL = 3600
|
||||
}
|
||||
}
|
34
Configuration/TypoScript/setup.typoscript
Normal file
34
Configuration/TypoScript/setup.typoscript
Normal file
@@ -0,0 +1,34 @@
|
||||
plugin.tx_wsbookmarkpages {
|
||||
view {
|
||||
templateRootPaths.10 = {$plugin.tx_wsbookmarkpages.view.templateRootPath}
|
||||
partialRootPaths.10 = {$plugin.tx_wsbookmarkpages.view.partialRootPath}
|
||||
layoutRootPaths.10 = {$plugin.tx_wsbookmarkpages.view.layoutRootPath}
|
||||
}
|
||||
settings {
|
||||
storeLocal = {$plugin.tx_wsbookmarkpages.settings.storeLocal}
|
||||
localStorageTTL = {$plugin.tx_wsbookmarkpages.settings.localStorageTTL}
|
||||
}
|
||||
}
|
||||
|
||||
page.includeJSFooterlibs {
|
||||
bookmark_pages_jquery = https://code.jquery.com/jquery-2.2.4.min.js
|
||||
bookmark_pages_jquery {
|
||||
excludeFromConcatenation = 1
|
||||
disableCompression = 1
|
||||
external = 1
|
||||
}
|
||||
}
|
||||
|
||||
tt_content.login.stdWrap.postCObject = TEXT
|
||||
tt_content.login.stdWrap.postCObject.value (
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('DOMContentLoaded', function(event) {
|
||||
let button = document.querySelector('.frame-type-login [type="submit"]');
|
||||
if (button) {
|
||||
button.addEventListener('click', function () {
|
||||
localStorage.setItem('txBookmarkPagesReload', '1');
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
)
|
Reference in New Issue
Block a user