[TYPO3-german] TYPO3-german] tt_address hook - fatal error using member function on non-object

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Aug 23 14:45:40 CEST 2011


Hallo

 

Ich habe eine Erweiterung für tt_address geschrieben, aber irgendwas
funktioniert daran noch nicht. Beim aufruf bekomme ich einen Fehler, daß
eine memberfunction auf ein non-object angewendet würde.
Ich würde mich freuen, wenn jemand mal über die Quelltexte drüberschauen
würde und ggf den Fehler findet.

Außerdem wäre interessant, ob es bei tt_address irgendeine Möglichkeit gibt
die PID nicht in jedem Plugin, sondern Global zu setzen. Konnte dazu nichts
in der Doku finden.

class.address_hook.php:

<?php

if (!defined ('TYPO3_MODE'))   die ('Access denied.');

class address_hook extends tx_ttaddress_pi1{

  public function extraItemMarkerProcessor(&$markerArray, &$address,
&$lConf, &$lcObj) {             

    $lcObj = t3lib_div::makeInstance('tslib_cObj');

    $lcObj->data = $address;

    $markerArray['###LAT###'] =
$lcObj->stdWrap($address['tt_address_hook_lat'],
$lConf['tt_address_hook_lat.']);

    $markerArray['###LON###'] =
$lcObj->stdWrap($address['tt_address_hook_lng'],
$lConf['tt_address_hook_lng.']);

  }

}

?>

 

ext_localconf.php:

<?php

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_address']['extraItemMarkerHook'][
] = 'EXT:tt_address_hook/class.address_hook.php:address_hook';

?>

 

TS-Setup:

# tt_address

plugin.tx_ttaddress_pi1{

  includeLibs.ttaddresshook =
typo3conf/ext/tt_address_hook/class.address_hook.php

  templatePath = fileadmin/Weimar/ext/tt_address/

  templateFileName = default.html

  pidList = 242

  recursive = 1

}

 

Danke!

Johannes

 

_______________________________________________
TYPO3-german mailing list
TYPO3-german at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german




More information about the TYPO3-german mailing list