Zwischenstand

This commit is contained in:
Sven Wappler
2021-08-20 13:33:13 +02:00
parent ce6b9e38dc
commit 508d3d2759
32 changed files with 2807 additions and 602 deletions

View File

@@ -11,6 +11,6 @@ services:
groupNames: 'ratings'
title: 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:widgets.bookmarks_likes_ratings.topLikes.title'
description: 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:widgets.bookmarks_likes_ratings.topLikes.description'
iconIdentifier: 'content-widget-ratings'
iconIdentifier: 'content-widget-text'
height: 'large'
width: 'medium'

View File

View File

@@ -12,4 +12,4 @@ defined('TYPO3') || die('Access denied.');
/**
* add TypoScript to template record
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('bookmarks_likes_ratings', 'Configuration/TypoScript/', 'Bookmark Pages');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('bookmarks_likes_ratings', 'Configuration/TypoScript/', 'Bookmarks/Likes/Pages');

View File

@@ -1,12 +1,4 @@
<?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 () {
@@ -17,12 +9,18 @@ defined('TYPO3') || die('Access denied.');
'Bookmark Pages'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'BookmarksLikesRatings',
'PersonalBookmarks',
'Personal bookmarks of a user'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['bookmarkpages_bookmarks'] = 'pi_flexform';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['bookmarkslikesratings_bookmarks'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'bookmarkpages_bookmarks',
'bookmarkslikesratings_bookmarks',
'FILE:EXT:bookmarks_likes_ratings/Configuration/FlexForms/Bookmarks.xml'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['bookmarkpages_bookmarks'] = 'recursive,select_key,pages';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['bookmarkslikesratings_bookmarks'] = 'recursive,select_key,pages';
})();

View File

@@ -0,0 +1,97 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.bookmark.title',
'label' => 'uid',
'label_alt' => 'rating,fe_user,vote',
'label_userFunc' => 'WapplerSystems\\BookmarksLikesRatings\\Userfuncs\\Tca->getVoteRecordTitle',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'adminOnly' => true,
'hideTable' => true,
'editlock' => 'rating',
'enablecolumns' => [
'disabled' => 'hidden',
],
'iconfile' => 'EXT:bookmarks_likes_ratings/Resources/Public/Icons/tx_bookmarkslikesratings_domain_model_vote.gif',
],
'interface' => [
'showRecordFieldList' => 'hidden, rating, user, vote',
],
'columns' => [
'pid' => [
'exclude' => 1,
'config' => [
'type' => 'none',
],
],
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'tablename' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.tablename',
'config' => [
'type' => 'input',
],
],
'object_uid' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.object_uid',
'config' => [
'type' => 'input',
],
],
'user' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.user',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'fe_users',
'foreign_table_where' => 'ORDER BY fe_users.username',
'items' => [
[
'--div--', 0
],
],
'fieldControl' => [
'editPopup' => [
'disabled' => false,
],
'addRecord' => [
'disabled' => false,
'options' => [
'setValue' => 'prepend',
],
'listModule' => [
'disabled' => false,
],
],
],
],
],
'uid' => [
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.uid',
'config' => [
'type' => 'none'
],
],
],
'types' => [
'1' => [
'showitem' => 'hidden, rating, user, vote'
],
],
'palettes' => [
'1' => [
'showitem' => ''
],
],
];

View File

@@ -0,0 +1,97 @@
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.like.title',
'label' => 'uid',
'label_alt' => 'rating,fe_user,vote',
'label_userFunc' => 'WapplerSystems\\BookmarksLikesRatings\\Userfuncs\\Tca->getVoteRecordTitle',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'adminOnly' => true,
'hideTable' => true,
'editlock' => 'rating',
'enablecolumns' => [
'disabled' => 'hidden',
],
'iconfile' => 'EXT:bookmarks_likes_ratings/Resources/Public/Icons/tx_bookmarkslikesratings_domain_model_vote.gif',
],
'interface' => [
'showRecordFieldList' => 'hidden, rating, voter, vote',
],
'columns' => [
'pid' => [
'exclude' => 1,
'config' => [
'type' => 'none',
],
],
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'tablename' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.tablename',
'config' => [
'type' => 'input',
],
],
'object_uid' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.object_uid',
'config' => [
'type' => 'input',
],
],
'user' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.user',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'fe_users',
'foreign_table_where' => 'ORDER BY fe_users.username',
'items' => [
[
'--div--', 0
],
],
'fieldControl' => [
'editPopup' => [
'disabled' => false,
],
'addRecord' => [
'disabled' => false,
'options' => [
'setValue' => 'prepend',
],
'listModule' => [
'disabled' => false,
],
],
],
],
],
'uid' => [
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.uid',
'config' => [
'type' => 'none'
],
],
],
'types' => [
'1' => [
'showitem' => 'hidden, rating, voter, vote'
],
],
'palettes' => [
'1' => [
'showitem' => ''
],
],
];

View File

@@ -47,9 +47,9 @@ return [
'disableNoMatchingValueElement' => 1,
],
],
'voter' => [
'user' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.voter',
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.user',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',

View File

@@ -0,0 +1,104 @@
blrToggleLike = PAGE
blrToggleLike {
typeNum = 874644
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = BookmarksLikesRatings
pluginName = ToggleLike
vendorName = WapplerSystems
controller = Like
action = toggle
}
}
blrStatusLike = PAGE
blrStatusLike {
typeNum = 874645
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = BookmarksLikesRatings
pluginName = StatusLike
vendorName = WapplerSystems
controller = Like
action = status
}
}
blrToggleBookmark = PAGE
blrToggleBookmark {
typeNum = 874654
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = BookmarksLikesRatings
pluginName = ToggleBookmark
vendorName = WapplerSystems
controller = Bookmark
action = toggle
}
}
blrStatusBookmark = PAGE
blrStatusBookmark {
typeNum = 874655
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = BookmarksLikesRatings
pluginName = StatusBookmark
vendorName = WapplerSystems
controller = Bookmark
action = status
}
}

View File

@@ -1,34 +1,23 @@
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}
}
view {
templateRootPaths.0 = EXT:bookmarks_likes_ratings/Resources/Private/Templates/
templateRootPaths.10 = {$plugin.tx_wsbookmarkpages.view.templateRootPath}
partialRootPaths.0 = EXT:bookmarks_likes_ratings/Resources/Private/Partials/
partialRootPaths.10 = {$plugin.tx_wsbookmarkpages.view.partialRootPath}
layoutRootPaths.0 = EXT:bookmarks_likes_ratings/Resources/Private/Layouts/
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
}
blr = EXT:bookmarks_likes_ratings/Resources/Public/JavaScript/scripts.js
}
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>
)
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:bookmarks_likes_ratings/Configuration/TypoScript/Ajax/" extensions="typoscript">