MyBB Community Forums

Full Version: I need?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1.OS detection
2. Browser detection
I need to add to my forum.
Thanks.
well i can offer u a custom signature u may added it somewhere on the site it tells u about the browser and OS

go here HERE check for the signatures

example

[Image: anismagma.jpg]
For OS Detection:
<script language="javascript">
<!--
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

document.write('Your OS: '+OSName);
//-->
</script>
For Browser Detection:
<script language="javascript">
<!--
var browserName=navigator.appName; 
if (browserName=="Netscape")
{ 
 alert("Hi Netscape User!");
}
else 
{ 
 if (browserName=="Microsoft Internet Explorer")
 {
  alert("Hi, Explorer User!");
 }
 else
  {
    alert("What ARE you browsing with here?");
   }
}
//-->
</script>
ah then u want to add it to the postbit !!


in Admin cp , go to templating, > post bit !! and then scroll find $post[usertitle]<br />
$post[userstars]
$post[groupimage]<br />
$post[useravatar], and umm i think u will need to add smethead's scripts after $post[replink!! Big Grin

hope he will confirm that
If you add the code posted above into the post bit, it will show the browser and OS of the user surfing the forum, and not the poster. If you want to show the poster's OS and Browser, you have to do something more complicated and save it server-side.