[TYPO3-dev] Extend class in extension's creation

Hraklis Karvasonis Hkarvasonis at customit.com
Tue Sep 26 19:48:21 CEST 2006


Thanks Oliver for your help.

I added the lines you told me. I think i found the correct syntax there, 
but now i get an error that the extension's main class, which i am 
trying to extend, failed to open PATH_tslibclass.tslib_pibase.php

this is the exact message if it helps.

Warning: main(PATH_tslibclass.tslib_pibase.php): failed to open stream: 
No such file or directory in 
/home/webadmin/mlcc.customit.com/html/home/typo3conf/ext/myextension/pi1/class.tx_myextension_pi1.php 
on line 25

Fatal error: main(): Failed opening required 
'PATH_tslibclass.tslib_pibase.php' (include_path='.:/usr/share/pear') in 
/home/webadmin/mlcc.customit.com/html/home/typo3conf/ext/myextension/pi1/class.tx_myextension_pi1.php 
on line 25

Do you have any idea?

Thanks.

Oliver Hader wrote:
> Hi,
> 
> Hraklis Karvasonis wrote:
>> I tried also that, but now i receive the following:
>>
>> Warning: main(PATH_t3libclass.t3lib_extmgm.php): failed to open stream:
>> No such file or directory in mynewclass.php on line 3
> 
> Is it possible that this class/script is not called by TYPO3, but it's
> call directly from outside via browser? The 'PATH_t3lib' definition
> isn't substituted by the value it should be, so I guess the php script
> is called directly.
> 
> If this could be answered with "yes", you have to include some TYPO3
> specific thingy to be able to use them, for example:
> 
> $BACK_PATH = '../../../typo3/';
> define('TYPO3_MOD_PATH', '../typo3conf/ext/myextension/');
> require_once($BACK_PATH.'init.php');
> 
> You could have a look to typo3_src/typo3/wizard_add.php, how this could
> be done. You can also have a look to some other Backend Modules of TYPO3
> or wizard scripts.
> 
>> Fatal error: main(): Failed opening required
>> 'PATH_t3libclass.t3lib_extmgm.php' (include_path='.:/usr/share/pear') in
>> mynewclass.php on line 3
>>
>> Is there any way i can define somewhere that the new class gets all the
>> includes like the extension's new class does? Because right now it seems
>> that it doesn't find any class i am trying to include there.
>>
>> Thanks.
>>
>> Oliver Hader wrote:
>>> Hraklis Karvasonis wrote:
>>>> is Fatal error: Undefined class name 't3lib_extmgm' in mynewclass.php on
>>>> line 11
>>> Okay, the extmgm is not found, so t3lib_extMgm::extPath isn't working at
>>> all. You have to include/require the t3lib-class before using it:
>>>
>>> require_once(PATH_t3lib.'class.t3lib_extmgm.php');
>>> require_once(t3lib_extMgm::extPath('myextension').'class.myextension.php');
> 
> 
> olly




More information about the TYPO3-dev mailing list