diff --git a/Classes/Controller/YoutubeDataController.php b/Classes/Controller/YoutubeDataController.php new file mode 100644 index 0000000..ff4f5d7 --- /dev/null +++ b/Classes/Controller/YoutubeDataController.php @@ -0,0 +1,154 @@ +, clickstorm GmbH + * + * All rights reserved + * + * This script is part of the TYPO3 project. The TYPO3 project is + * free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * The GNU General Public License can be found at + * http://www.gnu.org/copyleft/gpl.html. + * + * This script is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This copyright notice MUST APPEAR in all copies of the script! + ***************************************************************/ +use TYPO3\CMS\Core\Utility\ArrayUtility; + +/** + * YoutubeDataController + */ +class YoutubeDataController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { + + /** + * action initialize + * + * @return void + */ + public function initializeAction() { + $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cs_youtube_data']); + } + + /** + * action list + * + * @return void + */ + public function listAction() { + //Max results + $maxResults = $this->settings['maxResults']; + //APIKey String + $apiString = $this->extConf['apiKey']; + //If blank are in line + $apiArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $apiString); + //APIKey without blank in line + $apiKey = implode($apiArray); + //Channel id + $channelId = $this->settings['channelId']; + // Order settings + $order = $this->settings['order']; + //Part for Video (id,snippet,contentDetails,statistics,recordingDetails,player) + $videoUrlPart = $this->settings['videoUrlPart']; + //API url + $apiUrl = 'https://www.googleapis.com/youtube/v3/'; + + // get all IDs from channel videos and cast them to one string + $searchUrl = $apiUrl . 'search?'; + $searchUrl .= 'order='.$order; + $searchUrl .= '&part=id'; + $searchUrl .= '&channelId='.$channelId; + $searchUrl .= '&type=video'; + $searchUrl .= '&maxResults='.$maxResults; + $searchUrl .= '&key='.$apiKey; + + // initializes the request + $curl = curl_init(); + + // sets the url + curl_setopt($curl, CURLOPT_URL, $searchUrl); + + // enables that curl_exec() returns content instead of status code + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + // allows redirects + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); + + // performs the actual request + $data = curl_exec($curl); + // destructs the request + curl_close($curl); + + // this line converts the json string which is returned into a php object + $data = json_decode($data); + if(!empty($data->error)){ + + //Errorcode API + $errorCode = $data->error->code; + $errorCodeLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_error_code', 'cs_youtube_data'); + + //Errormessage API + $errorMessage = $data->error->message; + $errorMessageLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_error_message', 'cs_youtube_data'); + + //Reason API + $reason = $data->error->errors[0]->reason; + $errorReasonLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_error_reason', 'cs_youtube_data'); + + //Error Link + $errorLinkLanguage = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_error_link', 'cs_youtube_data'); + $errorLink = ''.$errorLinkLanguage.''; + + $messageTitle = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_error', 'cs_youtube_data'); + $messageBody = $errorCodeLanguage.$errorCode.'
'.$errorMessageLanguage.$errorMessage.'
'.$errorReasonLanguage.$reason.'
'.$errorLink; + + $this->addFlashMessage( + $messageBody, + $messageTitle, + \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR + ); + }elseif(!empty($data->items)){ + $items = array(); + + $max = sizeof($data->items); + for($i = 0; $i < $max;$i++){ + $items[$i] = $data->items[$i]->id->videoId; + } + + $videoIDs = implode(',',$items); + + if($videoIDs) { + // get all data for the given videos by IDs + $videosUrl = $apiUrl . 'videos?'; + $videosUrl .= 'part='.$videoUrlPart; + $videosUrl .= '&id='.$videoIDs; + $videosUrl .= '&key='.$apiKey; + $videos = json_decode(file_get_contents($videosUrl), true); + + //Rendering + $this->view->assign('videos', $videos['items']); + } + }else{ + $messageTitle = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_channel_false_check', 'cs_youtube_data'); + $messageBody = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('tx_csyoutubedata_channel_false', 'cs_youtube_data').' - '.$channelId.'!'; + $this->addFlashMessage( + $messageBody, + $messageTitle, + \TYPO3\CMS\Core\Messaging\AbstractMessage::WARNING + ); + } + } + + + +} \ No newline at end of file diff --git a/Classes/Helper/CsYoutubeDataWizicon.php b/Classes/Helper/CsYoutubeDataWizicon.php new file mode 100644 index 0000000..a6480ce --- /dev/null +++ b/Classes/Helper/CsYoutubeDataWizicon.php @@ -0,0 +1,33 @@ + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('cs_youtube_data') . 'Resources/Public/Icons/wizard_icon.png', + 'title' => LocalizationUtility::translate('plugin_label', 'cs_youtube_data'), + 'description' => LocalizationUtility::translate('plugin_value', 'cs_youtube_data'), + 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=csyoutubedata_pi1' + ); + + return $wizardItems; + } + +} \ No newline at end of file diff --git a/Classes/ViewHelpers/ConvertDurationViewHelper.php b/Classes/ViewHelpers/ConvertDurationViewHelper.php new file mode 100644 index 0000000..d4ab404 --- /dev/null +++ b/Classes/ViewHelpers/ConvertDurationViewHelper.php @@ -0,0 +1,43 @@ + + */ + public function render($duration) { + preg_match('#PT(.*?)H(.*?)M(.*?)S#si',$duration,$out); + if(empty($out[1])){ + preg_match('#PT(.*?)M(.*?)S#si',$duration,$out); + if(empty($out[1])){ + preg_match('#PT(.*?)S#si',$duration,$out); + if(empty($out[1])){ + return '00:00'; + }else{ + if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; } + return '00:'.$out[1]; + } + }else{ + if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; } + if(strlen($out[2])==1){ $out[2]= '0'.$out[2]; } + return $out[1].':'.$out[2]; + } + }else{ + if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; } + if(strlen($out[2])==1){ $out[2]= '0'.$out[2]; } + if(strlen($out[3])==1){ $out[3]= '0'.$out[3]; } + return $out[1].':'.$out[2].':'.$out[3]; + } + } +} +?> \ No newline at end of file diff --git a/Configuration/FlexForms/flexform_pi1.xml b/Configuration/FlexForms/flexform_pi1.xml new file mode 100644 index 0000000..dbfcae4 --- /dev/null +++ b/Configuration/FlexForms/flexform_pi1.xml @@ -0,0 +1,65 @@ + + + + 1 + 1 + + + + + + LLL:EXT:cs_youtube_data/Resources/Private/Language/locallang.xlf:tx_csyoutubedata_flexform_sheet + + array + + + + 1 + + + input + + + + + + + + select + + + LLL:EXT:cs_youtube_data/Resources/Private/Language/locallang.xlf:tx_csyoutubedata_flexform_settings.order.date + date + + + LLL:EXT:cs_youtube_data/Resources/Private/Language/locallang.xlf:tx_csyoutubedata_flexform_settings.order.viewCount + viewCount + + + LLL:EXT:cs_youtube_data/Resources/Private/Language/locallang.xlf:tx_csyoutubedata_flexform_settings.order.rating + rating + + + + + + + + 1 + + + input + 5 + + + + + + + + + \ No newline at end of file diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt new file mode 100644 index 0000000..5f5204e --- /dev/null +++ b/Configuration/TypoScript/constants.txt @@ -0,0 +1,23 @@ + +plugin.tx_csyoutubedata { + view { + # cat=plugin.tx_csyoutubedata/file; type=string; label=Path to template root (FE) + templateRootPath = EXT:cs_youtube_data/Resources/Private/Templates/ + # cat=plugin.tx_csyoutubedata/file; type=string; label=Path to template partials (FE) + partialRootPath = EXT:cs_youtube_data/Resources/Private/Partials/ + # cat=plugin.tx_csyoutubedata/file; type=string; label=Path to template layouts (FE) + layoutRootPath = EXT:cs_youtube_data/Resources/Private/Layouts/ + } + persistence { + # cat=plugin.tx_csyoutubedata//a; type=string; label=Default storage PID + storagePid = + } + settings { + # cat=plugin.tx_csyoutubedata//a; type=string; label=The part parameter (id, snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails) + videoUrlPart = id,snippet,contentDetails,statistics,recordingDetails,player + # cat=plugin.tx_csyoutubedata//a; type=intenger; label=Width of the video in px + videoPlayerWidth = 560 + # cat=plugin.tx_csyoutubedata//a; type=intenger; label=Height of the video in px + videoPlayerHeight = 315 + } +} diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt new file mode 100644 index 0000000..515815d --- /dev/null +++ b/Configuration/TypoScript/setup.txt @@ -0,0 +1,101 @@ + +plugin.tx_csyoutubedata { + view { + templateRootPaths { + 100 = {$plugin.tx_csyoutubedata.view.templateRootPath} + } + partialRootPaths { + 100 = {$plugin.tx_csyoutubedata.view.partialRootPath} + } + layoutRootPaths { + 100 = {$plugin.tx_csyoutubedata.view.layoutRootPath} + } + } + persistence { + storagePid = {$plugin.tx_csyoutubedata.persistence.storagePid} + } + settings{ + videoUrlPart = {$plugin.tx_csyoutubedata.settings.videoUrlPart} + videoPlayerWidth = {$plugin.tx_csyoutubedata.settings.videoPlayerWidth} + videoPlayerHeight = {$plugin.tx_csyoutubedata.settings.videoPlayerHeight} + } + _CSS_DEFAULT_STYLE ( + #typo3-messages { + margin-bottom: 10px; + font-family: arial, sans-serif; } + + .typo3-message { + margin-bottom: 4px; + padding: 12px; + padding-left: 36px; } + + .typo3-message ul, .typo3-message ol { + padding-left: 16px; } + + .typo3-message .message-header { + display: block; } + + .typo3-message { + border: 1px solid; + background-position: 10px 12px; + background-repeat: no-repeat; } + + .typo3-message a { + text-decoration: underline; } + + .typo3-message li { + margin-bottom: 10px; + list-style: disc; } + + .typo3-message .message-header { + font-size: 11px; + font-weight: bold; } + + .message-notice { + color: #777; + background-color: #f6f7fa; + background-image: url("/typo3/sysext/t3skin/icons/gfx/notice.png"); + border-color: #c2cbcf; } + + .message-notice a { + color: #777; } + + .message-information { + color: #4c73a1; + background-color: #eaf7ff; + background-image: url("/typo3/sysext/t3skin/icons/gfx/information.png"); + border-color: #c5dbe6; } + + .message-information a { + color: #4c73a1; } + + .message-ok { + color: #3b7826; + background-color: #cdeaca; + background-image: url("/typo3/sysext/t3skin/icons/gfx/ok.png"); + border-color: #58b548; } + + .message-ok a { + color: #3b7826; } + + .message-warning { + color: #9e7d4a; + background-color: #fbf6de; + background-image: url("/typo3/sysext/t3skin/icons/gfx/warning.png"); + border-color: #b1905c; } + + .message-warning a { + color: #9e7d4a; } + + .message-error { + color: #aa0225; + background-color: #f6d3cf; + background-image: url("/typo3/sysext/t3skin/icons/gfx/error.png"); + border-color: #d66c68; } + + .message-error a { + color: #aa0225; } + ) +} + +page.includeCSS.tx_csyoutubedata = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css diff --git a/Documentation/.gitignore b/Documentation/.gitignore new file mode 100644 index 0000000..d35112a --- /dev/null +++ b/Documentation/.gitignore @@ -0,0 +1,23 @@ +######################### +# Git +# global ignore file +######################## +# ignoring temporary files (left by e.g. vim) +# ignoring by common IDE's used directories/files +# dont ignore .rej and .orig as we want to see/clean files after conflict resolution +# +# for local exclude patterns please edit .git/info/exclude +# +*~ +*.bak +*.idea +*.project +*.swp +.buildpath +.cache +.project +.session +.settings +.TemporaryItems +.webprj +nbproject diff --git a/Documentation/Administrator/Index.rst b/Documentation/Administrator/Index.rst new file mode 100644 index 0000000..e59d56e --- /dev/null +++ b/Documentation/Administrator/Index.rst @@ -0,0 +1,13 @@ +.. include:: ../Includes.txt + + +.. _admin-manual: + +Administrator Manual +==================== + +- Fields are listed in the section “Users manual”. + +- You can configure via TypoScript how width and height from youtube-iframe. + +- It's bootstrap.min.css involved. diff --git a/Documentation/Configuration/Index.rst b/Documentation/Configuration/Index.rst new file mode 100644 index 0000000..dcb9127 --- /dev/null +++ b/Documentation/Configuration/Index.rst @@ -0,0 +1,14 @@ +.. include:: ../Includes.txt + +Configuration +------------- + + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + QuickStart/Index + Reference/Index + diff --git a/Documentation/Configuration/QuickStart/Index.rst b/Documentation/Configuration/QuickStart/Index.rst new file mode 100644 index 0000000..3c16087 --- /dev/null +++ b/Documentation/Configuration/QuickStart/Index.rst @@ -0,0 +1,11 @@ +.. include:: ../../Includes.txt + +Quick Start +^^^^^^^^^^^ + +- First of all insert API Key in the configuration section of the plugin in the extension manager of TYPO3. + +- Include the TypoScript from the extension. + +- Create a frontend plugin and choose Youtube Data V3. + diff --git a/Documentation/Configuration/Reference/Index.rst b/Documentation/Configuration/Reference/Index.rst new file mode 100644 index 0000000..273aa98 --- /dev/null +++ b/Documentation/Configuration/Reference/Index.rst @@ -0,0 +1,113 @@ +.. include:: ../../Includes.txt + +Reference +^^^^^^^^^ + + + +Constants +"""""""""" + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + Property + view.templateRootPath + + Data type + file + + Description + Path to template root (FE) + + Default + EXT:cs\_youtube\_data/Resources/Private/Templates/ + + +.. container:: table-row + + Property + view.layoutRootPath + + Data type + file + + Description + Path to template layouts (FE) + + Default + EXT:cs\_youtube\_data/Resources/Private/Layouts/ + + +.. container:: table-row + + Property + view.partialRootPath + + Data type + file + + Description + Path to template partials (FE) + + Default + EXT:cs\_youtube\_data/Resources/Private/Partials/ + + +.. container:: table-row + + Property + settings.videoUrlPart + + Data type + String + + Description + The part parameter (id, snippet, contentDetails, fileDetails, liveStreamingDetails, localizations, player, processingDetails, recordingDetails, statistics, status, suggestions, and topicDetails) + + Default + id,snippet,contentDetails,statistics,recordingDetails,player + + +.. container:: table-row + + Property + settings.videoPlayerWidth + + Data type + intenger + + Description + Width of the video in px + + Default + 560 + + +.. container:: table-row + + Property + settings.videoPlayerHeight + + Data type + intenger + + Description + Height of the video in px + + Default + 315 + + +.. ###### END~OF~TABLE ###### + + +Example +~~~~~~~ + +:: + + page.includeCSS.tx_csyoutubedata = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css + plugin.tx_csyoutubedata.settings.videoPlayerWidth = 560 + plugin.tx_csyoutubedata.settings.videoPlayerHeight = 315 diff --git a/Documentation/Images/extension_settings.png b/Documentation/Images/extension_settings.png new file mode 100644 index 0000000..e5cfcfd Binary files /dev/null and b/Documentation/Images/extension_settings.png differ diff --git a/Documentation/Images/frontend.png b/Documentation/Images/frontend.png new file mode 100644 index 0000000..698b0a9 Binary files /dev/null and b/Documentation/Images/frontend.png differ diff --git a/Documentation/Images/plugin_element.png b/Documentation/Images/plugin_element.png new file mode 100644 index 0000000..904f65d Binary files /dev/null and b/Documentation/Images/plugin_element.png differ diff --git a/Documentation/Images/plugin_settings.png b/Documentation/Images/plugin_settings.png new file mode 100644 index 0000000..ca8712d Binary files /dev/null and b/Documentation/Images/plugin_settings.png differ diff --git a/Documentation/Images/ts_settings.png b/Documentation/Images/ts_settings.png new file mode 100644 index 0000000..daedd3d Binary files /dev/null and b/Documentation/Images/ts_settings.png differ diff --git a/Documentation/Includes.txt b/Documentation/Includes.txt new file mode 100644 index 0000000..64db0b9 --- /dev/null +++ b/Documentation/Includes.txt @@ -0,0 +1,17 @@ + + +.. ================================================== +.. FOR YOUR INFORMATION +.. -------------------------------------------------- +.. -*- coding: utf-8 -*- with BOM. + + + +.. ================================================== +.. DEFINE SOME TEXTROLES +.. -------------------------------------------------- +.. role:: underline +.. role:: typoscript(code) +.. role:: ts(typoscript) + :class: typoscript +.. role:: php(code) diff --git a/Documentation/Index.rst b/Documentation/Index.rst new file mode 100644 index 0000000..1e9eb58 --- /dev/null +++ b/Documentation/Index.rst @@ -0,0 +1,54 @@ +.. include:: Includes.txt + +=================== +Youtube Data V3 +=================== + +.. only:: html + + :Classification: + cs_youtube_data + + :Version: + |release| + + :Language: + en + + :Description: + Youtube Data extension. Simply ID from Youtube channel enter and display the last videos. Youtube API is required. + + :Keywords: + youtube, videos, Youtube Channel, Youtube API, Youtube Video + + :Copyright: + 2015 + + :Author: + Andreas Kirilow + + :Email: + kirilow@clickstorm.de + + :License: + This document is published under the Open Content License + available from http://www.opencontent.org/opl.shtml + + :Rendered: + |today| + + + **Table of Contents** + +.. toctree:: + :maxdepth: 5 + :titlesonly: + :glob: + + Introduction/Index + User/Index + Tutorial/Index + Administrator/Index + Configuration/Index + KnownProblems/Index + ToDoList/Index diff --git a/Documentation/Introduction/Images.txt b/Documentation/Introduction/Images.txt new file mode 100644 index 0000000..2e55212 --- /dev/null +++ b/Documentation/Introduction/Images.txt @@ -0,0 +1,7 @@ +.. |screenshot| image:: ../Images/frontend.png + :height: 956 + :width: 1168 +.. :align: left +.. :border: 1 +.. :name: Screenshot + diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst new file mode 100644 index 0000000..0da5fbd --- /dev/null +++ b/Documentation/Introduction/Index.rst @@ -0,0 +1,46 @@ +.. include:: ../Includes.txt +.. include:: Images.txt + +.. _introduction: + +Introduction +============ + +.. _what-it-does: + +What does it do? +---------------- + +The Extension provides a plugin to show a list of the videos from a YouTube channel. + +.. _features: + +Features +-------- + +- With Extbase / fluid Written + +- Works with Youtube API V3 + +- Youtube API V3 API key is required + +- Is heading of Video + +- Is of the video in different sizes + +- Is the video ID + +- Is Video Description + +- Is duration of the video + + +.. _screenshots: + +Screenshots +----------- + +|screenshot| + +*Sample output from the video.* + diff --git a/Documentation/KnownProblems/Index.rst b/Documentation/KnownProblems/Index.rst new file mode 100644 index 0000000..6b9adf3 --- /dev/null +++ b/Documentation/KnownProblems/Index.rst @@ -0,0 +1,14 @@ +.. include:: ../Includes.txt + +.. _known-problems: + +Known Problems +============== + +- None so far. + +- If you've found some, please contact me or visit `TYPO3 Forge + `_ + + + diff --git a/Documentation/ToDoList/Index.rst b/Documentation/ToDoList/Index.rst new file mode 100644 index 0000000..145254c --- /dev/null +++ b/Documentation/ToDoList/Index.rst @@ -0,0 +1,14 @@ +.. include:: ../Includes.txt + +.. _todo: + +To-Do list +========== + +- Nothing so far + +- If you have a feature please contact me or visit `TYPO3 Forge of + cs\_youtube\_data `_ + + diff --git a/Documentation/Tutorial/Images.txt b/Documentation/Tutorial/Images.txt new file mode 100644 index 0000000..685e820 --- /dev/null +++ b/Documentation/Tutorial/Images.txt @@ -0,0 +1,35 @@ +.. |img-api| image:: ../Images/extension_settings.png + :height: 240 + :width: 540 +.. :align: left +.. :border: 1 +.. :name: Grafik5 +.. :vspace: 9 + +.. |img-ts| image:: ../Images/ts_settings.png + :height: 402 + :width: 726 +.. :align: left +.. :border: 1 +.. :name: Grafik8 + +.. |img-plugin| image:: ../Images/plugin_element.png + :height: 182 + :width: 693 +.. :align: left +.. :border: 1 +.. :name: Grafik14 + +.. |img-plugin-settings| image:: ../Images/plugin_settings.png + :height: 443 + :width: 492 +.. :align: left +.. :border: 1 +.. :name: Grafik15 + +.. |img-finish| image:: ../Images/frontend.png + :height: 956 + :width: 1168 +.. :align: left +.. :border: 1 +.. :name: Grafik16 diff --git a/Documentation/Tutorial/Index.rst b/Documentation/Tutorial/Index.rst new file mode 100644 index 0000000..e3a9d91 --- /dev/null +++ b/Documentation/Tutorial/Index.rst @@ -0,0 +1,24 @@ +.. include:: ../Includes.txt +.. include:: Images.txt + +.. _tutorial: + +Tutorial +======== + +#. Install the Extension. + +#. Insert extension settings API Key. + |img-api| +#. Include the TypoScript from cs\_youtube\_data. + |img-ts| + +#. Create a page content of the type plugin. Choose Youtube Data V3. + |img-plugin| + + |img-plugin-settings| + +#. Finish. + |img-finish| + + diff --git a/Documentation/User/Images.txt b/Documentation/User/Images.txt new file mode 100644 index 0000000..26ee003 --- /dev/null +++ b/Documentation/User/Images.txt @@ -0,0 +1,13 @@ +.. |img-4| image:: ../Images/extension_settings.png + :height: 240 + :width: 540 +.. :align: left +.. :border: 1 +.. :name: Grafik1 + +.. |img-5| image:: ../Images/plugin_settings.png + :height: 443 + :width: 492 +.. :align: left +.. :border: 1 +.. :name: Grafik2 diff --git a/Documentation/User/Index.rst b/Documentation/User/Index.rst new file mode 100644 index 0000000..cf29bb5 --- /dev/null +++ b/Documentation/User/Index.rst @@ -0,0 +1,61 @@ +.. include:: ../Includes.txt +.. include:: Images.txt + +.. _user-manual: + +Users Manual +============ + +- Awarded when the settings of the extension API Key + +- Add "channelID" from Youtube channel + +- Sort by (date, Number of viewed videos, rating) + +- maximum number of items (0-50) + + +|img-4| + +|img-5| + +The following table shows the essential configurations. + +.. ### BEGIN~OF~TABLE ### + +.. container:: table-row + + Property + channelID + + Description + Add "channelID" from Youtube channel + + + +.. container:: table-row + + Property + Sort by + + Description + Sort by (date, Number of viewed videos, rating) + + +.. container:: table-row + + Property + maximum number + + Description + maximum number of items (0-50) + +.. container:: table-row + + Property + API Key + + Description + API Key Request.: `https://developers.google.com/youtube/v3/getting-started `_ + +.. ###### END~OF~TABLE ###### diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf new file mode 100644 index 0000000..4a3128b --- /dev/null +++ b/Resources/Private/Language/de.locallang.xlf @@ -0,0 +1,78 @@ + + + +
+ LFEditor +
+ + + Youtube Data V3 + Youtube Data V3 + + + Here you can edit the Youtube Data V3 + Hier können Sie die Youtube Daten V3 bearbeiten + + + The channel id is false + Der Kanal-ID ist falsch + + + Check your channel id + Überprüfen Sie Ihre Kanal-ID + + + Error + Fehler + + + ERROR CODE: + FEHLERCODE: + + + more infos + mehr Infos + + + ERROR MESSAGE: + FEHLERMELDUNG: + + + REASON: + GRUND: + + + Add "channelID" from Youtube channel + Fügen Sie "ChannelId" von Youtube Kanal + + + maximum number of items (0-50) + maximale Anzahl der Elemente (0-50) + + + sort by + Sortieren nach + + + Date + Datum + + + Rating + Wertung + + + Number of viewed videos + Anzahl der angesehene Videos + + + Settings + Einstellungen + + + No videos were found. Check the channel ID and the API key. + Es wurden keine Videos gefunden. Überprüfen Sie die Kanal-ID und die API-Schlüssel. + + +
+
\ No newline at end of file diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf new file mode 100644 index 0000000..01f5343 --- /dev/null +++ b/Resources/Private/Language/locallang.xlf @@ -0,0 +1,61 @@ + + + +
+ LFEditor +
+ + + Youtube Data V3 + + + Here you can edit the Youtube Data V3 + + + The channel id is false + + + Check your channel id + + + Error + + + ERROR CODE: + + + more infos + + + ERROR MESSAGE: + + + REASON: + + + Add "channelID" from Youtube channel + + + maximum number of items (0-50) + + + sort by + + + Date + + + Rating + + + Number of viewed videos + + + Settings + + + No videos were found. Check the channel ID and the API key. + + +
+
\ No newline at end of file diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html new file mode 100644 index 0000000..e1cfc16 --- /dev/null +++ b/Resources/Private/Layouts/Default.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/Resources/Private/Partials/Video.html b/Resources/Private/Partials/Video.html new file mode 100644 index 0000000..9964ca6 --- /dev/null +++ b/Resources/Private/Partials/Video.html @@ -0,0 +1,62 @@ +{namespace cs=Clickstorm\CsYoutubeData\ViewHelpers} + + + + Partials: Video + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID{video.id}
Title Channel{video.snippet.channelTitle}
Title Video{video.snippet.title}
Description{video.snippet.description}
Image (Medium - 320x180)
Image other values(Default - 120x90), (Medium - 320x180), (High - 480x360), (Standard - 640x480), (Maxres - 1280x720)
+ Video ({settings.videoPlayerWidth} x {settings.videoPlayerHeight}) + + +
LinkWatch on YouTube
Viewer{video.statistics.viewCount}
Likes{video.statistics.likeCount}
Duration min
+
+
+ \ No newline at end of file diff --git a/Resources/Private/Templates/YoutubeData/List.html b/Resources/Private/Templates/YoutubeData/List.html new file mode 100644 index 0000000..8dfb06b --- /dev/null +++ b/Resources/Private/Templates/YoutubeData/List.html @@ -0,0 +1,17 @@ + + +
+ + + + + + +

