Feature GoogleService included
authorBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 26 Dec 2013 21:36:29 +0000 (22:36 +0100)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 26 Dec 2013 21:36:29 +0000 (22:36 +0100)
Change-Id: Ibe5b78b88a1a950d0f8075e39c4784e82020c214

14 files changed:
Classes/Controller/PageController.php [changed mode: 0755->0644]
Classes/Domain/Model/Page.php [changed mode: 0755->0644]
Classes/Domain/Model/TextRevision.php [changed mode: 0755->0644]
Classes/Domain/Model/User.php [changed mode: 0755->0644]
Classes/Domain/Repository/PageRepository.php [changed mode: 0755->0644]
Classes/Helper/RenderHelper.php
Classes/Service/GoogleSitemapService.php [new file with mode: 0644]
Configuration/FlexForms/flexform_typo3wiki.xml
Configuration/TCA/Page.php [changed mode: 0755->0644]
Configuration/TCA/TextRevision.php [changed mode: 0755->0644]
Configuration/TCA/User.php [changed mode: 0755->0644]
Configuration/TypoScript/constants.txt [changed mode: 0755->0644]
Configuration/TypoScript/setup.txt [changed mode: 0755->0644]
ext_localconf.php

old mode 100755 (executable)
new mode 100644 (file)
index 96c62b6..7a4c871
  ***************************************************************/
 
 /**
- *
+ * class Tx_Typo3wiki_Controller_PageController
  *
  * @package typo3wiki
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
  *
  */
