Wow! Now that's what I'm talkin about. This is very slick. Lots of work but very slick.
CoC, You have really taken this style up to the next level. Great job and thank you for your contributions. I'm having a lot of fun with this on my site.


$real_name = ''; switch(true) else if (preg_match('/BlackBerry9700/i',$user_agent))
{
$status = 'BlackBerry 9700';
}
else if (preg_match('/BlackBerry 9800/i',$user_agent))
{
$status = 'BlackBerry 9800';
}
else if (preg_match('/BlackBerry9800/i',$user_agent))
{
$status = 'BlackBerry 9800';
} else if (preg_match('/BlackBerry9700/i',$user_agent))
{
$real_name = 'Blackberry Bold';
$status = 'BlackBerry 9700';
}
else if (preg_match('/BlackBerry 9800/i',$user_agent))
{
$real_name = 'Blackberry Torch';
$status = 'BlackBerry 9800';
}
else if (preg_match('/BlackBerry9800/i',$user_agent))
{
$real_name = 'Blackberry Torch';
$status = 'BlackBerry 9800';
} return array($mobile_browser,$status); return array($mobile_browser,$status, $real_name); $message_parser->message .= "\n\n[size=80][b][i][ Post made via " . $status[1] . "][/i][/b][/size] [img]http://www.yoursite.com/forums/images/" . $status[1] . ".png[/img]"; if (empty($status[2]))
{
$status = $status[1];
}
else
{
$status = $status[2];
}
$message_parser->message .= "\n\n[size=80][b][i][ Post made via " . $status[2] . "][/i][/b][/size] [img]http://www.yoursite.com/forums/images/" . $status[1] . ".png[/img]";



case (preg_match('/blackberry/i',$user_agent));
if (preg_match('/BlackBerry7100i/i',$user_agent))
{
$status = 'BlackBerry 7100i';
}
else if (preg_match('/BlackBerry7130e/i',$user_agent))
{
$status = 'BlackBerry 7130e';
}
else if (preg_match('/BlackBerry7130e/i',$user_agent))
{
$status = 'BlackBerry 7130e';
}
else if (preg_match('/BlackBerry7250/i',$user_agent))
{
$status = 'BlackBerry 7250';
}
else if (preg_match('/BlackBerry7230/i',$user_agent))
{
$status = 'BlackBerry 7230';
}
else if (preg_match('/BlackBerry7520/i',$user_agent))
{
$status = 'BlackBerry 7520';
}
else if (preg_match('/BlackBerry7730/i',$user_agent))
{
$status = 'BlackBerry 7730';
}
else if (preg_match('/BlackBerry8100/i',$user_agent))
{
$status = 'BlackBerry 8100';
}
else if (preg_match('/BlackBerry8130/i',$user_agent))
{
$status = 'BlackBerry 8130';
}
else if (preg_match('/BlackBerry8310/i',$user_agent))
{
$status = 'BlackBerry 8310';
}
else if (preg_match('/BlackBerry8320/i',$user_agent))
{
$status = 'BlackBerry 8320';
}
else if (preg_match('/BlackBerry8500/i',$user_agent))
{
$status = 'BlackBerry 8500';
}
else if (preg_match('/BlackBerry8520/i',$user_agent))
{
$status = 'BlackBerry 8520';
}
else if (preg_match('/BlackBerry8530/i',$user_agent))
{
$status = 'BlackBerry 8530';
}
else if (preg_match('/BlackBerry8700/i',$user_agent))
{
$status = 'BlackBerry 8700';
}
else if (preg_match('/BlackBerry8703e/i',$user_agent))
{
$status = 'BlackBerry 8703e';
}
else if (preg_match('/BlackBerry8820/i',$user_agent))
{
$status = 'BlackBerry 8820';
}
else if (preg_match('/BlackBerry8830/i',$user_agent))
{
$status = 'BlackBerry 8830';
}
else if (preg_match('/BlackBerry8900/i',$user_agent))
{
$status = 'BlackBerry 8900';
}
else if (preg_match('/BlackBerry9000/i',$user_agent))
{
$status = 'BlackBerry 9000';
}
else if (preg_match('/BlackBerry9530/i',$user_agent))
{
$status = 'BlackBerry 9530';
}
else if (preg_match('/BlackBerry9630/i',$user_agent))
{
$status = 'BlackBerry 9630';
}
else if (preg_match('/BlackBerry9700/i',$user_agent))
{
$status = 'BlackBerry 9700';
}
else if (preg_match('/BlackBerry 9800/i',$user_agent))
{
$status = 'BlackBerry 9800';
}
else if (preg_match('/BlackBerry9800/i',$user_agent))
{
$status = 'BlackBerry 9800';
}
else
{
$status = 'BlackBerry';
}
$mobile_browser = $blackberry;
if(substr($blackberry,0,4)=='http')
{
$mobileredirect = $blackberry;
}
break; 



