Scheduled Maintenance: 10-11-2025 Electricity company maintenance between 09:00 and 15:00.

3.2 & 3.3 Extensions Database 3.2 / 3.3Browser & OS in Viewtopic

<span class="qte-attr qte_32_33-qte">3.2.x & 3.3.x</span>
User avatar

rogerio24
Users
Users
Posts: 77
Joined: 05 Jun 2016, 20:18
    Linux Firefox

Re: Browser & OS in Viewtopic

Post by rogerio24 »

:D

Maybe you can help me with this issue with the same extension SEO URL Extension

viewtopic.php?f=10&p=14333#p14333

User avatar

rogerio24
Users
Users
Posts: 77
Joined: 05 Jun 2016, 20:18
    Linux Firefox

Re: Browser & OS in Viewtopic

Post by rogerio24 »

rogerio24 wrote: 22 Jan 2017, 18:48 Thanks very much work with this code

function ua_get_filename($name, $folder)
{
if (substr($name, 0, 11) == 'unknown')
return generate_board_url() . '/ext/dmzx/browsericon/images/user_agent/unknown.png';

$name = strtolower($name);
$name = str_replace(' ', '', $name); // remove spaces
$name = preg_replace('/[^a-z0-9_]/', '', $name); // remove special characters
return generate_board_url() . '/ext/dmzx/browsericon/images/user_agent/'.$folder.'/'.$name.'.png';
}
Look :D

http://www.tdtlatinoamerica.com.ar/foro ... 375#p39375

http://www.tdtlatinoamerica.com.ar/foro ... tml#p39375

:mml: :mml: :mml:

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Windows 10 Chrome

Re: Browser & OS in Viewtopic

Post by martin »

I used this in the dice addon . generate_board_url() . '/ext/dmzx/

You should of stated your board is not in root in your first post.
Image

User avatar

Tarantino
Users
Users
Posts: 42
Joined: 10 Sep 2016, 04:58
    Windows 10 Chrome

Re: Browser & OS in Viewtopic

Post by Tarantino »

:thumbup:

EDIT: martin, 75%? of boards are not on root, its something that needs to never forget when writing something :whistl:

Just teasing you :lol:

User avatar

miri4ever
Users
Users
Posts: 71
Joined: 22 Jan 2017, 15:39
    Windows 10 Opera

Re: Browser & OS in Viewtopic

Post by miri4ever »

Is there an easy way to add system and browser to all older posts without editing everyone of them ?

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Windows 10 Chrome

Re: Browser & OS in Viewtopic

Post by martin »

No as the database and ext have no clue as to what info posted it.

User avatar

german-german
Users
Users
Posts: 2
Joined: 12 Dec 2017, 20:36
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by german-german »

Hello

I love this ext

Would be nice an update

E.g.
-Android showing as Linux
-Opera showing as Chrome
-Edge showing as Spartan
etc

Picture-Opera-Android
Image

User avatar

Webmaster Chuck
Users
Users
Posts: 5
Joined: 09 May 2017, 07:23
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by Webmaster Chuck »

Awesome Mod! Worked great on 3.2.1 right out of the box!

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by Solidjeuh »

Just a test message to see if it works with Firefox Nightly 64 Bits ...
Forum voor NL Extensie vertalingen ---> https://www.supportforum.be
----------------------------------------------------------------------------

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by Sniper_E »

Just a test message to see if it works with Firefox Nightly 64 Bits ...
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by Solidjeuh »

Sniper_E wrote: 28 Jan 2018, 04:07 Just a test message to see if it works with Firefox Nightly 64 Bits ...
:rolling:

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Ubuntu Chrome

Re: Browser & OS in Viewtopic

Post by martin »

german-german wrote: 12 Dec 2017, 21:54 Hello

I love this ext

Would be nice an update

E.g.
-Android showing as Linux
-Opera showing as Chrome
-Edge showing as Spartan
etc

Picture-Opera-Android
Image
Android is linux Opera is Chrome based Edge is shit so yeah its working as its ment too.

see samsung s8 is Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950F/XXU1AQL5 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36

User avatar

whocarez
Users
Users
Posts: 1
Joined: 07 Apr 2016, 12:23
    Ubuntu Firefox

Re: Browser & OS in Viewtopic

Post by whocarez »

Hello,
user agents from newer Internet Explorer/Edge aren't detected.
Something like "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" is detected as Mozilla browser, what is obviously wrong.
So this should be treated as Internet Explorer or Edge. I don't really know, because not using Windows.
https://developers.whatismybrowser.com/ ... e/trident/

So adding Trident before Mozilla in the browsers array and then integrating a second "Detect IE version" can do the trick.

Code: Select all

	// Detect IE version
	if ($browser == 'Trident')
	{
		$browser = 'Internet Explorer';
		$browser_version = substr($useragent, strpos($useragent, 'rv:')+3,2);
	}
One should add also add icons like internetexplorer10.png and internetexplorer11.png.

User avatar

Tomato Hentai
Users
Users
Posts: 1
Joined: 09 Apr 2018, 19:45
    Linux Firefox

Re: Browser & OS in Viewtopic

Post by Tomato Hentai »

Is there a way to get it to show any other OS, like Debian or something? I'm posting from Debian 8 but it just shows up as Linux.

User avatar

martin
Admin
Admin
Posts: 5106
Joined: 06 Apr 2014, 16:12
    Ubuntu Chrome

Re: Browser & OS in Viewtopic

Post by martin »

Why not just keep it simple windows/versions as is and linux as linux the code work involved to add all windows and distro's and browsers as they change would be huge.

If you look into details of a browser there really is only 3 of them IE/FF/CHROME

All the other browsers out there are all based of them 3.

here is the spec for me using linux mint 18.3 and chrome
Selection_075.png
mozilla is ff but im in chrome.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

Post Reply Previous topicNext topic