diff --git a/Classes/Controller/MessageController.php b/Classes/Controller/MessageController.php index f3d4504..a12f203 100644 --- a/Classes/Controller/MessageController.php +++ b/Classes/Controller/MessageController.php @@ -1,30 +1,64 @@ , Resultify - * - ***/ +namespace Pixelant\PxaMessageBox\Controller; -use Resultify\ResultifyMessageBox\Utility\DatabaseUtility; +use Pixelant\PxaMessageBox\Domain\Model\Message; +use Pixelant\PxaMessageBox\Domain\Repository\MessageRepository; +use TYPO3\CMS\Core\Context\Context; +use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Domain\Model\FrontendUser; +use TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository; +use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; /** * MessageController */ -class MessageController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController +class MessageController extends ActionController { /** - * @var \Resultify\ResultifyMessageBox\Domain\Repository\MessageRepository - * @inject + * @var MessageRepository */ protected $messageRepository; + /** + * @var FrontendUserRepository + */ + protected $frontendUserRepository = null; + + /** + * Loggen in user ID + * + * @var int + */ + protected $userId = null; + + /** + * @param MessageRepository $messageRepository + */ + public function injectMessageRepository(MessageRepository $messageRepository) + { + $this->messageRepository = $messageRepository; + } + + /** + * @param FrontendUserRepository $frontendUserRepository + */ + public function injectFrontendUserRepository(FrontendUserRepository $frontendUserRepository) + { + $this->frontendUserRepository = $frontendUserRepository; + } + + /** + * Init + */ + protected function initializeAction() + { + $userAspect = GeneralUtility::makeInstance(Context::class)->getAspect('frontend.user'); + if ($userAspect->isLoggedIn()) { + $this->userId = $userAspect->get('id'); + } + } + /** * action list * @@ -32,66 +66,41 @@ class MessageController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControll */ public function listAction() { - // get user - $user = $GLOBALS['TSFE']->fe_user->user; - - // get storage uid - $data = $this->configurationManager->getContentObject()->data; - $storagePids = explode(',',$data['pages']); - - if($user['uid'] != NULL && $data['pages'] != '') - { - // get ids of messages already seen by user - $userData = DatabaseUtility::getUserData($user['uid']); - $messagesUids = explode(',',$userData); - - // Set sorting - $this->messageRepository->setInvertSorting(boolval($this->settings['invertSorting'])); - - // get appropriate messages - $messages = $this->messageRepository->findByUidRespectStorage($storagePids, $messagesUids); - - $this->view->assign('messages', $messages); + if (!$this->userId) { + return; } + // Get appropriate messages + $messages = $this->messageRepository->findByNotSeen($this->userId); + if ($this->settings['invertSorting']) { + $messages = array_reverse($messages->toArray()); + } + + $this->view->assign('messages', $messages); } /** - * action ajax + * Close action + * + * @param Message $message * @return void */ - public function ajaxAction() + public function closeAction(Message $message) { - // get user - $user = $GLOBALS['TSFE']->fe_user->user; - - // get uid of message that was clicked - $messageUid = $this->request->getArgument('uid'); - - if($messageUid && $user['uid'] != NULL){ - // get ids of messages already seen by this user - $userData = DatabaseUtility::getUserData($user['uid']); - $messagesUids = explode(',',$userData); - - // build correct array of uids to update - if($userData == ''){ - $messagesUidsToUpdate = $messageUid; - }else{ - if (!in_array($messageUid, $messagesUids)) { - array_push($messagesUids, $messageUid); - $messagesUidsToUpdate = implode(",", $messagesUids); - }else{ - $messagesUidsToUpdate = implode(",", $messagesUids); - } - } - - if(DatabaseUtility::updateUser($user['uid'], $messagesUidsToUpdate)){ - echo json_encode(array("result" => "updateOK")); - }else{ - echo json_encode(array("result" => "updateError")); - } - }else{ - echo json_encode(array("result" => "updateError")); + if (!$this->userId) { + return; } + + /** @var FrontendUser $frontendUser */ + $frontendUser = $this->frontendUserRepository->findByUid($this->userId); + + $message->addSeenBy($frontendUser); + $this->messageRepository->update($message); + + if (GeneralUtility::_GET('type')) { + return json_encode(['success' => true]); + } + + $this->redirect('list'); } } diff --git a/Classes/Domain/Model/Message.php b/Classes/Domain/Model/Message.php index 924ce30..9e1509b 100644 --- a/Classes/Domain/Model/Message.php +++ b/Classes/Domain/Model/Message.php @@ -1,27 +1,19 @@ , Resultify - * - ***/ + +namespace Pixelant\PxaMessageBox\Domain\Model; + +use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; +use TYPO3\CMS\Extbase\Persistence\ObjectStorage; /** * Message */ -class Message extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity +class Message extends AbstractEntity { /** * date * * @var \DateTime - * @validate NotEmpty */ protected $date = null; @@ -29,7 +21,6 @@ class Message extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * author * * @var string - * @validate NotEmpty */ protected $author = ''; @@ -37,7 +28,6 @@ class Message extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * headline * * @var string - * @validate NotEmpty */ protected $headline = ''; @@ -45,10 +35,23 @@ class Message extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * text * * @var string - * @validate NotEmpty */ protected $text = ''; + /** + * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FrontendUser> + * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy + */ + protected $seenBy = null; + + /** + */ + public function __construct() + { + $this->seenBy = new ObjectStorage(); + } + + /** * Returns the date * @@ -132,4 +135,36 @@ public function setText($text) { $this->text = $text; } + + /** + * @return ObjectStorage + */ + public function getSeenBy(): ObjectStorage + { + return $this->seenBy; + } + + /** + * @param ObjectStorage $seenBy + */ + public function setSeenBy(ObjectStorage $seenBy): void + { + $this->seenBy = $seenBy; + } + + /** + * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser + */ + public function addSeenBy(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser) + { + $this->seenBy->attach($frontendUser); + } + + /** + * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser + */ + public function removeSeenBy(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser) + { + $this->seenBy->detach($frontendUser); + } } diff --git a/Classes/Domain/Model/User.php b/Classes/Domain/Model/User.php deleted file mode 100644 index c88a06c..0000000 --- a/Classes/Domain/Model/User.php +++ /dev/null @@ -1,47 +0,0 @@ -, Resultify - * - ***/ - -/** - * User - */ -class User extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity -{ - /** - * date - * - * @var integer - */ - protected $seenMessagesIds = null; - - /** - * Returns the seenMessagesIds - * - * @return integer $seenMessagesIds - */ - public function getSeenMessagesIds() - { - return $this->seenMessagesIds; - } - - /** - * Sets the seenMessagesIds - * - * @param integer $seenMessagesIds - * @return void - */ - public function setSeenMessagesIds($seenMessagesIds) - { - $this->seenMessagesIds = $seenMessagesIds; - } -} diff --git a/Classes/Domain/Repository/MessageRepository.php b/Classes/Domain/Repository/MessageRepository.php index a8e62a5..6e468cf 100644 --- a/Classes/Domain/Repository/MessageRepository.php +++ b/Classes/Domain/Repository/MessageRepository.php @@ -1,18 +1,10 @@ , Resultify - * - ***/ +namespace Pixelant\PxaMessageBox\Domain\Repository; use TYPO3\CMS\Extbase\Persistence\QueryInterface; +use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; +use TYPO3\CMS\Extbase\Persistence\Repository; /** * @@ -20,73 +12,34 @@ * MessageRepository * */ -class MessageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { - /** - * Initializes the repository. - * - * @return void - * @see \TYPO3\CMS\Extbase\Persistence\Repository::initializeObject() - */ - public function initializeObject() { - /** @var $querySettings Typo3QuerySettings */ - $querySettings = $this->objectManager->get('TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings'); - $querySettings->setRespectStoragePage(TRUE); - $this->setDefaultQuerySettings($querySettings); - } - - /** - * Find messages - * - * @param int $storagePid storagePid to get messages from - * @param array[String] $messagesUids - * @return QueryResult found comments - */ - public function findByUidRespectStorage($storagePid, $messagesUids) { - $query = $this->createQuery(); - $query->getQuerySettings()->setStoragePageIds($storagePid); - $query->setOrderings( - array( - 'date' => $this->getSortingDirection() - ) - ); - $query->matching( - $query->logicalNot( - $query->in('uid', $messagesUids) - ) - ); - - return $query->execute(); - } +class MessageRepository extends Repository +{ + /** + * Initializes the repository. + * + * @return void + */ + public function initializeObject() + { + $this->setDefaultOrderings([ + 'date' => QueryInterface::ORDER_DESCENDING + ]); + } - /** - * Returns order direction - * - * @return string - */ - public function getSortingDirection() { - if ($this->getInvertSorting() === TRUE) { - return QueryInterface::ORDER_DESCENDING; - } - return QueryInterface::ORDER_ASCENDING; - } + /** + * Find messages not seen by user + * + * @param int $userId + * @return QueryResultInterface found comments + */ + public function findByNotSeen(int $userId): QueryResultInterface + { + $query = $this->createQuery(); - /** - * Gets invert sorting flag - * - * @return bool - */ - public function getInvertSorting() { - return $this->invertSorting; - } + $query->matching($query->logicalNot( + $query->contains('seenBy', $userId) + )); - /** - * Sets invert sorting flag - * - * @param bool $invertSorting - * @return void - */ - public function setInvertSorting($invertSorting) { - $this->invertSorting = $invertSorting; - } + return $query->execute(); + } } -?> \ No newline at end of file diff --git a/Classes/Task/CleanUpFeUserMessagesTask.php b/Classes/Task/CleanUpFeUserMessagesTask.php deleted file mode 100644 index 3e448c2..0000000 --- a/Classes/Task/CleanUpFeUserMessagesTask.php +++ /dev/null @@ -1,33 +0,0 @@ -, Resultify - * - ***/ - -use Resultify\ResultifyMessageBox\Utility\DatabaseUtility; - -/** - * CleanUpFeUserMessagesTask - */ -class CleanUpFeUserMessagesTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask { - - /** - * execute scheduler task - * @return bool - */ - public function execute() { - if(DatabaseUtility::cleanUpFeUsers()){ - return true; - }else{ - return false; - } - } -} \ No newline at end of file diff --git a/Classes/Utility/DatabaseUtility.php b/Classes/Utility/DatabaseUtility.php deleted file mode 100644 index b7247d5..0000000 --- a/Classes/Utility/DatabaseUtility.php +++ /dev/null @@ -1,172 +0,0 @@ -, Pixelant - * - ***/ - -use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Database\ConnectionPool; -use TYPO3\CMS\Core\Database\Query\QueryBuilder; -use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; - -/** - * Access to the Database - * - * Class DatabaseUtility - * - * @package Resultify\ResultifyMessageBox\Utility - */ -class DatabaseUtility -{ - /** - * update user by uid - * @param $uid - * @param $messagesUids - * - * @return void - */ - public static function updateUser($uid, $messagesUids) - { - $res = self::getQueryBuilder()->update('fe_users') - ->where(self::getQueryBuilder()->expr()->eq('uid',$uid)) - ->set('seen_messages_ids', $messagesUids) - ->execute(); - if($res){ - return true; - }else{ - return false; - } - } - - /** - * update user by uid - * @param $uid - * - * @return string - */ - public static function getUserData($uid) - { - $res = self::getQueryBuilder()->select('seen_messages_ids') - ->from('fe_users') - ->where( - self::getQueryBuilder()->expr()->eq('uid', $uid) - ) - ->execute()->fetchColumn(0); - return $res; - } - - /** - * update user by uid - * - * @return array - */ - public static function getFeUsers() - { - // get FE users data with hidden too - $res = self::getQueryBuilderHidden()->select('uid', 'seen_messages_ids') - ->from('fe_users') - ->execute()->fetchAll(); - return $res; - } - - /** - * clean up fe_users - * - * @return boolean - */ - public static function cleanUpFeUsers() - { - $allMessagesIds = self::getAllMessageIds(); - - // get FE users - $feUsers = self::getFeUsers(); - - foreach ($feUsers as $key => $value) { - - if($value['seen_messages_ids'] != ''){ - // get intval array items - $feUsersMessages = array_map('intval', explode(',', $value['seen_messages_ids'])); - - // get array diff to get items that needs to be removed from updateArray - $arrayDiff = array_diff($feUsersMessages,$allMessagesIds); - - if(count($arrayDiff) > 0){ - // get array of cleanup array - $arrayToUpdate = array_diff($feUsersMessages,$arrayDiff); - - // get string from $arrayToUpdate to be able to update fe_users - $stringToUpdate = implode(',', $arrayToUpdate); - - $res = self::getQueryBuilderHidden()->update('fe_users') - ->where(self::getQueryBuilderHidden()->expr()->eq('uid', $value['uid'])) - ->set('seen_messages_ids', $stringToUpdate) - ->execute(); - - if(!$res){ - return false; - } - } - - } - } - return true; - } - - /** - * get all not hidden and not deleted messages - * - * @return array - */ - public static function getAllMessageIds() - { - $result = array(); - $res = self::getQueryBuilder()->select('uid') - ->from('tx_resultifymessagebox_domain_model_message') - ->where( - self::getQueryBuilder()->expr()->eq('deleted', 0), - self::getQueryBuilder()->expr()->eq('hidden', 0) - ) - ->execute(); - while ($row = $res->fetch()) { - $result[] = $row['uid']; - } - - return $result; - } - - /** - * Returns QueryBuilder - * - * @return \TYPO3\CMS\Core\Database\Query\QueryBuilder - */ - public static function getQueryBuilder() - { - $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('fe_users'); - return $queryBuilder; - } - - /** - * Returns QueryBuilder with deleted restrictions only - * - * @return \TYPO3\CMS\Core\Database\Query\QueryBuilder - */ - public static function getQueryBuilderHidden() - { - $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('fe_users'); - $queryBuilder - ->getRestrictions() - ->removeAll() - ->add(GeneralUtility::makeInstance(DeletedRestriction::class)); - return $queryBuilder; - } - -} diff --git a/Configuration/ExtensionBuilder/settings.yaml b/Configuration/ExtensionBuilder/settings.yaml deleted file mode 100644 index a1611da..0000000 --- a/Configuration/ExtensionBuilder/settings.yaml +++ /dev/null @@ -1,101 +0,0 @@ -# -# Extension Builder settings for extension resultify_message_box -# generated 2017-10-09T10:54:00Z -# -# See http://www.yaml.org/spec/1.2/spec.html -# - ---- - -########### Overwrite settings ########### -# -# These settings only apply, if the roundtrip feature of the extension builder -# is enabled in the extension manager -# -# Usage: -# nesting reflects the file structure -# a setting applies to a file or recursive to all files and subfolders -# -# merge: -# means for classes: All properties ,methods and method bodies -# of the existing class will be modified according to the new settings -# but not overwritten -# -# for locallang xlf files: Existing keys and labels are always -# preserved (renaming a property or DomainObject will result in new keys and new labels) -# -# for other files: You will find a Split token at the end of the file -# see: \EBT\ExtensionBuilder\Service\RoundTrip::SPLIT_TOKEN -# -# After this token you can write whatever you want and it will be appended -# everytime the code is generated -# -# keep: -# files are never overwritten -# These settings may break the functionality of the extension builder! -# Handle with care! -# -# - -############ extension settings ############## - -overwriteSettings: - Classes: - Controller: merge - Domain: - Model: merge - Repository: merge - - Configuration: - #TCA merge not possible - use overrides directory - #TypoScript: keep - - Resources: - Private: - #Language: merge - #Templates: keep - - user_extension.svg: keep - -# ext_localconf.php: merge - -# ext_tables.php: merge - -# ext_tables.sql: merge - -## use static date attribute in xliff files ## -#staticDateInXliffFiles: 2017-10-09T10:54:00Z - -## skip docComment (license header) ## -#skipDocComment - -## list of error codes for warnings that should be ignored ## -#ignoreWarnings: - #503 - -######### settings for classBuilder ############################# -# -# here you may define default parent classes for your classes -# these settings only apply for new generated classes -# you may also just change the parent class in the generated class file. -# It will be kept on next code generation, if the overwrite settings -# are configured to merge it -# -################################################################# - -classBuilder: - - Controller: - parentClass: \TYPO3\CMS\Extbase\Mvc\Controller\ActionController - - Model: - AbstractEntity: - parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractEntity - - AbstractValueObject: - parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject - - Repository: - parentClass: \TYPO3\CMS\Extbase\Persistence\Repository - - setDefaultValuesForClassProperties: true \ No newline at end of file diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..5f07ffd --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,8 @@ + [ - 'title' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultifymessagebox_domain_model_message', + 'title' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message', 'label' => 'headline', 'tstamp' => 'tstamp', 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', - 'versioningWS' => true, 'languageField' => 'sys_language_uid', 'transOrigPointerField' => 'l10n_parent', 'transOrigDiffSourceField' => 'l10n_diffsource', @@ -17,25 +16,28 @@ 'endtime' => 'endtime', ], 'searchFields' => 'date,author,headline,text', - 'iconfile' => 'EXT:resultify_message_box/Resources/Public/Icons/tx_resultifymessagebox_domain_model_message.gif' + 'iconfile' => 'EXT:pxa_message_box/Resources/Public/Icons/message.svg' ], 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, author, headline, text', + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, author, headline, text, seen_by', ], 'types' => [ - '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, author, headline, text, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'], + '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date, author, headline, text, + --div--;LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.seen_by, seen_by, + --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime' + ], ], 'columns' => [ 'sys_language_uid' => [ 'exclude' => true, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'special' => 'languages', 'items' => [ [ - 'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', + 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1, 'flags-multiple' ] @@ -46,7 +48,7 @@ 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => true, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', @@ -54,8 +56,8 @@ 'items' => [ ['', 0], ], - 'foreign_table' => 'tx_resultifymessagebox_domain_model_message', - 'foreign_table_where' => 'AND tx_resultifymessagebox_domain_model_message.pid=###CURRENT_PID### AND tx_resultifymessagebox_domain_model_message.sys_language_uid IN (-1,0)', + 'foreign_table' => 'tx_pxamessagebox_domain_model_message', + 'foreign_table_where' => 'AND tx_pxamessagebox_domain_model_message.pid=###CURRENT_PID### AND tx_pxamessagebox_domain_model_message.sys_language_uid IN (-1,0)', ], ], 'l10n_diffsource' => [ @@ -63,17 +65,9 @@ 'type' => 'passthrough', ], ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ], - ], 'hidden' => [ 'exclude' => true, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden', 'config' => [ 'type' => 'check', 'items' => [ @@ -88,7 +82,7 @@ 'behaviour' => [ 'allowLanguageSynchronization' => true ], - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime', 'config' => [ 'type' => 'input', 'renderType' => 'inputDateTime', @@ -102,7 +96,7 @@ 'behaviour' => [ 'allowLanguageSynchronization' => true ], - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime', 'config' => [ 'type' => 'input', 'renderType' => 'inputDateTime', @@ -117,7 +111,7 @@ 'date' => [ 'exclude' => true, - 'label' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultifymessagebox_domain_model_message.date', + 'label' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.date', 'config' => [ 'type' => 'input', 'renderType' => 'inputDateTime', @@ -128,7 +122,7 @@ ], 'author' => [ 'exclude' => true, - 'label' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultifymessagebox_domain_model_message.author', + 'label' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.author', 'config' => [ 'type' => 'input', 'size' => 30, @@ -137,7 +131,7 @@ ], 'headline' => [ 'exclude' => true, - 'label' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultifymessagebox_domain_model_message.headline', + 'label' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.headline', 'config' => [ 'type' => 'input', 'size' => 30, @@ -146,14 +140,21 @@ ], 'text' => [ 'exclude' => true, - 'label' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultifymessagebox_domain_model_message.text', + 'label' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.text', 'config' => [ 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim,required' + 'enableRichtext' => true, + ] + ], + 'seen_by' => [ + 'exclide' => true, + 'label' => 'LLL:EXT:pxa_message_box/Resources/Private/Language/locallang_db.xlf:tx_pxamessagebox_domain_model_message.seen_by', + 'config' => [ + 'type' => 'select', + 'renderType' => 'selectMultipleSideBySide', + 'foreign_table' => 'fe_users', + 'MM' => 'tx_resultifymessagebox_message_feuser_mm', ] ], - ], ]; diff --git a/Configuration/TypoScript/constants.ts b/Configuration/TypoScript/constants.ts index 71d333f..be33291 100644 --- a/Configuration/TypoScript/constants.ts +++ b/Configuration/TypoScript/constants.ts @@ -1,19 +1,20 @@ - plugin.tx_resultifymessagebox_message { view { # cat=plugin.tx_resultifymessagebox_message/file; type=string; label=Path to template root (FE) - templateRootPath = EXT:resultify_message_box/Resources/Private/Templates/ + templateRootPath = EXT:pxa_message_box/Resources/Private/Templates/ # cat=plugin.tx_resultifymessagebox_message/file; type=string; label=Path to template partials (FE) - partialRootPath = EXT:resultify_message_box/Resources/Private/Partials/ + partialRootPath = EXT:pxa_message_box/Resources/Private/Partials/ # cat=plugin.tx_resultifymessagebox_message/file; type=string; label=Path to template layouts (FE) - layoutRootPath = EXT:resultify_message_box/Resources/Private/Layouts/ + layoutRootPath = EXT:pxa_message_box/Resources/Private/Layouts/ } + persistence { # cat=plugin.tx_resultifymessagebox_message//a; type=string; label=Default storage PID storagePid = } + settings { # cat=plugin.tx_resultifymessagebox_message//b; type=boolean; label=Invert sorting - invertSorting = 1 + invertSorting = 0 } } diff --git a/Configuration/TypoScript/setup.ts b/Configuration/TypoScript/setup.ts index 3cf6636..0e9814e 100644 --- a/Configuration/TypoScript/setup.ts +++ b/Configuration/TypoScript/setup.ts @@ -1,35 +1,30 @@ - plugin.tx_resultifymessagebox_message { view { - templateRootPaths.0 = EXT:resultify_message_box/Resources/Private/Templates/ - templateRootPaths.1 = {$plugin.tx_resultifymessagebox_message.view.templateRootPath} - partialRootPaths.0 = EXT:resultify_message_box/Resources/Private/Partials/ - partialRootPaths.1 = {$plugin.tx_resultifymessagebox_message.view.partialRootPath} - layoutRootPaths.0 = EXT:resultify_message_box/Resources/Private/Layouts/ - layoutRootPaths.1 = {$plugin.tx_resultifymessagebox_message.view.layoutRootPath} + templateRootPaths { + 10 = {$plugin.tx_resultifymessagebox_message.view.templateRootPath} + } + + partialRootPaths { + 10 = {$plugin.tx_resultifymessagebox_message.view.partialRootPath} + } + + layoutRootPaths { + 10 = {$plugin.tx_resultifymessagebox_message.view.layoutRootPath} + } } + persistence { storagePid = {$plugin.tx_resultifymessagebox_message.persistence.storagePid} - #recursive = 1 - } - features { - #skipDefaultArguments = 1 - # if set to 1, the enable fields are ignored in BE context - ignoreAllEnableFieldsInBe = 0 - # Should be on by default, but can be disabled if all action in the plugin are uncached - requireCHashArgumentForActionArguments = 1 - } - mvc { - #callDefaultActionIfActionCantBeResolved = 1 } + settings { # Set invert sorting for messages invertSorting = {$plugin.tx_resultifymessagebox_message.settings.invertSorting} } } -ajaxCall = PAGE -ajaxCall { +PxaMessageBoxAjaxCall = PAGE +PxaMessageBoxAjaxCall { typeNum = 2378954 config { disableAllHeaderCode = 1 @@ -39,58 +34,23 @@ ajaxCall { no_cache = 1 debug = 0 } + 10 = USER 10 { userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run extensionName = ResultifyMessageBox pluginName = Message vendorName = Resultify - controller = MessageController - action = ajax - view < plugin.tx_resultifymessagebox_message.view - persistence < plugin.tx_resultifymessagebox_message.persistence - settings < plugin.tx_resultifymessagebox_message.settings - } -} -page.includeCSS { - messageBoxCss = EXT:resultify_message_box/Resources/Public/Css/messageBox.css + switchableControllerActions { + Message { + 1 = close + } + } + } } -page.includeJSFooter { - messageBoxJs = EXT:resultify_message_box/Resources/Public/Js/messageBox.js +page { + includeCSS.messageBoxCss = EXT:pxa_message_box/Resources/Public/Css/messageBox.css + includeJSFooter.messageBoxJs = EXT:pxa_message_box/Resources/Public/Js/messageBox.js } - -# these classes are only used in auto-generated templates -plugin.tx_resultifymessagebox._CSS_DEFAULT_STYLE ( - textarea.f3-form-error { - background-color:#FF9F9F; - border: 1px #FF0000 solid; - } - - input.f3-form-error { - background-color:#FF9F9F; - border: 1px #FF0000 solid; - } - - .tx-resultify-message-box table { - border-collapse:separate; - border-spacing:10px; - } - - .tx-resultify-message-box table th { - font-weight:bold; - } - - .tx-resultify-message-box table td { - vertical-align:top; - } - - .typo3-messages .message-error { - color:red; - } - - .typo3-messages .message-ok { - color:green; - } -) diff --git a/Documentation.tmpl/Administrator/Index.rst b/Documentation.tmpl/Administrator/Index.rst deleted file mode 100644 index 10bc545..0000000 --- a/Documentation.tmpl/Administrator/Index.rst +++ /dev/null @@ -1,82 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _admin-manual: - -Administrator Manual -==================== - -Target group: **Administrators** - -Describes how to manage the extension from an administrator point of view. -That relates to Page/User TSconfig, permissions, configuration etc., -which administrator level users have access to. - -Language should be non / semi-technical, explaining, using small examples. - - -.. _admin-installation: - -Installation ------------- - -- How should the extension be installed? -- Are they dependencies to resolve? -- Is it a static template file to be included? - -To install the extension, perform the following steps: - -#. Go to the Extension Manager -#. Install the extension -#. Load the static template -#. ... - -For a list of configuration options, using a definition list is recommended: - -Some Configuration - This option enables... - -Other configuration - This other option is for all the rest... - - -.. figure:: ../Images/AdministratorManual/ExtensionManager.png - :alt: Extension Manager - - Extension Manager (caption of the image) - - List of extensions within the Extension Manager also shorten with "EM" (legend of the image) - - -.. _admin-configuration: - -Configuration -------------- - -* Where and how the extension should be configured? TypoScript? PHP? - -* Are there other prerequisite to full fill beforehand? - For example, configure a setting in a special way somewhere. - - -.. _admin-faq: - -FAQ ---- - -Possible subsection: FAQ - -Subsection -^^^^^^^^^^ - -Some subsection - -Sub-subsection -"""""""""""""" - -Deeper into the structure... diff --git a/Documentation.tmpl/ChangeLog/Index.rst b/Documentation.tmpl/ChangeLog/Index.rst deleted file mode 100644 index 4972785..0000000 --- a/Documentation.tmpl/ChangeLog/Index.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _changelog: - -ChangeLog -========= - -Providing a change log chapter is optional. You can also refer -users to the ChangeLog file inside the extension or to some repository's -commit listing. diff --git a/Documentation.tmpl/Configuration/Index.rst b/Documentation.tmpl/Configuration/Index.rst deleted file mode 100644 index 0dac787..0000000 --- a/Documentation.tmpl/Configuration/Index.rst +++ /dev/null @@ -1,106 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _configuration: - -Configuration Reference -======================= - -Technical information: Installation, Reference of TypoScript options, -configuration options on system level, how to extend it, the technical -details, how to debug it and so on. - -Language should be technical, assuming developer knowledge of TYPO3. -Small examples/visuals are always encouraged. - -Target group: **Developers** - - -.. _configuration-typoscript: - -TypoScript Reference --------------------- - -Possible subsections: Reference of TypoScript options. -The construct below show the recommended structure for -TypoScript properties listing and description. - -Properties should be listed in the order in which they -are executed by your extension, but the first should be -alphabetical for easier access. - -When detailing data types or standard TypoScript -features, don't hesitate to cross-link to the TypoScript -Reference as shown below. See the :file:`Settings.yml` -file for the declaration of cross-linking keys. - - -Properties -^^^^^^^^^^ - -.. container:: ts-properties - - =========================== ===================================== ======================= ==================== - Property Data type :ref:`t3tsref:stdwrap` Default - =========================== ===================================== ======================= ==================== - allWrap_ :ref:`t3tsref:data-type-wrap` yes :code:`
|
` - `subst\_elementUid`_ :ref:`t3tsref:data-type-boolean` no 0 - wrapItemAndSub_ :ref:`t3tsref:data-type-wrap` - =========================== ===================================== ======================= ==================== - - -Property details -^^^^^^^^^^^^^^^^ - -.. only:: html - - .. contents:: - :local: - :depth: 1 - - -.. _ts-plugin-tx-extensionkey-stdwrap: - -allWrap -""""""" - -:typoscript:`plugin.tx_extensionkey.allWrap =` :ref:`t3tsref:data-type-wrap` - -Wraps the whole item. - - -.. _ts-plugin-tx-extensionkey-wrapitemandsub: - -wrapItemAndSub -"""""""""""""" - -:typoscript:`plugin.tx_extensionkey.wrapItemAndSub =` :ref:`t3tsref:data-type-wrap` - -Wraps the whole item and any submenu concatenated to it. - - -.. _ts-plugin-tx-extensionkey-substelementUid: - -subst_elementUid -"""""""""""""""" - -:typoscript:`plugin.tx_extensionkey.subst_elementUid =` :ref:`t3tsref:data-type-boolean` - -If set, all appearances of the string ``{elementUid}`` in the total -element html-code (after wrapped in allWrap_) are substituted with the -uid number of the menu item. This is useful if you want to insert an -identification code in the HTML in order to manipulate properties with -JavaScript. - - -.. _configuration-faq: - -FAQ ---- - -Possible subsection: FAQ diff --git a/Documentation.tmpl/Developer/Index.rst b/Documentation.tmpl/Developer/Index.rst deleted file mode 100644 index 57d4447..0000000 --- a/Documentation.tmpl/Developer/Index.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _developer: - -Developer Corner -================ - -Target group: **Developers** - -Use this section for *providing code examples* or any **useful** information code wise. - - -.. _developer-hooks: - -Hooks ------ - -Possible hook examples. Input parameters are: - -+----------------+---------------+---------------------------------+ -| Parameter | Data type | Description | -+================+===============+=================================+ -| $table | string | Name of the table | -+----------------+---------------+---------------------------------+ -| $field | string | Name of the field | -+----------------+---------------+---------------------------------+ - -Use parameter :code:`$table` to retrieve the table name... - -.. _developer-api: - -API ---- - -How to use the API... - -.. code-block:: php - - $stuff = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( - '\\Foo\\Bar\\Utility\\Stuff' - ); - $stuff->do(); - -or some other language: - -.. code-block:: javascript - :linenos: - :emphasize-lines: 2-4 - - $(document).ready( - function () { - doStuff(); - } - ); diff --git a/Documentation.tmpl/Images/AdministratorManual/ExtensionManager.png b/Documentation.tmpl/Images/AdministratorManual/ExtensionManager.png deleted file mode 100644 index 67ea693..0000000 Binary files a/Documentation.tmpl/Images/AdministratorManual/ExtensionManager.png and /dev/null differ diff --git a/Documentation.tmpl/Images/IntroductionPackage.png b/Documentation.tmpl/Images/IntroductionPackage.png deleted file mode 100644 index 1de0f00..0000000 Binary files a/Documentation.tmpl/Images/IntroductionPackage.png and /dev/null differ diff --git a/Documentation.tmpl/Images/UserManual/BackendView.png b/Documentation.tmpl/Images/UserManual/BackendView.png deleted file mode 100644 index 46f90a8..0000000 Binary files a/Documentation.tmpl/Images/UserManual/BackendView.png and /dev/null differ diff --git a/Documentation.tmpl/Includes.txt b/Documentation.tmpl/Includes.txt deleted file mode 100644 index a111144..0000000 --- a/Documentation.tmpl/Includes.txt +++ /dev/null @@ -1,21 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. This is 'Includes.txt'. It is included at the very top of each and - every ReST source file in this documentation project (= manual). - - -.. ================================================== -.. DEFINE SOME TEXT ROLES -.. -------------------------------------------------- - -.. role:: typoscript(code) - -.. role:: ts(typoscript) - :class: typoscript - -.. role:: php(code) - -.. highlight:: php diff --git a/Documentation.tmpl/Index.rst b/Documentation.tmpl/Index.rst deleted file mode 100644 index 48e47de..0000000 --- a/Documentation.tmpl/Index.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: Includes.txt - -.. _start: - -============================================================= -Message Box -============================================================= - -.. only:: html - - :Classification: - resultify_message_box - - :Version: - |release| - - :Language: - en - - :Description: - Adds possibility to show message boxes (notifications) to FE users. - - :Keywords: - comma,separated,list,of,keywords - - :Copyright: - 2017 - - :Author: - Alex - - :Email: - alex@pixelant.se - - :License: - This document is published under the Open Content License - available from http://www.opencontent.org/opl.shtml - - :Rendered: - |today| - - The content of this document is related to TYPO3, - a GNU/GPL CMS/Framework available from `www.typo3.org `_. - - **Table of Contents** - -.. toctree:: - :maxdepth: 3 - :titlesonly: - - Introduction/Index - User/Index - Administrator/Index - Configuration/Index - Developer/Index - KnownProblems/Index - ToDoList/Index - ChangeLog/Index - Links diff --git a/Documentation.tmpl/Introduction/Index.rst b/Documentation.tmpl/Introduction/Index.rst deleted file mode 100644 index 9044832..0000000 --- a/Documentation.tmpl/Introduction/Index.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _introduction: - -Introduction -============ - - -.. _what-it-does: - -What does it do? ----------------- - -This chapter should give a brief overview of the extension. What does it do? What problems does it solve? -Who is interested in this? Basically, this section includes everything people need to know to decide whether they -should go on with this extension or not. - -.. important:: - - Please don't forget to repeat your extension's version number in the - :file:`Settings.yml` file, in the :code:`release` property. It will be - automatically picked up on the cover page by the :code:`|release|` - substitution. - - -.. _screenshots: - -Screenshots ------------ - -This chapter should help people figure how the extension works. Remove it -if not relevant. - -.. figure:: ../Images/IntroductionPackage.png - :width: 500px - :alt: Introduction Package - - Introduction Package just after installation (caption of the image) - - How the Frontend of the Introduction Package looks like just after installation (legend of the image) diff --git a/Documentation.tmpl/KnownProblems/Index.rst b/Documentation.tmpl/KnownProblems/Index.rst deleted file mode 100644 index dcb52d7..0000000 --- a/Documentation.tmpl/KnownProblems/Index.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _known-problems: - -Known Problems -============== - -Say where bugs can be reported / followed up. Is it a -`bug tracker `_? -Use this section for informing about any type of of problem -that are not necessarily named in the bug tracker such as performance issues, ... diff --git a/Documentation.tmpl/Links.rst b/Documentation.tmpl/Links.rst deleted file mode 100644 index 93b13e3..0000000 --- a/Documentation.tmpl/Links.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: Includes.txt - - -.. _links: - -Links ------ - -:TER: - https://typo3.org/extensions/repository/view/ - -:Bug Tracker: - https://forge.typo3.org/projects/extension-/issues - -:Git Repository: - https://github.com// - -:Contact: - `@ `__ diff --git a/Documentation.tmpl/Localization.de_DE.tmpl/Index.rst b/Documentation.tmpl/Localization.de_DE.tmpl/Index.rst deleted file mode 100644 index 50921e0..0000000 --- a/Documentation.tmpl/Localization.de_DE.tmpl/Index.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _start: - -============================================================= -###PROJECT_NAME### (Deutsch) -============================================================= - -.. only:: html - - :Klassifikation: - extension_key - - :Version: - |release| - - :Sprache: - de - - :Beschreibung: - Geben Sie eine Beschreibung ein. - - :Schlüsselwörter: - komma-getrennte,Liste,von,Schlüsselwörtern - - :Copyright: - ###YEAR### - - :Autor: - ###AUTHOR### - - :E-Mail: - author@example.com - - :Lizenz: - Dieses Dokument wird unter der Open Publication License, siehe - http://www.opencontent.org/openpub/ veröffentlicht. - - :Gerendert: - |today| - - Der Inhalt dieses Dokuments bezieht sich auf TYPO3, - ein GNU/GPL CMS-Framework auf `www.typo3.org `__. - - - **Inhaltsverzeichnis** - -.. toctree:: - :maxdepth: 3 - :titlesonly: - -.. Introduction/Index -.. UserManual/Index -.. AdministratorManual/Index -.. Configuration/Index -.. DeveloperCorner/Index -.. KnownProblems/Index -.. ToDoList/Index -.. ChangeLog/Index diff --git a/Documentation.tmpl/Localization.de_DE.tmpl/README b/Documentation.tmpl/Localization.de_DE.tmpl/README deleted file mode 100644 index c1517e6..0000000 --- a/Documentation.tmpl/Localization.de_DE.tmpl/README +++ /dev/null @@ -1,24 +0,0 @@ -How to translate -================ - -This directory contains the German translation of your documentation. -This is a complete Sphinx project but you may reuse assets from the -main documentation under Documentation/. - -If you plan to translate your documentation to German, you should -rename this directory and remove the suffix ".tmpl": - -Localization.de_DE.tmpl -> Localization.de_DE - -As this file is not needed either, feel free to delete it as well. - - -Supported languages -=================== - -Please visit http://sphinx-doc.org/latest/config.html#intl-options for a -list of languages supported by Sphinx. - -Please note however that TYPO3 is using locales so you may need to -extend the language code from Sphinx into a proper locale to be used -by TYPO3. diff --git a/Documentation.tmpl/Localization.de_DE.tmpl/Settings.yml b/Documentation.tmpl/Localization.de_DE.tmpl/Settings.yml deleted file mode 100644 index fefd340..0000000 --- a/Documentation.tmpl/Localization.de_DE.tmpl/Settings.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is the project specific Settings.yml file. -# Place Sphinx specific build information here. -# Settings given here will replace the settings of 'conf.py'. - -# Below is an example of intersphinx mapping declaration -# Add more mappings depending on what manual you want to link to -# Remove entirely if you don't need cross-linking - ---- -conf.py: - copyright: 2012-2015 - project: Extension Name (Deutsch) - version: x.y - release: x.y.z - intersphinx_mapping: - t3tsref: - - https://docs.typo3.org/typo3cms/TyposcriptReference/ - - null - latex_documents: - - - Index - - .tex - - Extension Name (Français) - - Your Name - - manual - latex_elements: - papersize: a4paper - pointsize: 10pt - preamble: \usepackage{typo3} -... diff --git a/Documentation.tmpl/Localization.fr_FR.tmpl/Index.rst b/Documentation.tmpl/Localization.fr_FR.tmpl/Index.rst deleted file mode 100644 index c0071e6..0000000 --- a/Documentation.tmpl/Localization.fr_FR.tmpl/Index.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _start: - -============================================================= -###PROJECT_NAME### (Français) -============================================================= - -.. only:: html - - :Classification: - extension_key - - :Version: - |release| - - :Langue: - fr - - :Description: - entrez une description. - - :Mots-clés: - list,mots-clés,séparés,par,virgules - - :Copyright: - ###YEAR### - - :Auteur: - ###AUTHOR### - - :E-mail: - author@example.com - - :Licence: - Ce document est publié sous la licence de publication libre - disponible sur http://www.opencontent.org/openpub/ - - :Généré: - |today| - - Le contenu de ce document est en relation avec TYPO3, - un CMS/Framework GNU/GPL disponible sur `www.typo3.org `__. - - - **Sommaire** - -.. toctree:: - :maxdepth: 3 - :titlesonly: - -.. Introduction/Index -.. UserManual/Index -.. AdministratorManual/Index -.. Configuration/Index -.. DeveloperCorner/Index -.. KnownProblems/Index -.. ToDoList/Index -.. ChangeLog/Index diff --git a/Documentation.tmpl/Localization.fr_FR.tmpl/README b/Documentation.tmpl/Localization.fr_FR.tmpl/README deleted file mode 100644 index 8436ec0..0000000 --- a/Documentation.tmpl/Localization.fr_FR.tmpl/README +++ /dev/null @@ -1,24 +0,0 @@ -How to translate -================ - -This directory contains the French translation of your documentation. -This is a complete Sphinx project but you may reuse assets from the -main documentation under Documentation/. - -If you plan to translate your documentation to French, you should -rename this directory and remove the suffix ".tmpl": - -Localization.fr_FR.tmpl -> Localization.fr_FR - -As this file is not needed either, feel free to delete it as well. - - -Supported languages -=================== - -Please visit http://sphinx-doc.org/latest/config.html#intl-options for a -list of languages supported by Sphinx. - -Please note however that TYPO3 is using locales so you may need to -extend the language code from Sphinx into a proper locale to be used -by TYPO3. diff --git a/Documentation.tmpl/Localization.fr_FR.tmpl/Settings.yml b/Documentation.tmpl/Localization.fr_FR.tmpl/Settings.yml deleted file mode 100644 index 0bf2b9d..0000000 --- a/Documentation.tmpl/Localization.fr_FR.tmpl/Settings.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This is the project specific Settings.yml file. -# Place Sphinx specific build information here. -# Settings given here will replace the settings of 'conf.py'. - -# Below is an example of intersphinx mapping declaration -# Add more mappings depending on what manual you want to link to -# Remove entirely if you don't need cross-linking - ---- -conf.py: - copyright: 2012-2015 - project: Extension Name (Français) - version: x.y - release: x.y.z - intersphinx_mapping: - t3tsref: - - https://docs.typo3.org/typo3cms/TyposcriptReference/ - - null - latex_documents: - - - Index - - .tex - - Extension Name (Français) - - Your Name - - manual - latex_elements: - papersize: a4paper - pointsize: 10pt - preamble: \usepackage{typo3} -... diff --git a/Documentation.tmpl/Settings.yml b/Documentation.tmpl/Settings.yml deleted file mode 100644 index 2487428..0000000 --- a/Documentation.tmpl/Settings.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This is the project specific Settings.yml file. -# Place Sphinx specific build information here. -# Settings given here will replace the settings of 'conf.py'. - -# Below is an example of intersphinx mapping declaration -# Add more mappings depending on what manual you want to link to -# Remove entirely if you don't need cross-linking - ---- -conf.py: - copyright: 2017 - project: Message Box - version: 1.0.0 - release: 1.0.0 - intersphinx_mapping: - t3tsref: - - http://docs.typo3.org/typo3cms/TyposcriptReference/ - - null - latex_documents: - - - Index - - resultify_message_box.tex - - Message Box - - Alex - - manual - latex_elements: - papersize: a4paper - pointsize: 10pt - preamble: \usepackage - html_theme_options: - github_repository: TYPO3-Documentation/TYPO3CMS-Example-ExtensionManual - github_branch: latest -... diff --git a/Documentation.tmpl/ToDoList/Index.rst b/Documentation.tmpl/ToDoList/Index.rst deleted file mode 100644 index 5cc010c..0000000 --- a/Documentation.tmpl/ToDoList/Index.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _todo: - -To-Do list -========== - -Give a link pointing to a `roadmap `_. -Alternatively, you can dress up a list of things you want to add or fix in this chapter -or give a vision about where the extension is heading. diff --git a/Documentation.tmpl/User/Index.rst b/Documentation.tmpl/User/Index.rst deleted file mode 100644 index 036869b..0000000 --- a/Documentation.tmpl/User/Index.rst +++ /dev/null @@ -1,67 +0,0 @@ -.. ================================================== -.. FOR YOUR INFORMATION -.. -------------------------------------------------- -.. -*- coding: utf-8 -*- with BOM. - -.. include:: ../Includes.txt - - -.. _user-manual: - -Users Manual -============ - -Target group: **Editors** - -Here should be described how to use the extension from the editor perspective. - -- How does it work? - - - works well when doing this. - - - does not work so well when doing that - but we can live with it. - - - **mind indentation when nesting lists**. - -- How to install the plugin on a web page? - -- What options are available? - -Language should be non-technical, explaining, using small examples. -Don't use to many acronyms unless they have been explained. -Don't be confusing by putting information targeting administrators. - -.. tip:: - - Take a break from time to time. - -Admonitions should be used to warn the users about potential -pitfalls, attract their attention to important elements -or just add some notes for for information (further reading, -for example). - -.. important:: - - Remember to always say "please" when asking your software to - do something. - -Provide screenshots as needed for making things clear. When creating -screenshots, try using the `Introduction Package `_ -as a neutral TYPO3 CMS instance. - -.. figure:: ../Images/UserManual/BackendView.png - :width: 500px - :alt: Backend view - - Default Backend view (caption of the image) - - The Backend view of TYPO3 after the user has clicked on module "Page". (legend of the image) - - -.. _user-faq: - -FAQ ---- - -Possible subsection: FAQ diff --git a/ExtensionBuilder.json b/ExtensionBuilder.json deleted file mode 100644 index 1c36f46..0000000 --- a/ExtensionBuilder.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "modules": [ - { - "config": { - "position": [ - 187, - 98 - ] - }, - "name": "New Model Object", - "value": { - "actionGroup": { - "_default0_list": true, - "_default1_show": false, - "_default2_new_create": false, - "_default3_edit_update": false, - "_default4_delete": false, - "customActions": [] - }, - "name": "Message", - "objectsettings": { - "addDeletedField": true, - "addHiddenField": true, - "addStarttimeEndtimeFields": true, - "aggregateRoot": false, - "categorizable": false, - "description": "", - "mapToTable": "", - "parentClass": "", - "sorting": false, - "type": "Entity", - "uid": "453127597660" - }, - "propertyGroup": { - "properties": [ - { - "allowedFileTypes": "", - "maxItems": "1", - "propertyDescription": "", - "propertyIsExcludeField": true, - "propertyIsRequired": true, - "propertyName": "date", - "propertyType": "Date", - "uid": "1040228325704" - }, - { - "allowedFileTypes": "", - "maxItems": "1", - "propertyDescription": "", - "propertyIsExcludeField": true, - "propertyIsRequired": true, - "propertyName": "author", - "propertyType": "String", - "uid": "152504484405" - }, - { - "allowedFileTypes": "", - "maxItems": "1", - "propertyDescription": "", - "propertyIsExcludeField": true, - "propertyIsRequired": true, - "propertyName": "headline", - "propertyType": "String", - "uid": "701528212427" - }, - { - "allowedFileTypes": "", - "maxItems": "1", - "propertyDescription": "", - "propertyIsExcludeField": true, - "propertyIsRequired": true, - "propertyName": "text", - "propertyType": "Text", - "uid": "220591764084" - } - ] - }, - "relationGroup": { - "relations": [] - } - } - } - ], - "properties": { - "backendModules": [], - "description": "Adds possibility to show message boxes (notifications) to FE users.", - "emConf": { - "category": "misc", - "custom_category": "", - "dependsOn": "typo3 => 8.7.0-8.7.99\n", - "disableLocalization": false, - "disableVersioning": false, - "skipGenerateDocumentationTemplate": false, - "sourceLanguage": "en", - "state": "alpha", - "targetVersion": "8.7.0-8.7.99", - "version": "1.0.0" - }, - "extensionKey": "resultify_message_box", - "name": "Message Box", - "originalExtensionKey": "", - "originalVendorName": "", - "persons": [ - { - "company": "Resultify", - "email": "alex@pixelant.se", - "name": "Alex", - "role": "Developer" - } - ], - "plugins": [ - { - "actions": { - "controllerActionCombinations": "message => list", - "noncacheableActions": "message => list", - "switchableActions": "" - }, - "description": "", - "key": "message", - "name": "Message" - } - ], - "vendorName": "Resultify" - }, - "wires": [], - "log": { - "last_modified": "2017-10-09 10:54", - "extension_builder_version": "8.7.0", - "be_user": " (48)" - } -} \ No newline at end of file diff --git a/README.md b/README.md index 455c94f..55f63f4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# RESULTIFY +# Pixelant This extension adds possibility to add cross-browser/cross-device messages in FE ## Installation ####The following steps are required to active the Rating and Comments for a TYPO3 installation: -1. Install the extension called resultify_message_box +1. Install the extension called pxa_message_box 2. Active the extension using "Extensions" module 3. Add the TypoScript called "Message Box" to the site roots where the features should be activated @@ -23,12 +23,3 @@ This extension adds possibility to add cross-browser/cross-device messages in FE 4. Under "Record storage page" choose sys-folder that was created for storing messages After that all messages that was created inside folder will apear to each FE user. FE user can press close for each message. In this case he/she will not see this message again, doesn't matter on which browser or device FE user open site again (cross-browser/cross-device). - -## Scheduler -####There is possibility to add scheduler task to clean up redundant data from "fe users" table: -1. Go to scheduler module. -2. Press "Add task" -3. Under class choose ResultifyMessageBox->"Clean Up FE users message boxes" -4. Set Type and Frequency if needed - -This task will remove all message ids from "fe user" table that are not present in system. \ No newline at end of file diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index b9dbfd4..40cdb1f 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -1,11 +1,11 @@ - +
- + Message - \ No newline at end of file + diff --git a/Resources/Private/Language/locallang_csh_tx_resultifymessagebox_domain_model_message.xlf b/Resources/Private/Language/locallang_csh_tx_resultifymessagebox_domain_model_message.xlf deleted file mode 100644 index 3e9f52d..0000000 --- a/Resources/Private/Language/locallang_csh_tx_resultifymessagebox_domain_model_message.xlf +++ /dev/null @@ -1,20 +0,0 @@ - - - -
- - - date - - - author - - - headline - - - text - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index cdd4c34..78108d2 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -1,33 +1,37 @@ - +
- - Messages IDs which was seen by this FE User + + Message - + Date - + Author - + Headline - + Text - - Message + + Seen by users - - Message + + Message - - Adds possibility to show message boxes (notifications) to FE users. + + Adds possibility to show message boxes (notifications) to FE users. - \ No newline at end of file + diff --git a/Resources/Private/Layouts/Ajax.html b/Resources/Private/Layouts/Ajax.html deleted file mode 100644 index 168de7c..0000000 --- a/Resources/Private/Layouts/Ajax.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html index 9e0fdd0..68e9c07 100644 --- a/Resources/Private/Layouts/Default.html +++ b/Resources/Private/Layouts/Default.html @@ -1,5 +1,3 @@ - -
- -
- \ No newline at end of file +
+ +
diff --git a/Resources/Private/Templates/Message/Ajax.html b/Resources/Private/Templates/Message/Ajax.html deleted file mode 100644 index c19a588..0000000 --- a/Resources/Private/Templates/Message/Ajax.html +++ /dev/null @@ -1,20 +0,0 @@ - - - -This template displays a NEW form for the current domain object. - -If you modify this template, do not forget to change the overwrite settings -in /Configuration/ExtensionBuilder/settings.yaml: -Resources: -Private: -Templates: -New.html: keep - -Otherwise your changes will be overwritten the next time you save the extension in the extension builder - - -

Ajax layout is empty to be able to send valid json respond to ajax call!

-
- - - \ No newline at end of file diff --git a/Resources/Private/Templates/Message/List.html b/Resources/Private/Templates/Message/List.html index c47e82e..eccd85a 100644 --- a/Resources/Private/Templates/Message/List.html +++ b/Resources/Private/Templates/Message/List.html @@ -1,35 +1,32 @@ - + - This Template is responsible for creating a table of domain objects. + + + +
+ +
+
- If you modify this template, do not forget to change the overwrite settings - in /Configuration/ExtensionBuilder/settings.yaml: - Resources: - Private: - Templates: - List.html: keep +
+ {f:format.date(date: message.date, format: 'Y-m-d')} + {message.author} +
- Otherwise your changes will be overwritten the next time you save the extension in the extension builder + +

{message.headline}

+
- - - - -
-
-
- {f:format.date(date: message.date, format: 'Y-m-d')} - {message.author} -
- -

{message.headline}

-
- -

{message.text}

-
-
-
-
-
+ + {message.text} + +
+
+
+
\ No newline at end of file diff --git a/Resources/Public/Css/messageBox.css b/Resources/Public/Css/messageBox.css index fecb7cb..7d7986f 100644 --- a/Resources/Public/Css/messageBox.css +++ b/Resources/Public/Css/messageBox.css @@ -28,8 +28,40 @@ font-size: 20px; cursor: pointer; - + } + .close-message__btn:after { content: "\00d7"; +} + +textarea.f3-form-error { + background-color: #FF9F9F; + border: 1px #FF0000 solid; +} + +input.f3-form-error { + background-color: #FF9F9F; + border: 1px #FF0000 solid; +} + +.tx-resultify-message-box table { + border-collapse: separate; + border-spacing: 10px; +} + +.tx-resultify-message-box table th { + font-weight: bold; +} + +.tx-resultify-message-box table td { + vertical-align: top; +} + +.typo3-messages .message-error { + color: red; +} + +.typo3-messages .message-ok { + color: green; } \ No newline at end of file diff --git a/Resources/Public/Icons/message.svg b/Resources/Public/Icons/message.svg new file mode 100644 index 0000000..c9c13f0 --- /dev/null +++ b/Resources/Public/Icons/message.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Public/Icons/relation.gif b/Resources/Public/Icons/relation.gif deleted file mode 100644 index db61d7e..0000000 Binary files a/Resources/Public/Icons/relation.gif and /dev/null differ diff --git a/Resources/Public/Icons/tx_resultifymessagebox_domain_model_message.gif b/Resources/Public/Icons/tx_resultifymessagebox_domain_model_message.gif deleted file mode 100644 index 37ba37b..0000000 Binary files a/Resources/Public/Icons/tx_resultifymessagebox_domain_model_message.gif and /dev/null differ diff --git a/Resources/Public/Icons/user_plugin_message.svg b/Resources/Public/Icons/user_plugin_message.svg deleted file mode 100644 index 17e1eb1..0000000 --- a/Resources/Public/Icons/user_plugin_message.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/Resources/Public/Js/messageBox.js b/Resources/Public/Js/messageBox.js index 8bda0d3..7e033be 100644 --- a/Resources/Public/Js/messageBox.js +++ b/Resources/Public/Js/messageBox.js @@ -1,22 +1,23 @@ -$(document).ready(function() { - $(".message-box a").click(function (event) { - event.preventDefault(); - var ajaxUrl = $(this).attr('href').substring(2,$(this).attr('href').lenght); - var currentElement = $(this); - $.ajax({ - url: "index.php", - data: ajaxUrl, - success: function(data){ - if (data){ - var obj = jQuery.parseJSON(data); - if(obj.result === 'updateOK'){ - currentElement.parent().hide(); - } - } - }, - }); +/* global $ */ - }); -}); +$(function () { + "use strict"; + $('.message-box [data-close-message]').click(function (event) { + event.preventDefault(); + var ajaxUrl = $(this).attr('href'); + var currentElement = $(this); + + $.ajax({ + url: ajaxUrl, + dataType: 'json', + + success: function (data) { + if (data.success) { + currentElement.parent().hide(); + } + }, + }); + }); +}); \ No newline at end of file diff --git a/Tests/Unit/Controller/MessageControllerTest.php b/Tests/Unit/Controller/MessageControllerTest.php deleted file mode 100644 index c2ece84..0000000 --- a/Tests/Unit/Controller/MessageControllerTest.php +++ /dev/null @@ -1,53 +0,0 @@ - - */ -class MessageControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * @var \Resultify\ResultifyMessageBox\Controller\MessageController - */ - protected $subject = null; - - protected function setUp() - { - parent::setUp(); - $this->subject = $this->getMockBuilder(\Resultify\ResultifyMessageBox\Controller\MessageController::class) - ->setMethods(['redirect', 'forward', 'addFlashMessage']) - ->disableOriginalConstructor() - ->getMock(); - } - - protected function tearDown() - { - parent::tearDown(); - } - - /** - * @test - */ - public function listActionFetchesAllMessagesFromRepositoryAndAssignsThemToView() - { - - $allMessages = $this->getMockBuilder(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class) - ->disableOriginalConstructor() - ->getMock(); - - $messageRepository = $this->getMockBuilder(\::class) - ->setMethods(['findAll']) - ->disableOriginalConstructor() - ->getMock(); - $messageRepository->expects(self::once())->method('findAll')->will(self::returnValue($allMessages)); - $this->inject($this->subject, 'messageRepository', $messageRepository); - - $view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)->getMock(); - $view->expects(self::once())->method('assign')->with('messages', $allMessages); - $this->inject($this->subject, 'view', $view); - - $this->subject->listAction(); - } -} diff --git a/Tests/Unit/Domain/Model/MessageTest.php b/Tests/Unit/Domain/Model/MessageTest.php deleted file mode 100644 index 6328a23..0000000 --- a/Tests/Unit/Domain/Model/MessageTest.php +++ /dev/null @@ -1,127 +0,0 @@ - - */ -class MessageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * @var \Resultify\ResultifyMessageBox\Domain\Model\Message - */ - protected $subject = null; - - protected function setUp() - { - parent::setUp(); - $this->subject = new \Resultify\ResultifyMessageBox\Domain\Model\Message(); - } - - protected function tearDown() - { - parent::tearDown(); - } - - /** - * @test - */ - public function getDateReturnsInitialValueForDateTime() - { - self::assertEquals( - null, - $this->subject->getDate() - ); - } - - /** - * @test - */ - public function setDateForDateTimeSetsDate() - { - $dateTimeFixture = new \DateTime(); - $this->subject->setDate($dateTimeFixture); - - self::assertAttributeEquals( - $dateTimeFixture, - 'date', - $this->subject - ); - } - - /** - * @test - */ - public function getAuthorReturnsInitialValueForString() - { - self::assertSame( - '', - $this->subject->getAuthor() - ); - } - - /** - * @test - */ - public function setAuthorForStringSetsAuthor() - { - $this->subject->setAuthor('Conceived at T3CON10'); - - self::assertAttributeEquals( - 'Conceived at T3CON10', - 'author', - $this->subject - ); - } - - /** - * @test - */ - public function getHeadlineReturnsInitialValueForString() - { - self::assertSame( - '', - $this->subject->getHeadline() - ); - } - - /** - * @test - */ - public function setHeadlineForStringSetsHeadline() - { - $this->subject->setHeadline('Conceived at T3CON10'); - - self::assertAttributeEquals( - 'Conceived at T3CON10', - 'headline', - $this->subject - ); - } - - /** - * @test - */ - public function getTextReturnsInitialValueForString() - { - self::assertSame( - '', - $this->subject->getText() - ); - } - - /** - * @test - */ - public function setTextForStringSetsText() - { - $this->subject->setText('Conceived at T3CON10'); - - self::assertAttributeEquals( - 'Conceived at T3CON10', - 'text', - $this->subject - ); - } -} diff --git a/composer.json b/composer.json index 6b8867f..16625b2 100644 --- a/composer.json +++ b/composer.json @@ -1,19 +1,18 @@ { - "name": "resultify/resultify-message-box", - "type": "typo3-cms-extension", - "description": "Adds possibility to show message boxes (notifications) to FE users.", - "authors": [ - { - "name": "Alex", - "role": "Developer" - } - ], - "require": { - "typo3/cms-core": "^8.7.1" - }, - "autoload": { - "psr-4": { - "Resultify\\ResultifyMessageBox\\": "Classes" - } + "name": "pixelant/pxa-message-box", + "type": "typo3-cms-extension", + "description": "Adds possibility to show message boxes (notifications) to FE users.", + "authors": [ + { + "name": "Pixelant" } -} \ No newline at end of file + ], + "require": { + "typo3/cms-core": "^9.5" + }, + "autoload": { + "psr-4": { + "Pixelant\\PxaMessageBox\\": "Classes" + } + } +} diff --git a/ext_emconf.php b/ext_emconf.php index 77d8e31..602c5b6 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,7 +1,7 @@ 'Message Box', 'description' => 'Adds possibility to show message boxes (notifications) to FE users.', - 'category' => 'misc', - 'author' => 'Alex', - 'author_email' => 'alex@pixelant.se', - 'state' => 'alpha', - 'internal' => '', - 'uploadfolder' => '0', - 'createDirs' => '', - 'clearCacheOnLoad' => 0, - 'version' => '1.0.0', + 'category' => 'plugin', + 'author' => 'Pixelant', + 'author_email' => 'info@pixelant.se', + 'state' => 'stable', + 'version' => '2.0.0', 'constraints' => [ 'depends' => [ - 'typo3' => '8.7.0-8.7.99', + 'typo3' => '9.5.0-9.5.99', ], 'conflicts' => [], 'suggests' => [], diff --git a/ext_localconf.php b/ext_localconf.php index 7280a94..5ffa55c 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,55 +1,14 @@ 'list, ajax' - ], - // non-cacheable actions - [ - 'Message' => 'list, ajax' - ] - ); - - // wizards - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( - 'mod { - wizards.newContentElement.wizardItems.plugins { - elements { - resultifymessagebox_message { - iconIdentifier = resultify_message_box-plugin-message - title = LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultify_message_box_message.name - description = LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultify_message_box_message.description - tt_content_defValues { - CType = list - list_type = resultifymessagebox_message - } - } - } - } - }' - ); - - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( - \TYPO3\CMS\Core\Imaging\IconRegistry::class - ); - $iconRegistry->registerIcon( - 'resultify_message_box-plugin-message', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, - ['source' => 'EXT:resultify_message_box/Resources/Public/Icons/user_plugin_message.svg'] - ); - - # clean up task - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Resultify\ResultifyMessageBox\Task\CleanUpFeUserMessagesTask'] = array( - 'extension' => 'ResultifyMessageBox', - 'title' => 'Clean Up FE users message boxes', - 'description' => 'Clean up FE users redundant messages ids' - ); - } +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'Resultify.ResultifyMessageBox', + 'Message', + [ + 'Message' => 'list, close' + ], + // non-cacheable actions + [ + 'Message' => 'list, close' + ] ); diff --git a/ext_tables.php b/ext_tables.php index 143a1c3..4ea598a 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -1,40 +1,6 @@ array( - 'exclude' => 1, - 'label' => 'LLL:EXT:resultify_message_box/Resources/Private/Language/locallang_db.xlf:tx_resultify_message_box_message.seen_messages_ids', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim' - ], - ) - ); - - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tmp_fe_users_columns, 1); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'seen_messages_ids'); - - } +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages( + 'tx_pxamessagebox_domain_model_message' ); diff --git a/ext_tables.sql b/ext_tables.sql index bb36375..bfb5ab7 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -1,49 +1,21 @@ # -# Table structure for table 'tx_resultifymessagebox_domain_model_message' +# Table structure for table 'tx_pxamessagebox_domain_model_message' # -CREATE TABLE tx_resultifymessagebox_domain_model_message ( - - uid int(11) NOT NULL auto_increment, - pid int(11) DEFAULT '0' NOT NULL, +CREATE TABLE tx_pxamessagebox_domain_model_message ( date int(11) DEFAULT '0' NOT NULL, author varchar(255) DEFAULT '' NOT NULL, headline varchar(255) DEFAULT '' NOT NULL, text text, + seen_by int(11) DEFAULT '0' NOT NULL, - tstamp int(11) unsigned DEFAULT '0' NOT NULL, - crdate int(11) unsigned DEFAULT '0' NOT NULL, - cruser_id int(11) unsigned DEFAULT '0' NOT NULL, - deleted smallint(5) unsigned DEFAULT '0' NOT NULL, - hidden smallint(5) unsigned DEFAULT '0' NOT NULL, - starttime int(11) unsigned DEFAULT '0' NOT NULL, - endtime int(11) unsigned DEFAULT '0' NOT NULL, - - t3ver_oid int(11) DEFAULT '0' NOT NULL, - t3ver_id int(11) DEFAULT '0' NOT NULL, - t3ver_wsid int(11) DEFAULT '0' NOT NULL, - t3ver_label varchar(255) DEFAULT '' NOT NULL, - t3ver_state smallint(6) DEFAULT '0' NOT NULL, - t3ver_stage int(11) DEFAULT '0' NOT NULL, - t3ver_count int(11) DEFAULT '0' NOT NULL, - t3ver_tstamp int(11) DEFAULT '0' NOT NULL, - t3ver_move_id int(11) DEFAULT '0' NOT NULL, - - sys_language_uid int(11) DEFAULT '0' NOT NULL, - l10n_parent int(11) DEFAULT '0' NOT NULL, - l10n_diffsource mediumblob, - l10n_state text, +); - PRIMARY KEY (uid), - KEY parent (pid), - KEY t3ver_oid (t3ver_oid,t3ver_wsid), - KEY language (l10n_parent,sys_language_uid) +CREATE TABLE tx_pxamessagebox_message_feuser_mm ( + uid_local int(11) DEFAULT '0' NOT NULL, + uid_foreign int(11) DEFAULT '0' NOT NULL, + sorting int(11) DEFAULT '0' NOT NULL, + KEY uid_local (uid_local), + KEY uid_foreign (uid_foreign) ); - -# -# Table structure for table 'fe_users' -# -CREATE TABLE fe_users ( - seen_messages_ids varchar(255) DEFAULT '' NOT NULL, -); \ No newline at end of file diff --git a/ext_typoscript_setup.txt b/ext_typoscript_setup.txt deleted file mode 100644 index 01ff34d..0000000 --- a/ext_typoscript_setup.txt +++ /dev/null @@ -1,16 +0,0 @@ -config.tx_extbase{ - persistence{ - classes{ - In2\Femanager\Domain\Model\User { - subclasses { - 0 = Resultify\ResultifyMessageBox\Domain\Model\User - } - } - Resultify\ResultifyMessageBox\Domain\Model\User { - mapping { - tableName = fe_users - } - } - } - } -} \ No newline at end of file