Jump to content

Ohio Rider Mobile


Casper
 Share

Recommended Posts

Okay, so when you access a webpage, you send an http request. That request includes things like what OS you're using, along with what web browser. I added a little script in the main functions file saying if you're using a mobile browser, then you get the mobile theme.

[code:e1264]

$user_agent = $_SERVER['HTTP_USER_AGENT'];

$is_mobile = preg_match('/(up-browser)|(blackberry)|(windows ce)|symbian|palm|Maemo|nokia/i', $user_agent);

if ($is_mobile) {

$template_name = "subSilver_mobile";

}

[/code:e1264]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...