Commit 72589082 authored by speedprogs_de's avatar speedprogs_de

added JSON and RSS view, corrected copyright notice

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/terfe/branches/ter_fe2@45105 735d13b6-9817-0410-8766-e36946ffe9aa
parent bd960850
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......@@ -97,7 +97,6 @@
}
/**
* List by category action, displays all extensions in a category
*
......
......@@ -2,8 +2,7 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......@@ -129,7 +129,7 @@
* @var boolean
*/
protected $internal;
/**
* Whether extension will be loaded in Frontend or not
* @var boolean
......@@ -334,8 +334,8 @@
public function getVersionNumber() {
return $this->versionNumber;
}
/**
* Setter for versionString
*
......
......@@ -2,8 +2,8 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* and Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
*
* All rights reserved
*
......
......@@ -2,8 +2,7 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
......@@ -245,7 +244,7 @@
* Create a Software relation
*
* @param array $relationInfo Relation information
* @return Tx_TerFe2_Domain_Model_Relation New relation object
* @return Tx_TerFe2_Domain_Model_Relation New Relation object
*/
protected function createSoftwareRelation(array $relationInfo) {
// Get version range
......@@ -275,12 +274,13 @@
$extension = $this->extensionRepository->findOneByExtKey($extInfo['extKey']);
if ($extension === NULL) {
// Create new Extension
$dateTime = new DateTime();
$extension = t3lib_div::makeInstance('Tx_TerFe2_Domain_Model_Extension');
$extension->setExtKey($extInfo['extKey']);
$extension->setForgeLink($extInfo['forgeLink']);
$extension->setHudsonLink($extInfo['hudsonLink']);
$extension->setLastUpload(new DateTime());
$extension->setLastMaintained(new DateTime());
$extension->setLastUpload($dateTime);
$extension->setLastMaintained($dateTime);
}
return $extension;
......
<?php
/*******************************************************************
* Copyright notice
*
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* 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 2 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!
******************************************************************/
/**
* JSON view for the list action of the Extension controller
*
* @version $Id$
* @copyright Copyright belongs to the respective authors
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
class Tx_TerFe2_View_Extension_ListJson extends Tx_Extbase_MVC_View_AbstractView {
/**
* @var array
*/
protected $settings;
/**
* Inject extension settings
*
* @return void
*/
public function injectSettings(array $settings) {
$this->settings = Tx_TerFe2_Utility_TypoScript::parse($settings);
}
/**
* Render method, returns latest Extensions
*
* @return string JSON content
*/
public function render() {
$extensions = array();
if (!empty($this->variables['extensions'])) {
$extensions = $this->variables['extensions'];
}
return json_encode($extensions);
}
}
?>
\ No newline at end of file
<?php
/*******************************************************************
* Copyright notice
*
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* 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 2 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!
******************************************************************/
/**
* JSON view for the listLatest action of the Extension controller
*
* @version $Id$
* @copyright Copyright belongs to the respective authors
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
class Tx_TerFe2_View_Extension_ListLatestJson extends Tx_Extbase_MVC_View_AbstractView {
/**
* @var array
*/
protected $settings;
/**
* Inject extension settings
*
* @return void
*/
public function injectSettings(array $settings) {
$this->settings = Tx_TerFe2_Utility_TypoScript::parse($settings);
}
/**
* Render method, returns latest Extensions
*
* @return string JSON content
*/
public function render() {
$extensions = array();
if (!empty($this->variables['extensions'])) {
$extensions = $this->variables['extensions'];
}
return json_encode($extensions);
}
}
?>
\ No newline at end of file
......@@ -2,8 +2,7 @@
/*******************************************************************
* Copyright notice
*
* (c) 2011 Thomas Loeffler <loeffler@spooner-web.de>, Spooner Web
* Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
* (c) 2011 Kai Vogel <kai.vogel@speedprogs.de>, Speedprogs.de
*
* All rights reserved
*
......
# ======================================================================
# Default configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2 {
settings {
# cat=TER Frontend/settings/100; type=int+; label=Count of results in latest Extensions overview
latestCount = 20
fileProvider {
# cat=TER Frontend/settings/200; type=string; label=Class name of the Filesystem Extension Provider
className = Tx_TerFe2_ExtensionProvider_FileProvider
# cat=TER Frontend/settings/210; type=string; label=Extension root path in local filesystem
extensionRootPath = fileadmin/ter/
# cat=TER Frontend/settings/220; type=boolean; label=Use Extension Manager mirror system for file downloads
useEmMirrors = 0
}
soapProvider {
# cat=TER Frontend/settings/400; type=string; label=Class name of the SOAP Extension Provider
className = Tx_TerFe2_ExtensionProvider_SoapProvider
# cat=TER Frontend/settings/410; type=string; label=URL to WSDL file on SOAP server
wsdlUrl =
# cat=TER Frontend/settings/420; type=string; label=Username for the authentication on SOAP server
username =
# cat=TER Frontend/settings/430; type=string; label=Password for the authentication on SOAP server
password =
# cat=TER Frontend/settings/440; type=string; label=Name of the function to get updated Extensions
updateFunc =
# cat=TER Frontend/settings/450; type=string; label=Name of the function to get the URL to a file
getFileFunc =
}
}
persistence {
# cat=TER Frontend/persistence/100; type=int+; label=General storage PID for the TER Frontend Index
storagePid = 0
}
view {
# cat=TER Frontend/view/200; type=string; label=Path to template root
templateRootPath = EXT:ter_fe2/Resources/Private/Templates/
# cat=TER Frontend/view/210; type=string; label=Path to template partials
partialRootPath = EXT:ter_fe2/Resources/Private/Partials/
# cat=TER Frontend/view/220; type=string; label=Path to template layouts
layoutRootPath = EXT:ter_fe2/Resources/Private/Layouts/
}
}
\ No newline at end of file
# ======================================================================
# Plugin configuration ot the extension "ter_fe2"
# Default configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2 {
## General settings
......
# ======================================================================
# JSON output configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2.jsonOutput {
# cat=TER Frontend - JSON/json/100; type=int+; label=Type number of the JSON page object
typeNum = 95832
}
\ No newline at end of file
# ======================================================================
# JSON output configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2.settings.jsonOutput {
typeNum = {$plugin.tx_terfe2.jsonOutput.typeNum}
}
jsonOutput = PAGE
jsonOutput {
typeNum = {$plugin.tx_terfe2.jsonOutput.typeNum}
10 =< tt_content.list.20.terfe2_pi1
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/json
xhtml_cleaning = 0
admPanel = 0
}
}
\ No newline at end of file
# ======================================================================
# RSS output configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2.rssOutput {
# cat=TER Frontend - RSS/rss/100; type=int+; label=Type number of the RSS page object
typeNum = 95831
}
\ No newline at end of file
# ======================================================================
# RSS output configuration ot the extension "ter_fe2"
# ======================================================================
plugin.tx_terfe2.settings.rssOutput {
typeNum = {$plugin.tx_terfe2.rssOutput.typeNum}
}
rssOutput = PAGE
rssOutput {
typeNum = {$plugin.tx_terfe2.rssOutput.typeNum}
10 =< tt_content.list.20.terfe2_pi1
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:application/xml
xhtml_cleaning = 0
admPanel = 0
}
}
\ No newline at end of file
plugin.tx_terfe2 {
settings {
# cat=plugin.tx_terfe2/settings/100; type=int+; label=Count of results in latest Extensions overview
latestCount = 20
fileProvider {
# cat=plugin.tx_terfe2/settings/200; type=string; label=Class name of the Filesystem Extension Provider
className = Tx_TerFe2_ExtensionProvider_FileProvider
# cat=plugin.tx_terfe2/settings/210; type=string; label=Extension root path in local filesystem
extensionRootPath = fileadmin/ter/
# cat=plugin.tx_terfe2/settings/220; type=boolean; label=Use Extension Manager mirror system for file downloads
useEmMirrors = 0
}
soapProvider {
# cat=plugin.tx_terfe2/settings/400; type=string; label=Class name of the SOAP Extension Provider
className = Tx_TerFe2_ExtensionProvider_SoapProvider
# cat=plugin.tx_terfe2/settings/410; type=string; label=URL to WSDL file on SOAP server
wsdlUrl =
# cat=plugin.tx_terfe2/settings/420; type=string; label=Username for the authentication on SOAP server
username =
# cat=plugin.tx_terfe2/settings/430; type=string; label=Password for the authentication on SOAP server
password =
# cat=plugin.tx_terfe2/settings/440; type=string; label=Name of the function to get updated Extensions
updateFunc =
# cat=plugin.tx_terfe2/settings/450; type=string; label=Name of the function to get the URL to a file
getFileFunc =
}
}
persistence {
# cat=plugin.tx_terfe2/persistence/100; type=int+; label=General storage PID for the TER Frontend Index
storagePid = 0
}
view {
# cat=plugin.tx_terfe2/view/200; type=string; label=Path to template root
templateRootPath = EXT:ter_fe2/Resources/Private/Templates/
# cat=plugin.tx_terfe2/view/210; type=string; label=Path to template partials
partialRootPath = EXT:ter_fe2/Resources/Private/Partials/
# cat=plugin.tx_terfe2/view/220; type=string; label=Path to template layouts
layoutRootPath = EXT:ter_fe2/Resources/Private/Layouts/
}
}
\ No newline at end of file
<f:layout name="Default" />
<f:section name="main">
<h3>Basic Actions</h3>
<f:link.action action="listLatest">&raquo; New and Updated Extensions</f:link.action><br />
<f:link.action action="list">&raquo; All Extensions</f:link.action><br />
<f:link.action controller="Category" action="index">&raquo; Categories</f:link.action><br />
<f:link.action controller="Tag" action="index">&raquo; Tags</f:link.action><br />
<f:link.action controller="Author" action="index">&raquo; Authors</f:link.action><br />
<h3>JSON Output</h3>
<f:link.action action="listLatest" format="json" pageType="{settings.jsonOutput.typeNum}">&raquo; New and Updated Extensions</f:link.action><br />
<f:link.action action="list" format="json" pageType="{settings.jsonOutput.typeNum}">&raquo; All Extensions</f:link.action><br />
</f:section>
\ No newline at end of file
......@@ -14,9 +14,9 @@ $EM_CONF[$_EXTKEY] = array(
'title' => 'TER Frontend Index',
'description' => 'New TER Frontend based on Extbase and Fluid',
'category' => 'plugin',
'author' => 'Thomas Loeffler,Kai Vogel',
'author_email' => 'loeffler@spooner-web.de,kai.vogel@speedprogs.de',
'author_company' => 'Spooner Web,Speedprogs.de',
'author' => 'Kai Vogel,Thomas Loeffler',
'author_email' => 'kai.vogel@speedprogs.de,loeffler@spooner-web.de',
'author_company' => 'Speedprogs.de,Spooner Web',
'shy' => '',
'dependencies' => 'cms,extbase,fluid',
'conflicts' => '',
......
......@@ -11,7 +11,9 @@
);
// Add static TypoScript files
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'TER Frontend Index');
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Default/', 'TER Frontend - Default Configuration');
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Rss/', 'TER Frontend - RSS Output');
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Json/', 'TER Frontend - JSON Output');
// Add flexform to field list of the Backend form
$extIdent = strtolower(t3lib_div::underscoredToUpperCamelCase($_EXTKEY)) . '_pi1';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment