Autor | Zpráva | ||
---|---|---|---|
asd333 Profil * |
#1 · Zasláno: 18. 2. 2007, 22:28:37
Je tu niekde chyba?
___________________________________ <?php /********************************************************************* ****** * announcements.php * ------------------- * copyright : Jan Marques © 2006 * email : gigjan@gmail.com * based on Smarter's ezPortal script [http://smartor.is-root.com/] ********************************************************************** *****/ /********************************************************************* ****** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ********************************************************************** *****/ // // Configuration // // Number of news on portal $CFG['number_of_news'] = '8'; // Length of news $CFG['news_length'] = '80'; // News Forum ID: separate by comma for multi-forums, eg. '1,2,5' $CFG['news_forum'] = '1,2,3,4,5,6,7'; // // No changes below please // -------------------------------------------------------- define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'fetchposts.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); $page_title = $lang['Home']; $gen_simple_header = TRUE; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'another_news_body.tpl') ); $template->assign_vars(array( 'L_ANNOUNCEMENT' => $lang['Topic_Announcement'], 'L_POSTED' => $lang['Posted'], 'L_COMMENTS' => $lang['Comments'], 'L_VIEW_COMMENTS' => $lang['View_Comments'], 'L_POST_COMMENT' => $lang['Post_Comments'], 'L_READ_FULL' => $lang['Read_Full']) ); if(!isset($HTTP_GET_VARS['article'])) { $template->assign_block_vars('welcome_text', array()); $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']); for ($i = 0; $i < count($fetchposts); $i++) { $template->assign_block_vars('fetchpost_row', array( 'TITLE' => $fetchposts[$i]['topic_title'], 'POSTER' => $fetchposts[$i]['username'], 'TIME' => $fetchposts[$i]['topic_time'], 'TEXT' => $fetchposts[$i]['post_text'], 'REPLIES' => $fetchposts[$i]['topic_replies'], 'U_VIEW_COMMENTS' => append_sid('http://totalwar.mih-team.com/forum/viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $fetchposts[$i]['topic_id']), 'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&'. POST_TOPIC_URL . '=' . $fetchposts[$i]['topic_id']), 'OPEN' => $open_bracket, 'CLOSE' => $close_bracket) ); } } else { $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0); $i = intval($HTTP_GET_VARS['article']); $template->assign_block_vars('fetchpost_row', array( 'TITLE' => $fetchposts[$i]['topic_title'], 'POSTER' => $fetchposts[$i]['username'], 'TIME' => $fetchposts[$i]['topic_time'], 'TEXT' => $fetchposts[$i]['post_text'], 'REPLIES' => $fetchposts[$i]['topic_replies'], 'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']), 'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']) ) ); } $template->pparse('body'); ?> __________________________ ide o jeden mod, na phpbb, ktory na stranke zobrazi najnovsie topicy. ale ked tento subor zaincludujem, tak mi to rozhadze pozadie stranky. v php sa nevyznam, takze nvm. |
||
djlj Profil |
#2 · Zasláno: 18. 2. 2007, 23:10:39
Je tu niekde chyba?
Pochybuju, že se tím někdo bude chtít probírat. Budeš muset napsat konkrétnější informace. |
||
Peca Profil |
#3 · Zasláno: 18. 2. 2007, 23:17:35
PHP nerozhazuje pozadí stránky, to dělá jedině html. Dej si zobrazit vygenerovaný zdroj té stránky, v něm hledej chybu a pak poznáš, co PHP posílá špatně.
|
||
Časová prodleva: 17 let
|
Toto téma je uzamčeno. Odpověď nelze zaslat.
0