Conditional menu display based on browser via PHP

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

But you weren't getting that before right? I'm wondering if it's a misleading error message. What happens if you remove our second block of code (from the table cell) and try it with just the first block (after the <body> tag)?

Kevin
pavia
Super Advanced
Super Advanced
Posts: 39
Joined: Fri Aug 16, 2002 2:39 pm

Post by pavia »

What happens if you remove our second block of code...
*Sigh*...the same exact error from browserdetect.php shows up and says "hi!"
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Can you email me your main page's .php source file, along with the browserdetect.php file? Just so we are both looking at the exact same code.

Kevin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hey Pavia,

What version of PHP is on your server?

Kevin
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

One more thing...

In the browser detection script, try replacing the inAgent() function with:

Code: Select all

function inAgent($agent) {
   $notAgent = strpos($_SERVER['HTTP_USER_AGENT'],$agent) === false;
   return !$notAgent; 
}
This is based on a hunch that $HTTP_USER_AGENT is depreciated in newer versions of PHP... you did mention that the browser detection script you found was posted in 2001. Figured it was worth a shot.

Kevin
pavia
Super Advanced
Super Advanced
Posts: 39
Joined: Fri Aug 16, 2002 2:39 pm

Post by pavia »

Kevin--

I don't know your e-mal address..

Have PHP Version 4.2.2 on my server...

Not ready to give in yet, huh?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

pavia wrote:...I don't know your e-mal address...
Just click the "email" button at the bottom of my posts. ;)
Not ready to give in yet, huh?
Not if you aren't... and not until a PHP person shows up (who would probably be able to do this in five seconds).

Kevin
pavia
Super Advanced
Super Advanced
Posts: 39
Joined: Fri Aug 16, 2002 2:39 pm

Post by pavia »

Am I crazy? There's no e-mail button at the bottom of your posts...?
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Yeah... I think you're crazy. ;) Do you view the posts while you're logged in? (If you aren't logged in when viewing the posts, the email button won't show up). In any case, I'll send it to your yahoo account. I don't want to post it here because I'm paranoid about it appearing in text anywhere.

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm crazy, too. I'm logged in and there's no email button and PM is disabled.

Ruth
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Maybe email was disabled because of all the viruses? :?

maz
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It's strange, because yours shows and John's and Andy's.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Kevin and Maz show 4 buttons each, and Ruth shows 5 - all including e-mail (which has not been disabled - all the button does is bring up a mailto in your own mail program - has nothing to do with the Forum).

Ruth, speaking of mail, the address you show here is not the same as the address I've been sending to, which was simply a reply to the message you sent me earlier this week. What is your correct address (send it to my "email button" if you prefer).

Also - notice anything new around your Avatar... :?:
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

John wrote:...Also - notice anything new around your Avatar... :?:
Very nice... let me say an official "welcome to the team!"... even though you've really been a team member for quite some time! You Milonic Machine you! :D

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Well, something must over-ride for you on the board John. I see only 3 on Kevin, 4 on you and Maz and there were only 4 on mine, but I eliminated AIM since I never use it. So, now there should be only 3 on mine. But, maybe you see the email even though I have it marked as do not show address? I sent an email reply to you.
Also - notice anything new around your Avatar... :?:
Sure do. Maz and I have been crowned :!: :D

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hmmm... I see email buttons for all y'all (a throwback phrase to my years in Virginia). Mine probably doesn't show because of something in my profile. I'll go have a look....

OK. "Always show email address" was set to "no". Just changed it to "yes", so maybe that'll add the button for me. When it was "no", I guess the button still showed up for me when I was logged in, just in case I wanted to email myself. ;)
Ruth wrote:Maz and I have been crowned
"Crowned Ruth"... isn't that an expensive kind of booze or something? :D

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Yep, it's Royal for we who have been crowned ;)

And, ya'll have email buttons now, but if you see one for me that's strange 'cause my profile has it set to no and it's not there for me! I have nun'tall, throwback to my still days in NC and sure hoping to be leaving soon :!:

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Where in Virginia, Kevin? I went to school in Salem.

Ruth, maybe I can see the buttons because of my Admin setting.

As to your address, whisper3 is where I'd been sending all the messages you never got this past week. That is not the address you have set here.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

John wrote:Where in Virginia, Kevin? I went to school in Salem....
Undergrad at James Madison University, in Harrisonburg, VA.

Hey Ruth... you see my email button now?

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Kevin: 8O yep, my new big specs must be working ;)

John... :oops: it's the one posted that you can see. I just found out the one you see is 'linked' to that whisper3 account, but if it's addressed as whisper3 instead of ruth it goes to a different box which is where all the spam is sent, which I never read just delete. Sorry....

Wondering if Pavia's code is fixable.....

Ruth
Post Reply