PDA

View Full Version : Will 'if_browser=ie' work in php files?


Razasharp
18 Jan 2007, 03:01
Just wondering, will this work in the php files?:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Cheers

Psionic Vision
18 Jan 2007, 03:04
No, the function is a javascript function and will work only within javascripts.

Razasharp
18 Jan 2007, 03:11
Ah right... thanks.

I guess there's no way to test what browser someone is using via PHP then?

SirAdrian
18 Jan 2007, 05:38
Take a look at how vB. does it (functions.php)

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Brad
18 Jan 2007, 06:58
Here you go, and yes these functions will work in the .php files, plug-ins, and templates. :)

http://www.vbulletin.org/forum/showthread.php?t=107538

Razasharp
19 Jan 2007, 04:00
Thanks both.

Would I need to re paste the function in the script I want to use it? Or use a different if statement?

Or can you give me some pointers in what I have to do in order to get an if statement like in Post #1 to work in the class_bbcode.php script?

Appreciate any help!
Thanks.

Brad
20 Jan 2007, 12:13
Thanks both.

Would I need to re paste the function in the script I want to use it? Or use a different if statement?

Or can you give me some pointers in what I have to do in order to get an if statement like in Post #1 to work in the class_bbcode.php script?

Appreciate any help!
Thanks.
As long as functions.php is loaded you'll be able to use the above function. Functions.php is loaded around line 140 of init.php, so it should always be there if you need it.

Razasharp
20 Jan 2007, 17:13
Thanks Brad.

So basically, this should work?



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Brad
02 Feb 2007, 07:37
Yes that works, however. ;)



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------