heredia21 wrote:Heres the updated version of the BlackBerry user agents with 85xx series included:
else if (preg_match('/BlackBerry9700/i',$user_agent))
{
$real_name = 'Blackberry Bold';
$status = 'BlackBerry 9700';
}
else if (preg_match('/BlackBerry 9800/i',$user_agent))
{
$real_name = 'Blackberry Torch';
$status = 'BlackBerry 9800';
}
else if (preg_match('/BlackBerry9800/i',$user_agent))
{
$real_name = 'Blackberry Torch';
$status = 'BlackBerry 9800';
}





spirit_rider wrote:Hi,
This style is very nice. I do not want my forum to automatically redirect to this style if a user visit the forum using mobile device. But if he visit the forum with a specific url (Example: wap.myforum.com ) then only this style should be displayed. I tried to create a subdomain and redirected to this style but if the user logout from the forum it again displays the forum's default style.
And this mobile device detecting script will used to add the automatic text saying post made using mobile device.
I hope some one can help me to do this.
Thanks in advance.



case (preg_match('/blackberry/i',$user_agent));
if (preg_match('/BlackBerry7100i/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7130e/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7130e/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7250/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7230/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7520/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry7730/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry8100/i',$user_agent))
{
$real_name = 'Blackberry Pearl';
$status = 'Pearl';
}
else if (preg_match('/BlackBerry8130/i',$user_agent))
{
$real_name = 'Blackberry Pearl';
$status = 'Pearl';
}
else if (preg_match('/BlackBerry8310/i',$user_agent))
{
$real_name = 'Blackberry Pearl';
$status = 'Pearl';
}
else if (preg_match('/BlackBerry8320/i',$user_agent))
{
$real_name = 'Blackberry Curve';
$status = 'Curve';
}
else if (preg_match('/BlackBerry8500/i',$user_agent))
{
$real_name = 'Blackberry Curve';
$status = 'Curve';
}
else if (preg_match('/BlackBerry8520/i',$user_agent))
{
$real_name = 'Blackberry Curve';
$status = 'Curve';
}
else if (preg_match('/BlackBerry8530/i',$user_agent))
{
$real_name = 'Blackberry Curve';
$status = 'Curve';
}
else if (preg_match('/BlackBerry8700/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry8703e/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry8820/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry8830/i',$user_agent))
{
$real_name = 'Blackberry Smart Phone';
$status = 'BBSmart';
}
else if (preg_match('/BlackBerry8900/i',$user_agent))
{
$real_name = 'Blackberry Curve';
$status = 'Curve';
}
else if (preg_match('/BlackBerry9000/i',$user_agent))
{
$real_name = 'Blackberry Bold';
$status = 'Bold';
}
else if (preg_match('/BlackBerry9530/i',$user_agent))
{
$real_name = 'Blackberry Storm';
$status = 'Storm';
}
else if (preg_match('/BlackBerry9630/i',$user_agent))
{
$real_name = 'Blackberry Tour';
$status = 'Tour';
}
else if (preg_match('/BlackBerry9700/i',$user_agent))
{
$real_name = 'Blackberry Bold';
$status = 'Bold';
}
else if (preg_match('/BlackBerry 9800/i',$user_agent))
{
$real_name = 'Blackberry Torch';
$status = 'Torch';
}
else
{
$status = 'BlackBerry';
}
$mobile_browser = $blackberry;
if(substr($blackberry,0,4)=='http')
{
$mobileredirect = $blackberry;
}
break; 

Users browsing this forum: No registered users and 19 guests