I'm currently in the process of implementing a wiki with my phpBB 2.0.22 board (http://bottleweb.org and http://bottleweb.org/wiki/index.php). It's actually not proving too difficult but my only problem now is that while the wiki is running, the forum php files are not, so none of the variables exist in the wiki instance. I'm talking about U_LOGIN_LOGOUT, U_FAQ, U_PRIVATEMSGS, etc.

For the FAQ page, forum link, member list, register link and profile link this isn't a problem since I can just replace the links with http links for pages inside the wiki. My problem is that I don't have access to the U_LOGIN_LOGOUT and U_PRIVATEMSGS, which tell my menu buttons when to display "Log in" or "log out", as well as an icon of an envelope when I have no messages, so I can't simply make an html link.

Sorry if I've waffled on the point is I'm trying to access these variables from outside phpBB, how do I do this? I'm using mediaWIKI which is also php/html.

And I get an error telling me that the header information has already been passed by page_header.php, and can't be accessed again (by mediawiki's own header information). I'm thinking that the easiest way around this would be to manually get the "if logged in" stuff and put it all in the mediawiki php file.

I mean, it's overkill to load all those php files just for two yes/no variables right? Do you know what code I would need to add to a PHP file to get the privatemsgs and u_login_logout variables? I can't think of any other way to do this...

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_INDEX); init_userprefs($userdata);
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10

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_INDEX); init_userprefs($userdata);
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at /home/www/bottleweb.org/wiki/index.php:8) in /home/www/bottleweb.org/wiki/includes/WebResponse.php on line 10

ok, when he said to put that code at the very top of the page, it still needs to be under <?php

I can help you edit your forums at a reasonable price, send a PM if you can't get something figured out here.

Warning: main(./extension.inc) [function.main]: failed to open stream: No such file or directory in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 4
Warning: main() [function.include]: Failed opening './extension.inc' for inclusion (include_path='/home/www/bottleweb.org/wiki:/home/www/bottleweb.org/wiki/includes:/home/www/bottleweb.org/wiki/languages:.:/usr/local/lib/php') in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 4
Notice: Undefined variable: phpEx in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 5
Warning: main(./common.) [function.main]: failed to open stream: No such file or directory in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 5
Warning: main() [function.include]: Failed opening './common.' for inclusion (include_path='/home/www/bottleweb.org/wiki:/home/www/bottleweb.org/wiki/includes:/home/www/bottleweb.org/wiki/languages:.:/usr/local/lib/php') in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 5
Fatal error: Call to undefined function: session_pagestart() in /home/www/bottleweb.org/wiki/skins/Bottleweb.php on line 6

I thought that maybe I should put it in the index.php file instead (since this gets executed first), so I tried that but it didn't work either (again with the code right below the <?php line). the contents of index.php is: