Adaptation for php site...

Is message board greying out your hair (at least what's left of it)? Let us help you here
Locked
samuk1000
Posts: 5
Joined: Sat Mar 22, 2008 11:18 pm

Adaptation for php site...

Post by samuk1000 »

http://www.goingfree.org/messages

As you can see from the menu system at http://www.goingfree.org

The menu system is set using a "variables.php" file

The variable for a new menu item is:

$navigation["TAB NAME"] = "XYZ.php";

I obviously want if possible to display my message board
but when I create

$navigation["*NEWS*"] = "messages/mboard.php";

I get a series of line errors.

(see http://www.goingfree.org/index.php?page ... mboard.php")

Can anyone help me to make it so the excellent script (thanks Klemens) works to display on my page?

Thanks
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

The error you get (I got the error page that the page i was looking for could not be found) is because http://www.goingfree.org/index.php?page ... mboard.php") contains quotes around messages/mboard.php.

I do not exactly know how your script works, but three things you could try (I don't know if you tried already):
  1. try messages/mboard.php without quotes
  2. try 'messages/mboard.php' with single quotes
  3. try \"messages/mboard.php\" with escaped quotes.
This is all i could think of.

I hope one of these methods work because else i wouldn't know a solution.

Greetings,
Henrie
samuk1000
Posts: 5
Joined: Sat Mar 22, 2008 11:18 pm

Post by samuk1000 »

Many thanks, Henrie, I will try all these solutions. Check back at http://www.goingfree.org and click on the "NEWS" tab to see if it worked I guess.
Thanks again.
samuk1000
Posts: 5
Joined: Sat Mar 22, 2008 11:18 pm

Same problem

Post by samuk1000 »

I tried what you said

It seems to be a conflict

Any suggestions?

Sam
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

There is no conflict. This is another problem which had been discussed before.
Your template sends header information and MBoard also sends header information. This is the warning you are seeing "Warning: Cannot modify header information - headers already sent by (...."

You can see by using the following link http://www.goingfree.org/messages/mboard.php that MBoard works without any problems.

The following code in mboard.php file (in combination with your own code) is the cause of the error (lines 737, 738, 739, 740)

Code: Select all

header('Expires: Mon, 26 Jul 2000 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
I do not know if this code can be safely removed, I do not know MBoard well enough. Maybe Klemen can help here.

Greetings,
Henrie
samuk1000
Posts: 5
Joined: Sat Mar 22, 2008 11:18 pm

Post by samuk1000 »

It's very kind of you to lend your expertise, thanks.
You are quite right.
I will trying removing the code and see if script works.
Locked