Moin moin,
Wer die Extension "mr_parseglossary" kennt, der weiß, wovon ich brabbel.
Ich möchte eine Ext. schreiben, die mir den Inhalt einer Seite ausließt bevor sie angezeigt wird, etwas ummodelt und dann zur Ausgabe zurück gibt.
die mr_parseglossary macht das ja eigentlich ganz gut und an dieser orientiere ich mich gerade. Aber nun mein Problem:
In TemplaVoila geht das so wohl nicht.
Mein TS:
includeLibs.ecc_parsing = EXT:ecc_parsing/pi1/class.tx_eccparsing_pi1.php
temp_content < styles.content.get
temp_content {
stdWrap {
postUserFunc = tx_eccparsing_pi1->main
postUserFunc.table = tabelle
postUserFunc.field = feld
}
}
styles.content.get >
styles.content.get < temp_content
In der pi1.php steht dann folgendes...
require_once(PATH_tslib.'class.tslib_pibase.php');
class tx_eccparsing_pi1 extends tslib_pibase {
var $prefixId = 'tx_eccparsing_pi1';
var $scriptRelPath = 'pi1/class.tx_eccparsing_pi1.php';
var $extKey = 'ecc_parsing'; // The extension key.
var $pi_checkCHash = TRUE;
function main($content,$conf) {
$this->conf = $conf;
$table = $this->conf['table'];
$field = $this->conf['field'];
$resfe = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',$table,$where_clause='pid=30 AND endtime > 0',$groupBy='',$orderBy='',$limit='');
$numfe = $GLOBALS['TYPO3_DB']->sql_num_rows($resfe);
if($numfe > 0) {
for($x=0;$x<$numfe;$x++){
$rowfe = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resfe);
$find = $rowfe[$field];
if ($find != '') {
$replace = $this->pi_linkToPage($rowfe['tx_minesite_nickname'],69,'',$urlParameters=array('tx_minesite_pi1[cid]' => $rowfe['uid']));
$content = eregi_replace($find,$replace,$content);
}
}
}
return $content;
}
}
Aber da kommt einfach nix raus.
Kann mir jemand helfen bitte.