[TYPO3-dev] Extend extension's class

Hraklis Karvasonis Hkarvasonis at customit.com
Fri Oct 20 14:49:15 CEST 2006


Hi.

I have the following code:

define('TYPO3_MOD_PATH', '../typo3conf/ext/my_extension/');
$BACK_PATH = '../../../typo3/';
require_once($BACK_PATH.'init.php');
require_once(PATH_t3lib.'class.t3lib_extmgm.php');
require_once(t3lib_extMgm::extPath('my_extension').'pi1/class.tx_myextension_pi1.php');

class apply_form extends tx_myextension_pi1{

      function apply_form() {..}
}
if (defined('TYPO3_MODE') && 
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/my_extension/pi1/class.apply_form.php']) 
{
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/my_extension/pi1/class.apply_form.php']);
}

I am creating a new class that extends the tx_myextension_pi1 class 
(which is generated by Kickstarter).

I want to do, among other things, an insert query.
$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_citjoboffers_jobapply',$field_values);

I can't make it work.

Error/Warning:
Warning: main(../../../typo3/init.php): failed to open stream: No such 
file or directory in 
/home/webadmin/site.com/html/home/typo3conf/ext/my_extension/pi1/class.apply_form.php 
on line 4

Fatal error: main(): Failed opening required '../../../typo3/init.php' 
(include_path='.:/usr/share/pear') in 
/home/webadmin/site.com/html/home/typo3conf/ext/my_extension/pi1/class.apply_form.php 
on line 4

The new class is loaded in an iframe at the same page (I am not sure if 
this is a problem).


Any help would be appreciated!
Thanks




More information about the TYPO3-dev mailing list