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

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Browser & OS in Viewtopic

Post by martin »

Phpbb assumes every one is using prosilver so for those who use another style may (in most cases) have a problem with the ext working on there theme in use so set them to all and it will show on just about every theme including subsilver.

i set my mchat styles folder to all and when testing on themes mchat will show on every theme if i set it to prosilver then it only works on prosilver.
Image

User avatar

Null
Users
Users
Posts: 125
Joined: 09 Oct 2015, 06:03
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by Null »

This extension has a "feature" which I dont like: If a moderator edits a post, it will save moderator browser and OS informations, instead to keep original information.

So, I changed file ext/dmzx/browsericon/event/listener.php to update that only in a new post or in a reply. In the file bottom, I changed that:

Code: Select all

public function submit_post_modify_sql_data($event)
{
	$post = $this->request->get_super_global(\phpbb\request\request::SERVER);
	$sql_data = $event['sql_data'];
	if (($event['post_mode'] == 'post') || ($event['post_mode'] == 'reply')) {
		$sql_data[POSTS_TABLE]['sql']['user_agent'] = $post['HTTP_USER_AGENT'];
	}
	$event['sql_data'] = $sql_data;
}
It solved my problem but the best option should be comparing original poster with editing poster. But I dont have skill to do that...
Last edited by Null on 24 Oct 2015, 01:06, edited 3 times in total.

User avatar

Null
Users
Users
Posts: 125
Joined: 09 Oct 2015, 06:03
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by Null »

I got an "unknown SO" with this in user_agent: Mozilla/5.0 (Android 5.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

Im not sure but I solved in this way:

I changed ext/dmzx/browsericon/includes/user_agent.php to include Android:

Code: Select all

	$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android');
And added this Android image to ext/dmzx/browsericon/images/user_agent/os: Download android.png from Sendspace.com - send big files the easy way

Now, its working fine but I need somebody confirm that.

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Browser & OS in Viewtopic

Post by dmzx »

Null wrote:I got an "unknown SO" with this in user_agent: Mozilla/5.0 (Android 5.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

Im not sure but I solved in this way:

I changed ext/dmzx/browsericon/includes/user_agent.php to include Android:

Code: Select all

	$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android');
And added this Android image to ext/dmzx/browsericon/images/user_agent/os: Download android.png from Sendspace.com - send big files the easy way

Now, its working fine but I need somebody confirm that.

Yes this is ok to do it like this.

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Browser & OS in Viewtopic

Post by martin »

Stole these and resized them
windows81.png
windows10.png
108.png
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Last edited by martin on 27 Oct 2015, 13:41, edited 1 time in total.

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by dmzx »

martin wrote:Stole these and resized them
windows81.png
windows10.png
108.png

Good steal :thumbup:

User avatar

Null
Users
Users
Posts: 125
Joined: 09 Oct 2015, 06:03
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by Null »

How to adjust to recognize Internet Explorer 11? Its recognized as Mozilla 5

user_agent:

Code: Select all

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

User avatar

Peralta
Donator
Donator
Posts: 190
Joined: 13 Dec 2014, 17:04
    Windows 7 Firefox

Re: Browser & OS in Viewtopic

Post by Peralta »

Null wrote:How to adjust to recognize Internet Explorer 11? Its recognized as Mozilla 5

user_agent:

Code: Select all

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

user_agent.php
Find This may be a partial find and not the whole line

Code: Select all

	// Detect IE version
	if ($browser == 'MSIE')
	{
		$browser = 'Internet Explorer';
		if ($browser_version != '')
		{
			$ver = substr($browser_version, 0, 1);
			if ($ver >= 6)
			{
				$browser .= ' '. $ver;
				$browser_version = '';
			}
		}
	}
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

	   if ($browser == 'rv:11.0')
  	 {
		  $browser = 'Internet Explorer';
		  $browser_version = '11.0';
  	 }
I speak spanish. Sorry for my bad english.

User avatar

Null
Users
Users
Posts: 125
Joined: 09 Oct 2015, 06:03
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by Null »

Thanks for your reply.

It didnt work but this does:

Code: Select all

	// Internet Explorer 11
	if (strpos($useragent, 'rv:11.0') != 0)
	{
		$browser = 'Internet Explorer';
		$browser_version = '11.0';
   }
Last edited by Null on 08 Nov 2015, 02:40, edited 2 times in total.

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

martin wrote: 27 Oct 2015, 13:39 Stole these and resized them
windows81.png
windows10.png
108.png

Upload these images to fix the new OS

User avatar

nelflucifer
Users
Users
Posts: 70
Joined: 03 Jan 2016, 12:24
    Windows 7 Opera

Re: Browser & OS in Viewtopic

Post by nelflucifer »

Thank you! Take! :thumbup:
Image
Learn to read people's thoughts, not forgetting about their.
The extension translate from English to Russian...
English Forums
Available 251 extension with translation into Russian language...

User avatar

nelflucifer
Users
Users
Posts: 70
Joined: 03 Jan 2016, 12:24
    Windows 7 Opera

Re: Browser & OS in Viewtopic

Post by nelflucifer »

dmzx wrote: 30 Jun 2015, 15:49 [*] Download the latest release.
[*] Unzip the downloaded release, and change the name of the folder to `browsericon`.
[*] In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
[*] Copy the `browsericon` folder to `/ext/dmzx/` if done correctly, you'll have the main extension class at (your forum root)/ext/dmzx/browsericon/composer.json
[*] Navigate in the ACP to `Customise -> Manage extensions`
[*] Look for `Browser & OS in Viewtopic` under the Disabled Extensions list, and click its `Enable` link.[/list]
Hello!!
That's the problem, put your 2 simple extensions and they don't work (screen priloga, stressed).
1st. shows me the screen resolution (Screen resolution in viewtopic)
2nd. doesn't show my browser system (Browser & OS in Viewtopic)
Phpbb version 3.16 GB AERO theme
What is the reason? Tested both locally and on the website and different browsers - the result is the same.
zx_MAXwindows.ru_Opera.jpg
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by dmzx »

Look like the browser icons work, the will show when you edit the post or make a new one.
For screen resolution you have to logout and in again.(but that's another topic :wink: )

User avatar

nelflucifer
Users
Users
Posts: 70
Joined: 03 Jan 2016, 12:24
    Windows 7 Opera

Re: Browser & OS in Viewtopic

Post by nelflucifer »

dmzx wrote: 08 Jan 2016, 22:06 Look like the browser icons work, the will show when you edit the post or make a new one.
For screen resolution you have to logout and in again.(but that's another topic :wink: )
Thanks - great app! =) Yes I know that you need to clean the cookies, refresh the Admin cache, and more. Still not working neither here nor there... the Problem was in the program which "hid" my AGENT USR and not only when turned off - everything was working as it should both locally and on the site of P. S. your website is really a good expansion =) you know, since more than half moved out there for phpbb 3.1 =) something exclusive. It is a pity that the new chat is not working =((

User avatar

jotix
Users
Users
Posts: 1
Joined: 03 Feb 2016, 08:54
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by jotix »

Great app! Thanks!

You can add the flag of the country? :whistl:

In function, the member IP

Post Reply Previous topicNext topic