Commit a4cbd5c8 authored by Jerome Mariette's avatar Jerome Mariette

add administration plugin

parent d703d4e3
......@@ -38,7 +38,7 @@ $EM_CONF[$_EXTKEY] = array(
'suggests' => array(
),
),
'_md5_values_when_last_written' => 'a:24:{s:9:"ChangeLog";s:4:"f9b7";s:10:"README.txt";s:4:"9fa9";s:12:"ext_icon.gif";s:4:"1bdc";s:31:"class.tx_nG6_eid.php";s:4:"bb99";s:17:"ext_localconf.php";s:4:"7efc";s:14:"ext_tables.php";s:4:"e84d";s:14:"ext_tables.sql";s:4:"1b60";s:23:"icon_tx_nG6_analyze.gif";s:4:"475a";s:23:"icon_tx_nG6_project.gif";s:4:"475a";s:31:"icon_tx_nG6_project_analyze.gif";s:4:"475a";s:27:"icon_tx_nG6_project_run.gif";s:4:"475a";s:19:"icon_tx_nG6_run.gif";s:4:"475a";s:27:"icon_tx_nG6_run_analyze.gif";s:4:"475a";s:13:"locallang.xml";s:4:"a0c8";s:16:"locallang_db.xml";s:4:"2862";s:7:"tca.php";s:4:"4639";s:19:"doc/wizard_form.dat";s:4:"110b";s:20:"doc/wizard_form.html";s:4:"44cc";s:14:"pi1/ce_wiz.gif";s:4:"02b6";s:24:"pi1/class.tx_nG6_pi1.php";s:4:"e726";s:32:"pi1/class.tx_nG6_pi1_wizicon.php";s:4:"b2ac";s:13:"pi1/clear.gif";s:4:"cc11";s:17:"pi1/locallang.xml";s:4:"3bb2";s:24:"pi1/static/editorcfg.txt";s:4:"4730";s:20:"pi1/static/setup.txt";s:4:"7bca";s:14:"pi2/ce_wiz.gif";s:4:"02b6";s:24:"pi2/class.tx_nG6_pi2.php";s:4:"7164";s:32:"pi2/class.tx_nG6_pi2_wizicon.php";s:4:"ff00";s:13:"pi2/clear.gif";s:4:"cc11";s:17:"pi2/locallang.xml";s:4:"9216";s:24:"pi2/static/editorcfg.txt";s:4:"e404";s:14:"pi3/ce_wiz.gif";s:4:"02b6";s:24:"pi3/class.tx_nG6_pi3.php";s:4:"7164";s:32:"pi3/class.tx_nG6_pi3_wizicon.php";s:4:"ff00";s:13:"pi3/clear.gif";s:4:"cc11";s:17:"pi3/locallang.xml";s:4:"9216";s:24:"pi3/static/editorcfg.txt";s:4:"e404";s:14:"pi4/ce_wiz.gif";s:4:"02b6";s:24:"pi4/class.tx_nG6_pi4.php";s:4:"7164";s:32:"pi4/class.tx_nG6_pi4_wizicon.php";s:4:"ff00";s:13:"pi4/clear.gif";s:4:"cc11";s:17:"pi4/locallang.xml";s:4:"9216";s:24:"pi4/static/editorcfg.txt";s:4:"e404";s:14:"pi5/ce_wiz.gif";s:4:"02b6";s:24:"pi5/class.tx_nG6_pi5.php";s:4:"7164";s:32:"pi5/class.tx_nG6_pi5_wizicon.php";s:4:"ff00";s:13:"pi5/clear.gif";s:4:"cc11";s:17:"pi5/locallang.xml";s:4:"9216";s:24:"pi5/static/editorcfg.txt";s:4:"e404";}',
'_md5_values_when_last_written' => 'a:24:{s:9:"ChangeLog";s:4:"f9b7";s:10:"README.txt";s:4:"9fa9";s:12:"ext_icon.gif";s:4:"1bdc";s:31:"class.tx_nG6_eid.php";s:4:"bb99";s:17:"ext_localconf.php";s:4:"7efc";s:14:"ext_tables.php";s:4:"e84d";s:14:"ext_tables.sql";s:4:"1b60";s:23:"icon_tx_nG6_analyze.gif";s:4:"475a";s:23:"icon_tx_nG6_project.gif";s:4:"475a";s:31:"icon_tx_nG6_project_analyze.gif";s:4:"475a";s:27:"icon_tx_nG6_project_run.gif";s:4:"475a";s:19:"icon_tx_nG6_run.gif";s:4:"475a";s:27:"icon_tx_nG6_run_analyze.gif";s:4:"475a";s:13:"locallang.xml";s:4:"a0c8";s:16:"locallang_db.xml";s:4:"2862";s:7:"tca.php";s:4:"4639";s:19:"doc/wizard_form.dat";s:4:"110b";s:20:"doc/wizard_form.html";s:4:"44cc";s:14:"pi1/ce_wiz.gif";s:4:"02b6";s:24:"pi1/class.tx_nG6_pi1.php";s:4:"e726";s:32:"pi1/class.tx_nG6_pi1_wizicon.php";s:4:"b2ac";s:13:"pi1/clear.gif";s:4:"cc11";s:17:"pi1/locallang.xml";s:4:"3bb2";s:24:"pi1/static/editorcfg.txt";s:4:"4730";s:20:"pi1/static/setup.txt";s:4:"7bca";s:14:"pi2/ce_wiz.gif";s:4:"02b6";s:24:"pi2/class.tx_nG6_pi2.php";s:4:"7164";s:32:"pi2/class.tx_nG6_pi2_wizicon.php";s:4:"ff00";s:13:"pi2/clear.gif";s:4:"cc11";s:17:"pi2/locallang.xml";s:4:"9216";s:24:"pi2/static/editorcfg.txt";s:4:"e404";s:14:"pi3/ce_wiz.gif";s:4:"02b6";s:24:"pi3/class.tx_nG6_pi3.php";s:4:"7164";s:32:"pi3/class.tx_nG6_pi3_wizicon.php";s:4:"ff00";s:13:"pi3/clear.gif";s:4:"cc11";s:17:"pi3/locallang.xml";s:4:"9216";s:24:"pi3/static/editorcfg.txt";s:4:"e404";s:14:"pi4/ce_wiz.gif";s:4:"02b6";s:24:"pi4/class.tx_nG6_pi4.php";s:4:"7164";s:32:"pi4/class.tx_nG6_pi4_wizicon.php";s:4:"ff00";s:13:"pi4/clear.gif";s:4:"cc11";s:17:"pi4/locallang.xml";s:4:"9216";s:24:"pi4/static/editorcfg.txt";s:4:"e404";s:14:"pi5/ce_wiz.gif";s:4:"02b6";s:24:"pi5/class.tx_nG6_pi5.php";s:4:"7164";s:32:"pi5/class.tx_nG6_pi5_wizicon.php";s:4:"ff00";s:13:"pi5/clear.gif";s:4:"cc11";s:17:"pi5/locallang.xml";s:4:"9216";s:24:"pi5/static/editorcfg.txt";s:4:"e404";s:14:"pi6/ce_wiz.gif";s:4:"02b6";s:24:"pi6/class.tx_nG6_pi6.php";s:4:"7164";s:32:"pi6/class.tx_nG6_pi6_wizicon.php";s:4:"ff00";s:13:"pi6/clear.gif";s:4:"cc11";s:17:"pi6/locallang.xml";s:4:"9216";s:24:"pi6/static/editorcfg.txt";s:4:"e404";}',
);
?>
\ No newline at end of file
......@@ -45,6 +45,15 @@ t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
t3lib_extMgm::addPItoST43($_EXTKEY,'pi5/class.tx_nG6_pi5.php','_pi5','list_type',1);
## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY,'editorcfg','
tt_content.CSS_editor.ch.tx_nG6_pi6 = < plugin.tx_nG6_pi6.CSS_editor
',43);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi6/class.tx_nG6_pi6.php','_pi6','list_type',1);
## Added to do some ajax
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_nG6'] = 'EXT:nG6/class.tx_nG6_eid.php';
......
......@@ -236,4 +236,9 @@ t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi5']='layout,select_key';
t3lib_extMgm::addPlugin(Array('LLL:EXT:nG6/locallang_db.xml:tt_content.list_type_pi5', $_EXTKEY.'_pi5'),'list_type');
if (TYPO3_MODE=="BE") $TBE_MODULES_EXT["xMOD_db_new_content_el"]["addElClasses"]["tx_nG6_pi5_wizicon"] = t3lib_extMgm::extPath($_EXTKEY).'pi5/class.tx_nG6_pi5_wizicon.php';
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi6']='layout,select_key';
t3lib_extMgm::addPlugin(Array('LLL:EXT:nG6/locallang_db.xml:tt_content.list_type_pi6', $_EXTKEY.'_pi6'),'list_type');
if (TYPO3_MODE=="BE") $TBE_MODULES_EXT["xMOD_db_new_content_el"]["addElClasses"]["tx_nG6_pi6_wizicon"] = t3lib_extMgm::extPath($_EXTKEY).'pi6/class.tx_nG6_pi6_wizicon.php';
?>
\ No newline at end of file
......@@ -16,6 +16,8 @@
<label index="pi4_plus_wiz_description">Adds nG6 browser to the page</label>
<label index="pi5_title">nG6 downloader</label>
<label index="pi5_plus_wiz_description">Adds nG6 downloader to the page</label>
<label index="pi6_title">nG6 administration center</label>
<label index="pi6_plus_wiz_description">Adds nG6 administration center to the page</label>
</languageKey>
<languageKey index="fr" type="array">
<label index="pi1_title">nG6</label>
......@@ -28,6 +30,8 @@
<label index="pi4_plus_wiz_description">Ajoute un navigateur nG6 a la page</label>
<label index="pi5_title">Centre de telechargement nG6</label>
<label index="pi5_plus_wiz_description">Ajoute un Centre de telechargement nG6 a la page</label>
<label index="pi6_title">Centre d'administration de nG6</label>
<label index="pi6_plus_wiz_description">Ajoute un Centre d'administraion nG6 a la page</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
{*
Copyright (C) 2009 INRA
This program 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.
This program 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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*}
administration view
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 PF bioinformatique de Toulouse <>
* 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!
***************************************************************/
/**
* Plugin 'nG6' for the 'nG6' extension.
*
* @author PF bioinformatique de Toulouse <>
*/
require_once(PATH_tslib.'class.tslib_pibase.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_utils.php');
require_once(t3lib_extMgm::extPath('nG6').'/lib/class.tx_nG6_db.php');
require_once(t3lib_extMgm::extPath('nG6').'/res/smarty/libs/Smarty.class.php');
class tx_nG6_pi6 extends tslib_pibase {
var $prefixId = 'tx_nG6_pi6'; // Same as class name
var $scriptRelPath = 'pi6/class.tx_nG6_pi6.php'; // Path to this script relative to the extension dir.
var $extKey = 'nG6'; // The extension key.
//var $pi_checkCHash = TRUE;
/**
* Main method of your PlugIn
*
* @param string $content: The content of the PlugIn
* @param array $conf: The PlugIn Configuration
* @return The content that should be displayed on the website
*/
function main($content,$conf) {
if (strstr($this->cObj->currentRecord,'tt_content')) {
$conf['pidList'] = $this->cObj->data['pages'];
$conf['recursive'] = $this->cObj->data['recursive'];
}
$this->pi_loadLL();
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_USER_INT_obj=1;
// Add the jquery libs + the tree plugins and its css
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.cookie.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.hotkeys.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.jstree.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.dialog.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.draggable.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.resizable.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.url.packed.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/tx_nG6_pi6.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/tx_nG6.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.core.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.theme.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.dialog.css"/>';
$smarty = new Smarty();
$smarty->setTemplateDir(t3lib_extMgm::extPath('nG6').'/pi6');
$smarty->setCompileDir(t3lib_extMgm::extPath('nG6').'/res/smarty/templates_c');
$smarty->setCacheDir(t3lib_extMgm::extPath('nG6').'/res/smarty/cache');
$smarty->setConfigDir(t3lib_extMgm::extPath('nG6').'/res/smarty/configs');
$smarty->security = true;
$smarty->security_settings['MODIFIER_FUNCS'] = array('count');
if (isset($this->LOCAL_LANG[$this->LLkey]) && count($this->LOCAL_LANG[$this->LLkey]) > 0) {
$smarty->assign('llang', $this->LOCAL_LANG[$this->LLkey]);
} else {
$smarty->assign('llang', $this->LOCAL_LANG['default']);
}
return $smarty->fetch('administration_view.tpl');
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6.php']);
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 PF bioinformatique de Toulouse <>
* 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!
***************************************************************/
/**
* Class that adds the wizard icon.
*
* @author PF bioinformatique de Toulouse <>
*/
class tx_nG6_pi6_wizicon {
/**
* Processing the wizard items array
*
* @param array $wizardItems: The wizard items
* @return Modified array with wizard items
*/
function proc($wizardItems) {
global $LANG;
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_nG6_pi6'] = array(
'icon'=>t3lib_extMgm::extRelPath('nG6').'pi6/ce_wiz.gif',
'title'=>$LANG->getLLL('pi6_title',$LL),
'description'=>$LANG->getLLL('pi6_plus_wiz_description',$LL),
'params'=>'&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=nG6_pi6'
);
return $wizardItems;
}
/**
* Reads the [extDir]/locallang.xml and returns the \$LOCAL_LANG array found in that file.
*
* @return The array with language labels
*/
function includeLocalLang() {
global $LANG;
$LOCAL_LANG = $LANG->includeLLFile('EXT:nG6/locallang.xml',FALSE);
return $LOCAL_LANG;
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6_wizicon.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/nG6/pi6/class.tx_nG6_pi6_wizicon.php']);
}
?>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for plugin &quot;tx_ng6_pi6&quot;</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
</languageKey>
<languageKey index="fr" type="array">
</languageKey>
</data>
</T3locallang>
/***************************************************************
* Copyright notice
*
* (c) 2009 PF bioinformatique de Toulouse <>
* 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!
***************************************************************/
/**
* Plugin 'nG6' for the 'nG6' extension.
*
* @author PF bioinformatique de Toulouse <>
*/
$(function () { });
\ No newline at end of file
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