Thema getrennt von phpBB news anzeige
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hallo,
ich denke mal das ich das nun einfach hier reinschreibe, brauch ich ja nicht extra nen neues Dingen für auf machen.
Also das Problem habe ich immer noch, aber mitterweile habe ich das bis gerade so programmiert, das er mir schon mal Inhalt anzeigt, nur ich weiß absoult nicht, wieso er nur einen Eintrag macht obwohl 2 in der Datenbank sind.
Ich kann euch ja mal den Quellcode posten und ich würd mich freuen, wenn ihr mir dabei helfen könnt, weil ich weiß so langsam nicht mehr weiter, und es ist schon spät
Alles anzeigen
Und hier wie er es in der tpl ausgibt.
Alles anzeigen
Würd mich freuen, wenn das hinhaut..
GRuß
dehne
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hallo,
ich denke mal das ich das nun einfach hier reinschreibe, brauch ich ja nicht extra nen neues Dingen für auf machen.
Also das Problem habe ich immer noch, aber mitterweile habe ich das bis gerade so programmiert, das er mir schon mal Inhalt anzeigt, nur ich weiß absoult nicht, wieso er nur einen Eintrag macht obwohl 2 in der Datenbank sind.
Ich kann euch ja mal den Quellcode posten und ich würd mich freuen, wenn ihr mir dabei helfen könnt, weil ich weiß so langsam nicht mehr weiter, und es ist schon spät

Quellcode
- <?php
- define('IN_PHPBB', true);
- $phpbb_root_path = './';
- include($phpbb_root_path . 'extension.inc');
- include($phpbb_root_path . 'common.'.$phpEx);
- $userdata = session_pagestart($user_ip, PAGE_NEWS);
- init_userprefs($userdata);
- $page_title = News;
- include($phpbb_root_path . 'includes/page_header.'.$phpEx);
- $template->set_filenames(array(
- 'body' => 'news_body.tpl')
- );
- $sql = "SELECT * FROM phpbb_news WHERE phpbb_news.news_id ORDER BY phpbb_news.news_id DESC LIMIT 10";
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not read news information', '', __LINE__, __FILE__, $sql);
- }
- $row = $db->sql_fetchrow($result);
- $title = ( $row['title'] ) ? $row['title'] : 0;
- $message = ( $row['$message'] ) ? $row['$message'] : 0;
- $db->sql_freeresult($result);
- $template->assign_block_vars('newsrow',array(
- 'TITLE' => $row['title'],
- 'TEXT' => $row['message'])
- );
- $template->pparse('body');
- include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
- ?>
Und hier wie er es in der tpl ausgibt.
Quellcode
- <table width="100%" cellspacing="0" cellpadding="0" border="0">
- <!-- BEGIN newsrow -->
- <table width="100%">
- <tr>
- <td width="100%" class="catLeft" colspan="2" height="28" align="center"><span class="gen"><b>{newsrow.TITLE}</b></span></td>
- <tr>
- <td align="left" class="row1"><span class="postbody">{newsrow.TEXT}</span></td>
- </tr>
- <!-- END newsrow -->
- </table>
- </table>
Würd mich freuen, wenn das hinhaut..
GRuß
dehne
Ich würd zu gern die Welt verändern, doch Gott rückt den Quellcode net raus.