Re: [TYPO3-german] Zugriff auf $conf in Backend-Extension
Oliver Klee wrote: Ich mache das folgendermaßen, um sowohl im BE als auch im FE darauf zugreifen zu können: Hallo Oliver, hallo Georg, vielen Dank für Eure Tipps. Das klappt soweit ganz gut bei mir. Nur eine Frage habe ich noch. Wofür benötige ich die rootline-Mimik? $rootline = $sys_page-getRootLine(intval(t3lib_div::_GP('id'))); // This generates the constants/config + hierarchy info for the template. $template-runThroughTemplates($rootline, 0); bzw. $rootLine = $sysPageObj-getRootLine($this-id);//$this-id eventuell ersetzen $TSObj-runThroughTemplates($rootLine); Da muss ich ja doch wieder händisch eine feste ID mit übergeben. Gibt es dann Probleme, wenn meine TS-Config für das Plugin gar nicht in der Rootline der Seite ist, auf der sich das zu konfigurierende Plugin befindet? Danke und Gruss Thomas ___ TYPO3-german mailing list TYPO3-german@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german
Re: [TYPO3-german] Zugriff auf $conf in Backend-Extension
Hi Thomas, Thomas Janke schrieb: Wofür benötige ich die rootline-Mimik? $rootline = $sys_page-getRootLine(intval(t3lib_div::_GP('id'))); // This generates the constants/config + hierarchy info for the template. $template-runThroughTemplates($rootline, 0); bzw. $rootLine = $sysPageObj-getRootLine($this-id);//$this-id eventuell ersetzen $TSObj-runThroughTemplates($rootLine); Da muss ich ja doch wieder händisch eine feste ID mit übergeben. Du machst das nicht händisch: Stattdessen ist das die ID der Seite, auf der du dich im BE befindest. Somit bekommst du so die Konfiguration zu der Seite, die du im Seitenbaum gerade aufgerufen hast (das TS-Setup ist ja abhängig von der Seite, auf der man sich befindet) - genau wie im FE. Gruß, Oliver ___ TYPO3-german mailing list TYPO3-german@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german
Re: [TYPO3-german] Zugriff auf $conf in Backend-Extension
Hallo Thomas, Thomas Janke schrieb: wie greife ich eigentlich in einer Backend-Extension auf mein TS-Conf-Array zu? Ich mache das folgendermaßen, um sowohl im BE als auch im FE darauf zugreifen zu können: function init($conf) { ... if ($conf !== null) { $this-conf = $conf; } else { // We need to create our own template setup if we are in the BE // and we aren't currently creating a DirectMail page. if ((TYPO3_MODE == 'BE') !is_object($GLOBALS['TSFE'])) { $template = t3lib_div::makeInstance('t3lib_TStemplate'); // do not log time-performance information $template-tt_track = 0; $template-init(); // Get the root line $sys_page = t3lib_div::makeInstance('t3lib_pageSelect'); // the selected page in the BE is found // exactly as in t3lib_SCbase::init() $rootline = $sys_page-getRootLine(intval(t3lib_div::_GP('id'))); // This generates the constants/config + hierarchy info for the template. $template-runThroughTemplates($rootline, 0); $template-generateConfig(); $this-conf = $template-setup['plugin.']['tx_'.$this-extKey.'.']; } else { // On the front end, we can use the provided template setup. $this-conf = $GLOBALS['TSFE']-tmpl-setup['plugin.']['tx_'.$this-extKey.'.']; } } ... } (Diese Funktion ist Teil meiner Library-Extension oelib.) Gruß, Oli ___ TYPO3-german mailing list TYPO3-german@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german
Re: [TYPO3-german] Zugriff auf $conf in Backend-Extension
Hi, ich hab das auch mal vor langem benötigt. Allerdings war das noch T3 V. 3.7.0! der Code: $rootLine = $sysPageObj-getRootLine($this-id); //$this-id eventuell ersetzen $TSObj = t3lib_div::makeInstance('t3lib_tsparser_ext'); $TSObj-tt_track = 0; $TSObj-init(); $TSObj-runThroughTemplates($rootLine); $TSObj-generateConfig(); $this-conf = $TSObj-setup[tt_content.][text.][20.]; // z.B. .. welche Klassen genau dafür eingebunden werden müssen weiss ich nicht mehr - folgende habe ich eingebunden; require (conf.php); require ($BACK_PATH.init.php); require ($BACK_PATH.template.php); require_once (PATH_t3lib.class.t3lib_scbase.php); require_once (PATH_site.'typo3/sysext/cms/tslib/class.tslib_pibase.php'); require_once (PATH_site.'typo3/sysext/cms/tslib/class.tslib_content.php'); require_once (PATH_t3lib.'class.t3lib_page.php'); require_once (PATH_t3lib.'class.t3lib_tstemplate.php'); require_once (PATH_t3lib.'class.t3lib_tsparser_ext.php'); grüße, Georg Thomas Janke schrieb: Hallo, wie greife ich eigentlich in einer Backend-Extension auf mein TS-Conf-Array zu? Im Frontend funktioniert function main($content,$conf) { $this-conf=$conf; $conf['mein_ts_key] = usw usf. ... im Backend komme ich aber mit dieser Mimik irgendwie nicht weiter. Gibt es fuer den Backend-Code /mod1/index.php irgendein anderes Vorgehen. Danke und Gruss Thomas ___ TYPO3-german mailing list TYPO3-german@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german ___ TYPO3-german mailing list TYPO3-german@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-german