Go Back   EN World D&D / RPG News > Meta - Forums About Forums > Meta

Meta Post comments and questions about the messageboards and other parts of EN World. If you have a problem, this is where to go. Moderator email addresses are posted here.

 
Share LinkBack Thread Tools Display Modes
Old 30th October 2003, 08:08 PM   #1 (permalink)
Lost in the Machine
 
Michael Morris's Avatar
 
Join Date: Jan 2002
Location: Knoxville TN
Posts: 7,902
Michael Morris Goblin Sharpshooter (Lvl 2)
Send a message via ICQ to Michael Morris Send a message via AIM to Michael Morris Send a message via MSN to Michael Morris Send a message via Yahoo to Michael Morris
TECH: Post Nuke & VBulletin HELP!!!

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 Code:
<?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 Code:
<?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 by Michael Morris; 30th October 2003 at 08:17 PM..
Michael Morris is offline   Reply With Quote
Old 30th October 2003, 08:37 PM   #2 (permalink)
Registered User
 
Join Date: Jan 2002
Posts: 1,823
Psionicist Goblin Sharpshooter (Lvl 2)
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.
__________________
The river sparkles and dances on the rocks.
At night, it flows deep and strong.

Last edited by Psionicist; 30th October 2003 at 08:41 PM..
Psionicist is offline   Reply With Quote
Old 31st October 2003, 10:51 AM   #3 (permalink)
Lost in the Machine
 
Michael Morris's Avatar
 
Join Date: Jan 2002
Location: Knoxville TN
Posts: 7,902
Michael Morris Goblin Sharpshooter (Lvl 2)
Send a message via ICQ to Michael Morris Send a message via AIM to Michael Morris Send a message via MSN to Michael Morris Send a message via Yahoo to Michael Morris
Quote:
Originally Posted by Psionicist
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.

Quote:
What exactly is _menubody.php?
I'll attach it. Basically it is an image map that creates a layer using the <div> tag.

Quote:
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.
Attached Files
File Type: txt _menubody.txt (1.6 KB, 44 views)

Last edited by Michael Morris; 31st October 2003 at 10:55 AM..
Michael Morris is offline   Reply With Quote


Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


And yet another word from our sponsors
Visit Our Sponsors
Visit Our Sponsors... Again
Powered by vBadvanced CMPS v3.0.1

All times are GMT +1. The time now is 08:12 AM.


Site Contents © 2008 ENWorld
PHP Ajax Multimedia Web Framework © 2008 Digital Media Graphix
Powered by vBulletin® Version 3.8.0 Beta 1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

"Vault Data" powered by VaultWiki v2.5.1.
Copyright © 2008 - 2009, Cracked Egg Studios.