[TYPO3-german] TYPO3 4. loginnews
Joachim Streit
jstreit at ditnetwork.de
Thu Mar 29 09:50:57 CEST 2007
Marc Bastian Heinrichs schrieb:
8<snip>8
Hallo MArc,
danke für deine Hilfe, aber auch das geht gar nicht.
Ich habe den Code von dir jetzt mal eingebaut:
if (!t3lib_div::_GET('loginRefresh')) {
if (t3lib_extMgm::isloaded('tt_news')) {
require_once(PATH_t3lib.'class.t3lib_page.php');
require_once(PATH_t3lib.'class.t3lib_befunc.php');
$lConf = unserialize($TYPO3_CONF_VARS['EXT']['extConf'][$_EXTKEY]);
$table2 = 'tt_news';
$enableFields = t3lib_BEfunc::BEenableFields($table2);
$pid = intval($lConf['login_news_pid']);
$limit = intval($lConf['login_news_limit']);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table_2,
'pid='.$pid.' '.$enableFields, '', 'crdate DESC', $limit);
if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'][] = Array (
'date' => strftime ('%e. %B %Y', $row['datetime']),
'header' => $row['title'],
'content' => nl2br($row['bodytext'])
);
}
}
}
}
Folgende Fehlermeldung:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /usr/typo3_src-4.1/t3lib/class.t3lib_db.php on line 783
Warning: Cannot modify header information - headers already sent by
(output started at /usr/typo3_src-4.1/t3lib/class.t3lib_db.php:783) in
/usr/typo3_src-4.1/t3lib/class.t3lib_userauth.php on line 311
(... ect...)
schade ...
Joachim
More information about the TYPO3-german
mailing list