Open Source Content Management System

Browser detection with midcom

Midcom contains it's own browser-detection library that you may use in your own style. Here's a snippe showing how:

'midcom'->get_client(); //check if IE if ($client[MIDCOM_CLIENT_IE) { ?>

<

p>

The following constants are defined and may be checked this way:

MIDCOM_CLIENT_MOZILLA

MIDCOM_CLIENT_IE

MIDCOM_CLIENT_OPERA

MIDCOM_CLIENT_NETSCAPE

MIDCOM_CLIENT_UNIX

MIDCOM_CLIENT_MAC

MIDCOM_CLIENT_WIN

If you need more than that, you're on your own for now (or hack a bit at the midcom code =)

Designed by Nemein, hosted by Anykey