-// @todo implement User to System
 class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_ActionController {
 
        /**
@@ -57,7 +56,7 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
         * @return void
         */
        public function indexAction() {
-               $this->forward('show', NULL, NULL, array('page' => $this->settings['indexPageTitle']));
+               $this->redirect('show', NULL, NULL, array('page' => $this->settings['indexPageTitle']));
        }
 
        /**
@@ -72,7 +71,7 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
                if($page === NULL ) $page = $this->pageRepository->findOneByPageTitle($this->request->getArgument('page'));
                if($page === NULL || $page->getMainRevision() === NULL){
                        if($page === NULL ){
-                               $this->request->getArgument('page');
+                               $target = $this->request->getArgument('page');
                        }else{
                                $target = $page->getPageTitle();
                        }
@@ -101,8 +100,7 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
         *
         * @param Tx_Typo3wiki_Domain_Model_Page $page
         * @dontvalidate $page
-        *
-        * @return vpid
+        * @return void
         */
        public function unknownPageAction(Tx_Typo3wiki_Domain_Model_Page $page = NULL){
                if($page === NULL){
@@ -117,15 +115,12 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
         * action edit
         *
         * @param Tx_Typo3wiki_Domain_Model_Page $page
-        * @dontvalidate $page
-     *
-     * @param string $unrenderedText
-     * @dontvalidate $unrenderedText
-     *
-     * @param string $changes
-     * @dontvalidate $changes
-     *
+        * @param mixed $unrenderedText
+        * @param mixed $changes
         * @return void
+        * @dontvalidate $page
+        * @dontvalidate $unrenderedText
+        * @dontvalidate $changes
         */
        public function editAction(Tx_Typo3wiki_Domain_Model_Page $page = NULL, $unrenderedText = NULL, $changes = NULL) {
                if($page === NULL) $page = $this->pageRepository->findOneByPageTitle($this->request->getArgument('page'));
@@ -138,18 +133,18 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
                }
                if(!$page->allowEdit($this->settings)) $this->redirect('show', NULL, NULL, array('page' => $page));
 
-        $preview = NULL;
-        $myUnrenderedText = '';
+               $preview = NULL;
+               $myUnrenderedText = '';
                if($page->getMainRevision() !== NULL) $myUnrenderedText = $page->getMainRevision()->getUnrenderedText();
                if($unrenderedText !== NULL){
-            $renderHelper = $this->createRenderHelper();
+                       $renderHelper = $this->createRenderHelper();
                        $preview = $renderHelper->renderText($unrenderedText);
                        $myUnrenderedText = $unrenderedText;
-        }
-        $this->view->assign('preview', $preview);
-        $this->view->assign('changes', $changes);
-        $this->view->assign('page', $page);
-        $this->view->assign('unrenderedText', $myUnrenderedText);
+               }
+               $this->view->assign('preview', $preview);
+               $this->view->assign('changes', $changes);
+               $this->view->assign('page', $page);
+               $this->view->assign('unrenderedText', $myUnrenderedText);
        }
 
        /**
@@ -162,23 +157,23 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
                if($page === NULL) $page = $this->pageRepository->findOneByPageTitle($this->request->getArgument('page'));
                if(!$page->allowEdit($this->settings)) $this->redirect('show', NULL, NULL, array('page' => $page));
                $text = $this->request->getArgument('text');
-        $changes = $this->request->getArgument('changes');
-        try{
-            $this->request->getArgument('preview');
-            $preview = TRUE;
-        }catch(Exception $e){
-            $preview = FALSE;
-        }
-        if(isset($page) && $preview){
-            $this->forward('edit', NULL, NULL, array('page' => $page, 'unrenderedText' => $text, 'changes' => $changes));
-        }
-
-
-        $revision = $this->objectManager->get('Tx_Typo3wiki_Domain_Model_TextRevision');
+               $changes = $this->request->getArgument('changes');
+               try{
+                       $this->request->getArgument('preview');
+                       $preview = TRUE;
+               }catch(Exception $e){
+                       $preview = FALSE;
+               }
+               if(isset($page) && $preview){
+                       $this->forward('edit', NULL, NULL, array('page' => $page, 'unrenderedText' => $text, 'changes' => $changes));
+               }
+
+
+               $revision = $this->objectManager->get('Tx_Typo3wiki_Domain_Model_TextRevision');
                $revision->setUnrenderedText($text);
                $revision->setWriteDate(new DateTime('NOW'));
                $revision->setRenderedText('');
-        $revision->setChanges($changes);
+               $revision->setChanges($changes);
 
                $redirection = preg_match('/\[\[REDIRECT:(.*)\]\]/i', $text, $matches);
                if($redirection === 1){
@@ -232,7 +227,7 @@ class Tx_Typo3wiki_Controller_PageController extends Tx_Extbase_MVC_Controller_A
         */
        private function checkCategoryAssociation(Tx_Typo3wiki_Domain_Model_Page $page){
                foreach($page->getCategoryPages() as $catPage){
-                       if($catPage->getMainRevision() !== NULL && FALSE === strpos($catPage->getMainRevision()->getUnrenderedText(),'{'.$page->getPageTitle().'}')){
+                       if($catPage->getMainRevision() !== NULL && FALSE === strpos($catPage->getMainRevision()->getUnrenderedText(),'{' . $page->getPageTitle() . '}')){
                                $page->removeCategoryPage($catPage);
                        }
                }
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 6ecea69..a92d1cf 100644 (file)
 <?php
-       /***************************************************************
-        *  Copyright notice
-        *
-        *  (c) 2012 Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
-        *
-        *  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!
-        ***************************************************************/
-       require_once(__DIR__ . '/markdown.php');
-       require_once(__DIR__ . '/geshi.php');
-
-       /**
-        * class Tx_Typo3wiki_Helper_RenderHelper
-        *
-        * @package typo3wiki
-        * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
-        *
-        */
-       class Tx_Typo3wiki_Helper_RenderHelper extends MarkdownExtra_Parser {
-
-               /**
-                * relatedPageSearch
-                *
-                * @var string
-                */
-               private $relatedPageSearch = NULL;
-
-               /**
-                * $relatedPageReplace
-                *
-                * @var string
-                */
-               private $relatedPageReplace = NULL;
-
-               /**
-                * pageRepository
-                *
-                * @var Tx_Typo3wiki_Domain_Repository_PageRepository
-                */
-               protected $pageRepository;
-
-               /**
-                * Uri Builder
-                *
-                * @var Tx_Extbase_MVC_Web_Routing_UriBuilder
-                */
-               protected $uriBuilder;
-
-               /**
-                * maxStage
-                *
-                * @var int
-                */
-               protected $maxStage = 6;
-
-               /**
-                * The Controllers Settings
-                *
-                * @var array
-                */
-               protected $settings;
-
-               /**
-                * The Controllers Object Settings
-                *
-                * @var array
-                */
-               protected $objectSettings;
-
-               /**
-                * The ObjectManager
-                *
-                * @var Tx_Extbase_Object_ObjectManagerInterface
-                */
-               protected $objectManager;
-
-               /**
-                * A Helper Variable should be NULL after each method.
-                *
-                * @var $helper NULL
-                */
-               protected $helper = NULL;
-
-               /**
-                * The RelatedPage
-                *
-                * @var $relatedPage Tx_Typo3wiki_Domain_Model_Page
-                */
-               protected $relatedPage;
-
-               /**
-                * Rendering Method to render TextRevision
-                *
-                * @param string $text
-                * @return string
-                */
-               public function renderText($text) {
-                       $text = $this->transform($text);
-                       $text = $this->_renderCategories($text);
-                       $text = $this->_renderCategoriesList($text);
-                       $text = $this->_renderExternalLinks($text);
-                       $text = $this->_renderInternalLinks($text);
-                       $text = $this->_renderHeadlineLinks($text);
-                       $text = $this->_renderContentList($text);
-                       $text = $this->_renderOwnTextBlocks($text);
-                       $text = $this->_renderCodeHighlighting($text);
-                       return $text;
-               }
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *
+ *  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!
+ ***************************************************************/
+require_once(__DIR__ . '/markdown.php');
+require_once(__DIR__ . '/geshi.php');
+
+/**
+ * class Tx_Typo3wiki_Helper_RenderHelper
+ *
+ * @package typo3wiki
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Typo3wiki_Helper_RenderHelper extends MarkdownExtra_Parser {
 
-               /**
-                * Method for getting a PageObject by Title. If Object does not exists, it will be created.
-                *
-                * @param string $title
-                * @return Tx_Typo3wiki_Domain_Model_Page
-                */
-               protected function createPageIfNotExists($title) {
-               $returnPage = $this->pageRepository->findOneByPageTitle($title);
-               if($returnPage === NULL){
-                       $returnPage = $this->objectManager->get('Tx_Typo3wiki_Domain_Model_Page');
-                       $returnPage->setPageTitle($title);
-                       $this->pageRepository->add($returnPage);
-                       $persistenceManager = t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager');
-                       $persistenceManager->persistAll();
-               }
-               return $returnPage;
+       /**
+        * relatedPageSearch
+        *
+        * @var string
+        */
+       private $relatedPageSearch = NULL;
 
-               }
+       /**
+        * $relatedPageReplace
+        *
+        * @var string
+        */
+       private $relatedPageReplace = NULL;
 
-               /**
-                * Removes Cache of Related Categories; Fired on update
-                *
-                * @param string $text
-                * @return void
-                */
-               public function renderCategoryPages($text) {
-                       $text = str_replace('{TOC}', '', $text);
-                       $text = str_replace('{LOC}', '', $text);
-                       $this->helper = array();
-                       $text = preg_replace_callback('/{(.*?)}/', array( $this, '_renderCategoryPagesHelper'), $text);
-                       $this->helper = NULL;
-               }
+       /**
+        * pageRepository
+        *
+        * @var Tx_Typo3wiki_Domain_Repository_PageRepository
+        */
+       protected $pageRepository;
 
-               /**
-                * Helper Method for: Removes Cache of Related Categories; Fired on update
-                * Adds this page to all relatedCategoryPages
-                *
-                * @param mixed $cat
-                * @return mixed
-                */
-               protected function _renderCategoryPagesHelper($cat){
-                       $cat = $cat[1];
-                       if($cat === 'TOC') return '';
-                       if($cat === 'LOC') return '';
-                       if(!isset($this->helper[$cat])){
-                               $catPage = $this->createPageIfNotExists($cat);
-                               if(!$catPage->getCategoryPages()->contains($this->relatedPage)){
-                                       $catPage->addCategoryPage($this->relatedPage);
-                                       $catPage->setIsCategory(TRUE);
-                               }
-                               $this->helper[$cat] = TRUE;
+       /**
+        * Uri Builder
+        *
+        * @var Tx_Extbase_MVC_Web_Routing_UriBuilder
+        */
+       protected $uriBuilder;
+
+       /**
+        * maxStage
+        *
+        * @var int
+        */
+       protected $maxStage = 6;
+
+       /**
+        * The Controllers Settings
+        *
+        * @var array
+        */
+       protected $settings;
+
+       /**
+        * The Controllers Object Settings
+        *
+        * @var array
+        */
+       protected $objectSettings;
+
+       /**
+        * The ObjectManager
+        *
+        * @var Tx_Extbase_Object_ObjectManagerInterface
+        */
+       protected $objectManager;
+
+       /**
+        * A Helper Variable should be NULL after each method.
+        *
+        * @var $helper NULL
+        */
+       protected $helper = NULL;
+
+       /**
+        * The RelatedPage
+        *
+        * @var $relatedPage Tx_Typo3wiki_Domain_Model_Page
+        */
+       protected $relatedPage;
+
+       /**
+        * Rendering Method to render TextRevision
+        *
+        * @param string $text
+        * @return string
+        */
+       public function renderText($text) {
+               $text = $this->transform($text);
+               $text = $this->_renderCategories($text);
+               $text = $this->_renderCategoriesList($text);
+               $text = $this->_renderExternalLinks($text);
+               $text = $this->_renderInternalLinks($text);
+               $text = $this->_renderHeadlineLinks($text);
+               $text = $this->_renderContentList($text);
+               $text = $this->_renderOwnTextBlocks($text);
+               $text = $this->_renderCodeHighlighting($text);
+               return $text;
+       }
+
+       /**
+        * Method for getting a PageObject by Title. If Object does not exists, it will be created.
+        *
+        * @param string $title
+        * @return Tx_Typo3wiki_Domain_Model_Page
+        */
+       protected function createPageIfNotExists($title) {
+       $returnPage = $this->pageRepository->findOneByPageTitle($title);
+       if($returnPage === NULL){
+               $returnPage = $this->objectManager->get('Tx_Typo3wiki_Domain_Model_Page');
+               $returnPage->setPageTitle($title);
+               $this->pageRepository->add($returnPage);
+               $persistenceManager = t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager');
+               $persistenceManager->persistAll();
+       }
+       return $returnPage;
+
+       }
+
+       /**
+        * Removes Cache of Related Categories; Fired on update
+        *
+        * @param string $text
+        * @return void
+        */
+       public function renderCategoryPages($text) {
+               $text = str_replace('{TOC}', '', $text);
+               $text = str_replace('{LOC}', '', $text);
+               $this->helper = array();
+               $text = preg_replace_callback('/{(.*?)}/', array( $this, '_renderCategoryPagesHelper'), $text);
+               $this->helper = NULL;
+       }
+
+       /**
+        * Helper Method for: Removes Cache of Related Categories; Fired on update
+        * Adds this page to all relatedCategoryPages
+        *
+        * @param mixed $cat
+        * @return mixed
+        */
+       protected function _renderCategoryPagesHelper($cat){
+               $cat = $cat[1];
+               if($cat === 'TOC') return '';
+               if($cat === 'LOC') return '';
+               if(!isset($this->helper[$cat])){
+                       $catPage = $this->createPageIfNotExists($cat);
+                       if(!$catPage->getCategoryPages()->contains($this->relatedPage)){
+                               $catPage->addCategoryPage($this->relatedPage);
+                               $catPage->setIsCategory(TRUE);
                        }
-                       return '';
+                       $this->helper[$cat] = TRUE;
                }
+               return '';
+       }
 
-               /**
-                * Removes Cache of Related Pages, if current pages is new created
-                *
-                * @return void
-                */
-               public function renderRelatedPages() {
-                       foreach($this->relatedPage->getRelatedPages() as $related){
-                               $related->getMainRevision()->setRenderedText('');
-                       }
+       /**
+        * Removes Cache of Related Pages, if current pages is new created
+        *
+        * @return void
+        */
+       public function renderRelatedPages() {
+               foreach($this->relatedPage->getRelatedPages() as $related){
+                       $related->getMainRevision()->setRenderedText('');
                }
+       }
 
 
-               /**
-                * Adds the rendering of internalLinks to MarkUp
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderInternalLinks($text) {
-                       $this->helper = array();
-                       $tmp = array();
-                       preg_match_all('#\[\[([^\]]*)\]\]#u', $text, $tmp);
-                       foreach($tmp[1] as $linkTitle){
-                               $linkTitle = explode('|', $linkTitle);
-                               if(count($linkTitle) == 2){
-                                       $link = $this->uriBuilder->setArguments(array('tx_typo3wiki_typo3wiki[action]' => 'show', 'tx_typo3wiki_typo3wiki[page]' => $linkTitle[1]));
-                                       $link = $link->buildFrontendUri();
-                                       $cssClass = 'internal exists';
-                                       if(!isset($this->helper[$linkTitle[1]])){
-                                               $target = $this->createPageIfNotExists($linkTitle[1]);
-                                               $this->helper[$linkTitle[1]] = $target;
-                                       }else{
-                                               $target = $this->helper[$linkTitle[1]];
-                                       }
-                                       if($target->getMainRevision() === NULL ) $cssClass = 'internal nonexists';
-                                       $link = '<a href="' . $link . '" class="' . $cssClass . '">' . $linkTitle[0] . '</a>';
-                                       $text = str_replace('[[' . $linkTitle[0] . '|' . $linkTitle[1] . ']]', $link, $text);
+       /**
+        * Adds the rendering of internalLinks to MarkUp
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderInternalLinks($text) {
+               $this->helper = array();
+               $tmp = array();
+               preg_match_all('#\[\[([^\]]*)\]\]#u', $text, $tmp);
+               foreach($tmp[1] as $linkTitle){
+                       $linkTitle = explode('|', $linkTitle);
+                       if(count($linkTitle) == 2){
+                               $link = $this->uriBuilder->setArguments(array('tx_typo3wiki_typo3wiki[action]' => 'show', 'tx_typo3wiki_typo3wiki[page]' => $linkTitle[1]));
+                               $link = $link->buildFrontendUri();
+                               $cssClass = 'internal exists';
+                               if(!isset($this->helper[$linkTitle[1]])){
+                                       $target = $this->createPageIfNotExists($linkTitle[1]);
+                                       $this->helper[$linkTitle[1]] = $target;
                                }else{
-                                       $link = $this->uriBuilder->setArguments(array('tx_typo3wiki_typo3wiki[action]' => 'show', 'tx_typo3wiki_typo3wiki[page]' => $linkTitle[0]));
-                                       $link = $link->buildFrontendUri();
-                                       $cssClass = 'internal exists';
-                                       if(!isset($this->helper[$linkTitle[0]])){
-                                               $target = $this->createPageIfNotExists($linkTitle[0]);
-                                               $this->helper[$linkTitle[0]] = $target;
-                                       }else{
-                                               $target = $this->helper[$linkTitle[0]];
-                                       }
-                                       if( $target->getMainRevision() === NULL ) $cssClass = 'internal nonexists';
-                                       $link = '<a href="' . $link . '" class="' . $cssClass . '">' . $linkTitle[0] . '</a>';
-                                       $text = str_replace('[[' . $linkTitle[0] . ']]', $link, $text);
+                                       $target = $this->helper[$linkTitle[1]];
                                }
-
+                               if($target->getMainRevision() === NULL ) $cssClass = 'internal nonexists';
+                               $link = '<a href="' . $link . '" class="' . $cssClass . '">' . $linkTitle[0] . '</a>';
+                               $text = str_replace('[[' . $linkTitle[0] . '|' . $linkTitle[1] . ']]', $link, $text);
+                       }else{
+                               $link = $this->uriBuilder->setArguments(array('tx_typo3wiki_typo3wiki[action]' => 'show', 'tx_typo3wiki_typo3wiki[page]' => $linkTitle[0]));
+                               $link = $link->buildFrontendUri();
+                               $cssClass = 'internal exists';
+                               if(!isset($this->helper[$linkTitle[0]])){
+                                       $target = $this->createPageIfNotExists($linkTitle[0]);
+                                       $this->helper[$linkTitle[0]] = $target;
+                               }else{
+                                       $target = $this->helper[$linkTitle[0]];
+                               }
+                               if( $target->getMainRevision() === NULL ) $cssClass = 'internal nonexists';
+                               $link = '<a href="' . $link . '" class="' . $cssClass . '">' . $linkTitle[0] . '</a>';
+                               $text = str_replace('[[' . $linkTitle[0] . ']]', $link, $text);
                        }
-                       if($this->relatedPage !== NULL){
-                               foreach($this->helper as $relatedPage){
-                                       if($relatedPage->getMainRevision() === NULL){
-                                               if(!$relatedPage->getRelatedPages()->contains($this->relatedPage)){
-                                                       $relatedPage->addRelatedPage($this->relatedPage);
-                                               }
+
+               }
+               if($this->relatedPage !== NULL){
+                       foreach($this->helper as $relatedPage){
+                               if($relatedPage->getMainRevision() === NULL){
+                                       if(!$relatedPage->getRelatedPages()->contains($this->relatedPage)){
+                                               $relatedPage->addRelatedPage($this->relatedPage);
                                        }
                                }
                        }
-                       $this->helper = NULL;
-                       return $text;
                }
+               $this->helper = NULL;
+               return $text;
+       }
 
-               /**
-                * Adds the rendering of externalLinks to MarkUp
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderExternalLinks($text) {
-                       $text = preg_replace('/<a href="(.*)"/', '$0 class="external" ', $text);
-                       return $text;
-               }
+       /**
+        * Adds the rendering of externalLinks to MarkUp
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderExternalLinks($text) {
+               $text = preg_replace('/<a href="(.*)"/', '$0 class="external" ', $text);
+               return $text;
+       }
 
-               /**
-                * Adds the rendering of ContentList based on HeadLines to MarkUp
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderContentList($text) {
-                       if(strpos($text, '{TOC}') === FALSE) return $text;
-                       $return = $this->_getCurrentLevel($text, 1);
-                       return str_replace('{TOC}', $return, $text);
-               }
+       /**
+        * Adds the rendering of ContentList based on HeadLines to MarkUp
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderContentList($text) {
+               if(strpos($text, '{TOC}') === FALSE) return $text;
+               $return = $this->_getCurrentLevel($text, 1);
+               return str_replace('{TOC}', $return, $text);
+       }
 
-               /**
-                * Helper Method for _renderContentList doing the magic ( recursivly )
-                *
-                * @param string $string
-                * @param int $stage
-                * @return string
-                */
-               protected function _getCurrentLevel($string, $stage){
-                       $array = explode('<h' . $stage . '>', $string);
-                       $return = '';
-                       foreach($array as $i => $arrayField) {
-                               if($i == 0) continue;
-                               $internal_array = explode('</h' . $stage . '>', $arrayField);
-                               $return .= '<li>' . $internal_array[0];
-                               if($stage != 6) $return .= $this->_getCurrentLevel($internal_array[1], $stage + 1);
-                               $return .= '</li>';
-                       }
-                       if($return != '') $return = '<ul>' . $return . '</ul>';
-                       return $return;
+       /**
+        * Helper Method for _renderContentList doing the magic ( recursivly )
+        *
+        * @param string $string
+        * @param int $stage
+        * @return string
+        */
+       protected function _getCurrentLevel($string, $stage){
+               $array = explode('<h' . $stage . '>', $string);
+               $return = '';
+               foreach($array as $i => $arrayField) {
+                       if($i == 0) continue;
+                       $internal_array = explode('</h' . $stage . '>', $arrayField);
+                       $return .= '<li>' . $internal_array[0];
+                       if($stage != 6) $return .= $this->_getCurrentLevel($internal_array[1], $stage + 1);
+                       $return .= '</li>';
                }
+               if($return != '') $return = '<ul>' . $return . '</ul>';
+               return $return;
+       }
 
-               /**
-                * Renders HeadLines to Links
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderHeadlineLinks($text){
-                       $this->helper = array();
-                       $text = preg_replace_callback('/<h.>(.*)<\/h.>/', array( $this, '_renderHeadlineLinksCall'), $text);
-                       $this->helper = NULL;
-                       return $text;
-               }
+       /**
+        * Renders HeadLines to Links
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderHeadlineLinks($text){
+               $this->helper = array();
+               $text = preg_replace_callback('/<h.>(.*)<\/h.>/', array( $this, '_renderHeadlineLinksCall'), $text);
+               $this->helper = NULL;
+               return $text;
+       }
 
-               /**
-                * Renders HeadLines to Links Call
-                *
-                * @param string $header
-                * @return string
-                */
-               protected function _renderHeadlineLinksCall($header){
-                       preg_match('/<h(.)>/', $header[0], $match);
-                       $level = $match[1];
-                       $header = $header[1];
-                       $header = trim($header);
-                       $shortTag = str_replace(' ', '_', $header);
-                       $shortTag = str_replace('#', '_', $shortTag);
-                       if(isset($this->helper[$header])){
-                               $this->helper[$header]++;
-                               $shortTag .= $this->helper[$header];
-                       }else{
-                               $this->helper[$header] = 0;
-                       }
-                       $header = '<a name="' . $shortTag . '"></a><h' . $level . '><a href="#' . $shortTag . '">' . $header . '</a></h' . $level . '>';
-                       return $header;
+       /**
+        * Renders HeadLines to Links Call
+        *
+        * @param string $header
+        * @return string
+        */
+       protected function _renderHeadlineLinksCall($header){
+               preg_match('/<h(.)>/', $header[0], $match);
+               $level = $match[1];
+               $header = $header[1];
+               $header = trim($header);
+               $shortTag = str_replace(' ', '_', $header);
+               $shortTag = str_replace('#', '_', $shortTag);
+               if(isset($this->helper[$header])){
+                       $this->helper[$header]++;
+                       $shortTag .= $this->helper[$header];
+               }else{
+                       $this->helper[$header] = 0;
                }
+               $header = '<a name="' . $shortTag . '"></a><h' . $level . '><a href="#' . $shortTag . '">' . $header . '</a></h' . $level . '>';
+               return $header;
+       }
 
-               /**
-                * Renders the Categories View
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderCategories($text){
-                       $this->helper = array();
-                       $text = preg_replace_callback('/{(.*?)}/', array( $this, '_renderCategoriesHelper'), $text);
-                       $tocView = $this->createViewHelper('PageCategories');
-                       $tocView->assign('categories', $this->helper[1]);
-
-                       $helper = $tocView->render();
-                       $helper = $this->_renderInternalLinks($helper);
-                       $this->helper = NULL;
-                       return $text . $helper;
-               }
+       /**
+        * Renders the Categories View
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderCategories($text){
+               $this->helper = array();
+               $text = preg_replace_callback('/{(.*?)}/', array( $this, '_renderCategoriesHelper'), $text);
+               $tocView = $this->createViewHelper('PageCategories');
+               $tocView->assign('categories', $this->helper[1]);
+
+               $helper = $tocView->render();
+               $helper = $this->_renderInternalLinks($helper);
+               $this->helper = NULL;
+               return $text . $helper;
+       }
 
-               /**
-                * Renders the Categories View Helper
-                *
-                * @param string $cat
-                * @return string $cat
-                */
-               protected function _renderCategoriesHelper($cat) {
-                       if($cat[0] === '{TOC}') return $cat[0];
-                       if($cat[0] === '{LOC}') return $cat[0];
-                       $this->helper[1][] = $cat[1];
-                       if($this->relatedPage !== NULL){
-                               $tmpPage = $this->createPageIfNotExists($cat[1]);
-                               if(!$tmpPage->getCategoryPages()->contains($this->relatedPage)) $tmpPage->addCategoryPage($this->relatedPage);
-                               if($tmpPage->getIsCategory() === FALSE)     $tmpPage->setIsCategory(TRUE);
-                       }
-                       return '';
+       /**
+        * Renders the Categories View Helper
+        *
+        * @param string $cat
+        * @return string $cat
+        */
+       protected function _renderCategoriesHelper($cat) {
+               if($cat[0] === '{TOC}') return $cat[0];
+               if($cat[0] === '{LOC}') return $cat[0];
+               $this->helper[1][] = $cat[1];
+               if($this->relatedPage !== NULL){
+                       $tmpPage = $this->createPageIfNotExists($cat[1]);
+                       if(!$tmpPage->getCategoryPages()->contains($this->relatedPage)) $tmpPage->addCategoryPage($this->relatedPage);
+                       if($tmpPage->getIsCategory() === FALSE)     $tmpPage->setIsCategory(TRUE);
                }
+               return '';
+       }
 
-               /**
-                * Renders the List of Pages related to this Category ( Page )
-                *
-                * @param string $text
-                * @return string $text
-                */
-               protected function _renderCategoriesList($text) {
-                       if(strpos($text, '{LOC}') !== FALSE){
-                               if($this->relatedPage !== NULL){
-                                       $tocView = $this->createViewHelper('CategoryList');
-                                       $tocView->assign('pages', $this->relatedPage->getCategoryPages());
-                                       $helper = $tocView->render();
-                                       $text = str_replace('{LOC}', $helper, $text);
-                               }
+       /**
+        * Renders the List of Pages related to this Category ( Page )
+        *
+        * @param string $text
+        * @return string $text
+        */
+       protected function _renderCategoriesList($text) {
+               if(strpos($text, '{LOC}') !== FALSE){
+                       if($this->relatedPage !== NULL){
+                               $tocView = $this->createViewHelper('CategoryList');
+                               $tocView->assign('pages', $this->relatedPage->getCategoryPages());
+                               $helper = $tocView->render();
+                               $text = str_replace('{LOC}', $helper, $text);
                        }
-                       return $text;
                }
+               return $text;
+       }
 
-               /**
-                * Method for SyntaxHighlighting
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderCodeHighlighting($text) {
-                       $text = preg_replace_callback('/<p>LanG:\s*(.*?)<\/p>.*?<pre>.?<code>(.*?)<\/code>.?<\/pre>/ism', array( $this, '_renderCodeHighlighting_Helper'), $text);
-                       return $text;
-               }
+       /**
+        * Method for SyntaxHighlighting
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderCodeHighlighting($text) {
+               $text = preg_replace_callback('/<p>LanG:\s*(.*?)<\/p>.*?<pre>.?<code>(.*?)<\/code>.?<\/pre>/ism', array( $this, '_renderCodeHighlighting_Helper'), $text);
+               return $text;
+       }
 
-               /**
-                * Method for renderingOwnTextBlocks
-                *
-                * Usage:
-                * !!! myClass
-                * hey ho
-                * !!!
-                *
-                * Will be rendered as:
-                * <div class="myClass">
-                * hey ho
-                * </div>
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderOwnTextBlocks($text) {
-                       return preg_replace('/!!!\s*?(\w*?)\\n(.*?)\\n!!!/m', '<div class="$1">$2</div>', $text);
-               }
+       /**
+        * Method for renderingOwnTextBlocks
+        *
+        * Usage:
+        * !!! myClass
+        * hey ho
+        * !!!
+        *
+        * Will be rendered as:
+        * <div class="myClass">
+        * hey ho
+        * </div>
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderOwnTextBlocks($text) {
+               return preg_replace('/!!!\s*?(\w*?)\\n(.*?)\\n!!!/m', '<div class="$1">$2</div>', $text);
+       }
 
-               /**
-                * Helper Method for Syntax Highlighting
-                *
-                * @param string $text
-                * @return string
-                */
-               protected function _renderCodeHighlighting_Helper($text){
-                       $geshi = new GeSHi(htmlspecialchars_decode($text[2]), $text[1]);
-                       $geshi->enable_classes();
-                       $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
-                       return '<style type="text/css" scoped="scoped">' . $geshi->get_stylesheet() . '</style><pre>' . $geshi->parse_code() . '</pre>';
-               }
+       /**
+        * Helper Method for Syntax Highlighting
+        *
+        * @param string $text
+        * @return string
+        */
+       protected function _renderCodeHighlighting_Helper($text){
+               $geshi = new GeSHi(htmlspecialchars_decode($text[2]), $text[1]);
+               $geshi->enable_classes();
+               $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
+               return '<style type="text/css" scoped="scoped">' . $geshi->get_stylesheet() . '</style><pre>' . $geshi->parse_code() . '</pre>';
+       }
 
-               /**
-                * Create Stand Alone Viewhelper
-                *
-                * @param string $templateName
-                * @return Tx_Fluid_View_StandaloneView
-                */
-               protected function createViewHelper($templateName){
-                       $tocView = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
-                       $tocView->setFormat('html');
-                       $tocView->setLayoutRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['layoutRootPath']));
-                       $tocView->setPartialRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['partialRootPath']));
-                       $tocView->setTemplatePathAndFilename(t3lib_div::getFileAbsFileName($this->objectSettings['view']['templateRootPath']) . 'Rendering/' . $templateName . '.html');
-                       return $tocView;
-               }
+       /**
+        * Create Stand Alone Viewhelper
+        *
+        * @param string $templateName
+        * @return Tx_Fluid_View_StandaloneView
+        */
+       protected function createViewHelper($templateName){
+               $tocView = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
+               $tocView->setFormat('html');
+               $tocView->setLayoutRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['layoutRootPath']));
+               $tocView->setPartialRootPath(t3lib_div::getFileAbsFileName($this->objectSettings['view']['partialRootPath']));
+               $tocView->setTemplatePathAndFilename(t3lib_div::getFileAbsFileName($this->objectSettings['view']['templateRootPath']) . 'Rendering/' . $templateName . '.html');
+               return $tocView;
+       }
 
-               /**
-                *  Set Page Repository
-                *
-                * @param \Tx_Typo3wiki_Domain_Repository_PageRepository $pageRepository
-                * @return void
-                */
-               public function setPageRepository($pageRepository) {
-                       $this->pageRepository = $pageRepository;
-               }
+       /**
+        *  Set Page Repository
+        *
+        * @param \Tx_Typo3wiki_Domain_Repository_PageRepository $pageRepository
+        * @return void
+        */
+       public function setPageRepository($pageRepository) {
+               $this->pageRepository = $pageRepository;
+       }
 
-               /**
-                * Get Page Repository
-                *
-                * @return \Tx_Typo3wiki_Domain_Repository_PageRepository
-                */
-               public function getPageRepository() {
-                       return $this->pageRepository;
-               }
+       /**
+        * Get Page Repository
+        *
+        * @return \Tx_Typo3wiki_Domain_Repository_PageRepository
+        */
+       public function getPageRepository() {
+               return $this->pageRepository;
+       }
 
-               /**
-                * Set Uri Builder
-                *
-                * @param Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder
-                * @return void
-                */
-               public function setUriBuilder($uriBuilder) {
-                       $this->uriBuilder = $uriBuilder;
-               }
+       /**
+        * Set Uri Builder
+        *
+        * @param Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder
+        * @return void
+        */
+       public function setUriBuilder($uriBuilder) {
+               $this->uriBuilder = $uriBuilder;
+       }
 
-               /**
-                * Get Uri Builder
-                *
-                * @return Tx_Extbase_MVC_Web_Routing_UriBuilder
-                */
-               public function getUriBuilder() {
-                       return $this->uriBuilder;
-               }
+       /**
+        * Get Uri Builder
+        *
+        * @return Tx_Extbase_MVC_Web_Routing_UriBuilder
+        */
+       public function getUriBuilder() {
+               return $this->uriBuilder;
+       }
 
-               /**
-                * Set Settings
-                *
-                * @param array $settings
-                * @return void
-                */
-               public function setSettings($settings) {
-                       $this->settings = $settings;
-               }
+       /**
+        * Set Settings
+        *
+        * @param array $settings
+        * @return void
+        */
+       public function setSettings($settings) {
+               $this->settings = $settings;
+       }
 
-               /**
-                * Get Settings
-                *
-                * @return array
-                */
-               public function getSettings() {
-                       return $this->settings;
-               }
+       /**
+        * Get Settings
+        *
+        * @return array
+        */
+       public function getSettings() {
+               return $this->settings;
+       }
 
-               /**
-                * Set objectSettings
-                *
-                * @param array $objectSettings
-                * @return void
-                */
-               public function setObjectSettings($objectSettings) {
-                       $this->objectSettings = $objectSettings;
-               }
+       /**
+        * Set objectSettings
+        *
+        * @param array $objectSettings
+        * @return void
+        */
+       public function setObjectSettings($objectSettings) {
+               $this->objectSettings = $objectSettings;
+       }
 
-               /**
-                * Get objectSettings
-                *
-                * @return array
-                */
-               public function getObjectSettings() {
-                       return $this->objectSettings;
-               }
+       /**
+        * Get objectSettings
+        *
+        * @return array
+        */
+       public function getObjectSettings() {
+               return $this->objectSettings;
+       }
 
 
-               /**
-                * Set ObjectManager
-                *
-                * @param \Tx_Extbase_Object_ObjectManagerInterface $objectManager
-                * @return void
-                */
-               public function setObjectManager($objectManager) {
-                       $this->objectManager = $objectManager;
-               }
+       /**
+        * Set ObjectManager
+        *
+        * @param \Tx_Extbase_Object_ObjectManagerInterface $objectManager
+        * @return void
+        */
+       public function setObjectManager($objectManager) {
+               $this->objectManager = $objectManager;
+       }
 
-               /**
-                * Get Object Manager
-                *
-                * @return \Tx_Extbase_Object_ObjectManagerInterface
-                */
-               public function getObjectManager() {
-                       return $this->objectManager;
-               }
+       /**
+        * Get Object Manager
+        *
+        * @return \Tx_Extbase_Object_ObjectManagerInterface
+        */
+       public function getObjectManager() {
+               return $this->objectManager;
+       }
 
-               /**
-                * function setRelatedPage
-                *
-                * @param Tx_Typo3wiki_Domain_Model_Page $relatedPage
-                * @return void
-                */
-               public function setRelatedPage($relatedPage) {
-                       $this->relatedPage = $relatedPage;
-               }
+       /**
+        * function setRelatedPage
+        *
+        * @param Tx_Typo3wiki_Domain_Model_Page $relatedPage
+        * @return void
+        */
+       public function setRelatedPage($relatedPage) {
+               $this->relatedPage = $relatedPage;
+       }
 
-               /**
-                * function getRelatedPage
-                *
-                * @return Tx_Typo3wiki_Domain_Model_Page
-                */
-               public function getRelatedPage() {
-                       return $this->relatedPage;
-               }
+       /**
+        * function getRelatedPage
+        *
+        * @return Tx_Typo3wiki_Domain_Model_Page
+        */
+       public function getRelatedPage() {
+               return $this->relatedPage;
+       }
 
 
-       }
+}
diff --git a/Classes/Service/GoogleSitemapService.php b/Classes/Service/GoogleSitemapService.php
new file mode 100644 (file)
index 0000000..0c1917e
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2014 Bastian Bringenberg <bastian.bringenberg@typo3.org>, BBNetz.eu
+ *
+ *  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!
+ ***************************************************************/
+
+/**
+ * class Tx_Typo3wiki_Service_GoogleSitemapService
+ *
+ * @package typo3wiki
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Typo3wiki_Service_GoogleSitemapService implements Tx_GoogleServices_Interface_SitemapProviderInterface {
+
+       /**
+        * function getRecords
+        *
+        * @param int $startPage
+        * @param array $basePages
+        * @param Tx_GoogleServices_Controller_SitemapController $obj
+        * @return array
+        */
+       public function getRecords($startPage, $basePages, Tx_GoogleServices_Controller_SitemapController $obj) {
+               $nodes = array();
+
+               if (!t3lib_extMgm::isLoaded('typo3wiki')) {
+                       return $nodes;
+               }
+               $pid = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_typo3wiki.']['view.']['defaultPid'];
+               $objectManager = new Tx_Extbase_Object_ObjectManager();
+               $repo = $objectManager->get('Tx_Typo3wiki_Domain_Repository_PageRepository');
+               $settings = $objectManager->get('Tx_Extbase_Persistence_Typo3QuerySettings');
+               $settings->setRespectStoragePage(FALSE);
+               $query = $repo->createQuery();
+               $query->setQuerySettings($settings);
+               $founds = $query->execute();
+
+               foreach($founds as $found) {
+                       $uriBuilder = $obj->getUriBuilder();
+                       $uriBuilder->setTargetPageUid($pid);
+                       $url = $uriBuilder->uriFor('show', array('page' => $found->getPageTitle()), 'Page', 'tx_typo3wiki', 'Typo3wiki');
+                       if ($url === '') {
+                               continue;
+                       }
+                       $node = new Tx_GoogleServices_Domain_Model_Node();
+                       $node->setLoc($baseUri . $url);
+                       $node->setPriority(0.9);
+                       $node->setChangefreq('weekly');
+                               // LastMod will come later
+                               // $node->setLastmod($found->getTstamp()->getTimestamp($found));
+                       $nodes[] = $node;
+               }
+               return $nodes;
+       }
+}
\ No newline at end of file
index 737137a..0e4b1d3 100644 (file)
@@ -15,7 +15,7 @@
                                 <items type="array">
                                     <numIndex index="0" type="array">
                                         <numIndex index="0">LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_plugin_use_main</numIndex>
-                                        <numIndex index="1">Page->index;Page->show;Page->unknownPage;Page->edit;Page->update;Page->searchbox',</numIndex>
+                                        <numIndex index="1">Page->index;Page->show;Page->unknownPage;Page->edit;Page->update;Page->searchbox</numIndex>
                                     </numIndex>
                                 </items>
                             </config>
old mode 100755 (executable)
new mode 100644 (file)
index d5c9599..528019e
@@ -159,7 +159,7 @@ $TCA['tx_typo3wiki_domain_model_page'] = array(
                        'exclude' => 0,
                        'label' => 'LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_page.main_revision',
                        'config' => array(
-                               'type' => 'inline',
+                               'type' => 'select',
                                'foreign_table' => 'tx_typo3wiki_domain_model_textrevision',
                                'minitems' => 0,
                                'maxitems' => 1,
old mode 100755 (executable)
new mode 100644 (file)
index 8557723..d678d65
@@ -137,17 +137,10 @@ $TCA['tx_typo3wiki_domain_model_textrevision'] = array(
                        'exclude' => 0,
                        'label' => 'LLL:EXT:typo3wiki/Resources/Private/Language/locallang_db.xlf:tx_typo3wiki_domain_model_textrevision.owner',
                        'config' => array(
-                               'type' => 'inline',
+                               'type' => 'select',
                                'foreign_table' => 'fe_users',
                                'minitems' => 0,
                                'maxitems' => 1,
-                               'appearance' => array(
-                                       'collapseAll' => 0,
-                                       'levelLinksPosition' => 'top',
-                                       'showSynchronizationLink' => 1,
-                                       'showPossibleLocalizationRecords' => 1,
-                                       'showAllLocalizationLink' => 1
-                               ),
                        ),
                ),
                'page' => array(
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index d6b8b2a..a30e9ea
@@ -6,6 +6,8 @@ plugin.tx_typo3wiki {
                partialRootPath = EXT:typo3wiki/Resources/Private/Partials/
                # cat=plugin.tx_typo3wiki/file; type=string; label=Path to template layouts (FE)
                layoutRootPath = EXT:typo3wiki/Resources/Private/Layouts/
+               # cat=plugin.tx_typo3wiki/file; type=string; label=Default Pid for View
+               defaultPid = 0
        }
        persistence {
                # cat=plugin.tx_typo3wiki//a; type=string; label=Default storage PID
old mode 100755 (executable)
new mode 100644 (file)
index b6e0c8a..1f9e6f9
@@ -3,6 +3,7 @@ plugin.tx_typo3wiki {
                templateRootPath = {$plugin.tx_typo3wiki.view.templateRootPath}
                partialRootPath = {$plugin.tx_typo3wiki.view.partialRootPath}
                layoutRootPath = {$plugin.tx_typo3wiki.view.layoutRootPath}
+               defaultPid = {$plugin.tx_typo3wiki.view.defaultPid}
        }
        persistence {
                storagePid = {$plugin.tx_typo3wiki.persistence.storagePid}
index 70078de..e0b21ab 100755 (executable)
@@ -3,25 +3,30 @@ if (!defined('TYPO3_MODE')) {
        die ('Access denied.');
 }
 
-       if(t3lib_extMgm::isLoaded('realurl')) require_once(t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/Realurl/realurl_conf.php');
+if(t3lib_extMgm::isLoaded('realurl')) require_once(t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/Realurl/realurl_conf.php');
 
-       Tx_Extbase_Utility_Extension::configurePlugin(
+Tx_Extbase_Utility_Extension::configurePlugin(
        $_EXTKEY,
        'Typo3wiki',
        array(
                'Page' => 'index, show, unknownPage, edit, update',
                
        ),
-       // non-cacheable actions
+               // non-cacheable actions
        array(
                'Page' => 'create, update',
                
        )
 );
 
+if(t3lib_extMgm::isLoaded('google_services')) {
+       require_once(t3lib_extMgm::extPath('google_services', 'Classes/Service/SitemapProvider.php'));
+       Tx_GoogleServices_Service_SitemapProvider::addProvider(t3lib_extMgm::extPath('typo3wiki', 'Classes/Service/GoogleSitemapService.php'), 'Tx_Typo3wiki_Service_GoogleSitemapService');
+}
+
 /**
  * Enabling Caching Button in Backend
  *
  */
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'][] = 'EXT:'.$_EXTKEY.'/class.tx_typo3wiki_cachemenu.php:&tx_typo3wiki_cachemenu';
-$TYPO3_CONF_VARS['BE']['AJAX']['tx_typo3wiki::clear'] = 'EXT:'.$_EXTKEY.'/class.tx_typo3wiki_cache.php:tx_typo3wiki_cache->clear';
\ No newline at end of file
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'][] = 'EXT:' . $_EXTKEY . '/class.tx_typo3wiki_cachemenu.php:&tx_typo3wiki_cachemenu';
+$TYPO3_CONF_VARS['BE']['AJAX']['tx_typo3wiki::clear'] = 'EXT:' . $_EXTKEY . '/class.tx_typo3wiki_cache.php:tx_typo3wiki_cache->clear';
\ No newline at end of file