[TYPO3-german] Versuch den inhalt einer anderen extension aus der eigenen extension herraus zu manipulieren und auszugeben

David Bruchmann david at bruchmann-web.de
Sat Apr 18 00:12:30 CEST 2009


Hy Oliver,

$conf_thm->content und $conf_thm->conf sind nicht definiert.

Beim 2. Fehler mußt Du eventuell noch eine Variable definieren:
$conf_thm->irgendwas = 'StringOderArrayOderInt';
Welche das sein muss kannst Du ja nachsehen.

Allerdings kann es sein, daß der 2.Fehler auch nur durch den ersten 
Fehler verursacht wird.

Gruß
David

----- Ursprüngliche Nachricht -----
Von:        Oliver Leitner <shadow333 at gmail.com>
Gesendet:   Freitag, 17. April 2009 23:52:09
An:         German TYPO3 Userlist <typo3-german at lists.netfielders.de>
CC:
Betreff:    [TYPO3-german] Versuch den inhalt einer anderen extension 
aus der	eigenen extension herraus zu manipulieren und auszugeben
> Hallo liebe Kollegen
> 
> Ich spiele mich gerade mit einer test extension, in der ich versuche
> an den mailformplus output vorerst einmal ein hello world drann zu
> haengen...
> 
> Bis jetzt bin ich soweit:
> 
> 1. extension im kickstarter erstellt...
> 2. die pi1 klasse soweit angepasst:
> 
> ...
> ...
> ...
> /**
>  * [CLASS/FUNCTION INDEX of SCRIPT]
>  *
>  * Hint: use extdeveval to insert/update function index above.
>  */
> 
> require_once(PATH_tslib.'class.tslib_pibase.php');
> include('typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php');
> ...
> ...
> ...
> class tx_extovertest_pi1 extends tslib_pibase {
>         var $prefixId      = 'tx_thmailformplus_pi1';           //
> Same as class name
>         var $scriptRelPath = 'pi1/class.tx_thmailformplus_pi1.php';
>  // Path to this script relative to the extension dir.
>         var $extKey        = 'th_mailformplus'; // The extension key.
>         var $pi_checkCHash = true;
> 
>         /**
>          * The main method of the PlugIn
>          *
>          * @param       string          $content: The PlugIn content
>          * @param       array           $conf: The PlugIn configuration
>          * @return      The content that is displayed on the website
>          */
>         function main($content, $conf) {
>                 $this->conf = $conf;
>                 $this->pi_setPiVarDefaults();
>                 $this->pi_loadLL();
>                 $GLOBALS['TSFE']->no_cache = 1;
> ...
> ...
> ...
> $conf_thm = new tx_thmailformplus_pi1;
> print_r($conf_thm);
> ...
> ...
> ...
> if (defined('TYPO3_MODE') &&
> $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php'])
> {
>         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php']);
> }
> ...
> ...
> ...
> 
> wenn ich probiere die main funct aus der th mailformplus klasse anzugreifen mit:
> 
> return $conf_thm->main($conf_thm->content,$conf_thm->conf);
> 
> werde ich mit folgenden fehlern quittiert:
> 
> Warning: array_merge() [function.array-merge]: Argument #1 is not an
> array in /var/www/xxx/typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php
> on line 124
> 
> und dann weiter unten:
> 
> Fatal error: Call to a member function getSubpart() on a non-object in
> /var/www/xxx/typo3conf/ext/th_mailformplus/pi1/class.tx_thmailformplus_pi1.php
> on line 698
> 
> 
> Was mache ich hier falsch?
> 
> lg


More information about the TYPO3-german mailing list