{video.snippet.channelTitle}

+
+ +
+
+
+
\ No newline at end of file diff --git a/Resources/Public/Icons/wizard_icon.png b/Resources/Public/Icons/wizard_icon.png new file mode 100644 index 0000000..215785e Binary files /dev/null and b/Resources/Public/Icons/wizard_icon.png differ diff --git a/ext_conf_template.txt b/ext_conf_template.txt new file mode 100644 index 0000000..1aa6c58 --- /dev/null +++ b/ext_conf_template.txt @@ -0,0 +1,2 @@ +# cat=basic; type=string; label = API Key +apiKey = \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php new file mode 100644 index 0000000..d6a240b --- /dev/null +++ b/ext_emconf.php @@ -0,0 +1,35 @@ + '[clickstorm] Youtube Data V3', + 'description' => 'Displays a youtube channel on your page', + 'category' => 'plugin', + 'author' => 'Andreas Kirilow - clickstorm GmbH', + 'author_email' => 'kirilow@clickstorm.de', + 'author_company' => 'clickstorm GmbH', + 'state' => 'stable', + 'internal' => '', + 'uploadfolder' => '0', + 'createDirs' => '', + 'clearCacheOnLoad' => 0, + 'version' => '1.0.5', + 'constraints' => array( + 'depends' => array( + 'typo3' => '6.2.6-7.6.99', + ), + 'conflicts' => array( + ), + 'suggests' => array( + ), + ), +); \ No newline at end of file diff --git a/ext_icon.png b/ext_icon.png new file mode 100644 index 0000000..64518fe Binary files /dev/null and b/ext_icon.png differ diff --git a/ext_localconf.php b/ext_localconf.php new file mode 100644 index 0000000..a0e5bdc --- /dev/null +++ b/ext_localconf.php @@ -0,0 +1,18 @@ + 'list', + + ), + // non-cacheable actions + array( + 'YoutubeData' => '', + + ) +); diff --git a/ext_tables.php b/ext_tables.php new file mode 100644 index 0000000..5a9bf04 --- /dev/null +++ b/ext_tables.php @@ -0,0 +1,27 @@ +