poniżej kod, który umożliwia wyświetlenie tematów z phpBB3 na dowolnej stronie... Kod znajduję się w pliku lasttopic2.php - utworzonym przeze mnie. Na stronie plik został zaimportowany funkcją "include" ale nie ma polskich znaków... Dodam, że gdy otwieram w przeglądarce plik "lasttopic2.php" polskie znaki są...
http://www.differ.pl - link do strony z funkcją include
http://www.differ.pl/forum/lasttopic2.php - link do pliku
Dlaczego na stronie głównej nie ma polskich znaków a w pliku są? Kodowanie zmieniałem... nic z tego...
<? /** * newest_posts - raw dump of newest posts from forum * * @copyright (c) 2008 ameeck / Vojtech Vondra - phpBB.cz * @license <a href=\"http://opensource.org/licenses/gpl-license.php\" target=\"_blank\">http://opensource.org/licenses/gpl-license.php</a> GNU Public License */ $phpbb_root_path = './'; include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); // Number of posts and grabbing permissions // Počet příspěvků pro zobrazení a oprávnění $topic_limit = request_var('topic_limit', 5); // Select the last topics to which we have permissions // Vybrat poslední témata ke kterým máme oprávnění $sql = 'SELECT p.post_id, p.topic_id, p.forum_id, p.post_subject, p.post_time, u.usernam
e FROM ' . POSTS_TABLE . ' p , ' . USERS_TABLE . ' u WHERE post_approved = 1 AND ' . $db->sql_in_set('forum_id', $forums) . ' AND u.user_id = p.poster_id ORDER BY post_time DESC LIMIT 0,' . $topic_limit; $result = $db->sql_query($sql); // Now let's output the content // A teď vypsat obsah echo '<div id="post_content" align="left"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><ul>'; while ($row = $db->sql_fetchrow($result)) { $url = generate_board_url() . "/viewtopic.{$phpEx}?f={$row['forum_id']}&t={$row['topic_id']}&p={$row['post_id']}#p{$row['post_id']}"; } ?>