TECH: Post Nuke & VBulletin HELP!!!

Michael Morris

First Post
I've been trying now for 3 weeks to try to figure out how to get the drop down menus to work for the boards and the main site. Now, the main site is in Post Nuke and these boards are VBulletin. Here's the code in question and what it does...

PHP:
<?php
if (strpos($HTTP_USER_AGENT, 'MSIE') <> false) {
				  echo "<script language=\"JavaScript1.2\" src=\"topmenu.js\"></script>";
}	elseif (strpos($HTTP_USER_AGENT, 'Gecko') <> false) {
				  echo "<script language=\"JavaScript1.2\" src=\"topmenu.js\"></script>";
}

?>

This queries checks the browser to see if it can handle HTML 5.0. If it can it loads the script. If it doesn't it won't load the script. This section has to appear in the header of the outputted HTML.

PHP:
<?php
if (strpos($HTTP_USER_AGENT, 'MSIE') <> false) {
				  include("./menu/_menubody.php");

}   elseif (strpos($HTTP_USER_AGENT, 'Gecko') <> false) {
				  include("./menu/_menubody.php");
}
?>

Same query, but this time an include is called if the condition is true.

The included file is an image map placed on a layer. I'd post it, but it would make this message darn near unreadable.
 
Last edited:

log in or register to remove this ad

Why are you including anything in the header? The header is sent BEFORE any data is transmitted, that is everything before < !doctype > and < html >, and should only be used for sessions and such [1]. You should include the topmeny script in the < head >< /head > (head = NOT header).

What exactly is _menubody.php?



[1] http://www.w3.org/Protocols/rfc2616/rfc2616
http://se.php.net/manual/en/function.header.php



Edit: Regarding the header thing. If you asked a HTML question "header" is perfectly valid. However as this is a PHP question I assumed you were talking about HTTP headers which are not the same thing. Anyhow, I assume you included the script inside < head > which is a good thing. ;)
 
Last edited:

Psionicist said:
Why are you including anything in the header? The header is sent BEFORE any data is transmitted, that is everything before < !doctype > and < html >, and should only be used for sessions and such [1]. You should include the topmeny script in the < head >< /head > (head = NOT header).

Ah. Sorry for the confusion of me using the wrong term to describe it. Yes, the first section comes between the <head></head> tags.

What exactly is _menubody.php?

I'll attach it. Basically it is an image map that creates a layer using the <div> tag.

Edit: Regarding the header thing. If you asked a HTML question "header" is perfectly valid. However as this is a PHP question I assumed you were talking about HTTP headers which are not the same thing. Anyhow, I assume you included the script inside < head > which is a good thing. ;)

I know where the things need to be positioned.. I even know how to write the PHP (The script is in use on the Dusk site) BUT, I don't know how to get vbulletin and Post Nuke to process these commands as part of their page assembly and include the menu. :(
 

Attachments

Last edited:

Remove ads

Top