[ABD] Browser & OS in Viewtopic

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Miri4ever
Registered User
Posts: 482
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by Miri4ever »

My Opera Browser is displayed as Chrome ?? Is this correct ?
Homepage: Terra Oceanica

Extension Developments:
PHPBB Special SFX Codes / PHPBB Games: Solitaire, 2048, Breakout, Hextris, LINX
PHPBB MChat Game: Dice Poker, Black Jack, Higher or Lower.
User avatar
dmzx
Registered User
Posts: 834
Joined: Fri Sep 05, 2014 6:48 am
Location: The Netherlands
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by dmzx »

Miri4ever wrote:My Opera Browser is displayed as Chrome ?? Is this correct ?
Send you a PM
Contact me on dmzx-web.net
Buy me a beer Donate and try binance.com
Miri4ever
Registered User
Posts: 482
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by Miri4ever »

Somehow missed the update for windows 10 :)

I looked inside your code and mine and both having Opera Developer inside the lines for listed browsers, but still getting Chrome Browser displayed.
Homepage: Terra Oceanica

Extension Developments:
PHPBB Special SFX Codes / PHPBB Games: Solitaire, 2048, Breakout, Hextris, LINX
PHPBB MChat Game: Dice Poker, Black Jack, Higher or Lower.
User avatar
null2
Registered User
Posts: 510
Joined: Wed Jan 20, 2010 11:03 am

Re: [DEV] Browser & OS in Viewtopic

Post by null2 »

If moderator change a message, extension will update to browser and OS moderator infornation. Shouldnt keep original poster information?
Sorry for my bad english. I'm from USA.
User avatar
cYbercOsmOnauT
Registered User
Posts: 362
Joined: Wed Jun 16, 2004 8:22 am
Location: Goettingen, Germany
Name: Tekin Birdüzen

Re: [DEV] Browser & OS in Viewtopic

Post by cYbercOsmOnauT »

This extension does not write anything into the POSTS_TABLE but just parses the user_agent field of a postrow. phpBB does not differ between a moderator change or an edit of the user himself. When the message gets edited the user_agent is updated along with the rest of the post data.

@dmzx, this kind of stuff

Code: Select all

if (substr($version, 0, 3) == 6.0) 
is not really well. You should not mix types in an if and always write it so that it would also work with ===. You are comparing a string with a float number.
phpBB-installation and reparation. Prof. PHP coding with function guarantee. Just contact me at: t.birduezen@web-coding.eu.
Ex-German Support Team Member | phpBB Development Environment
User avatar
null2
Registered User
Posts: 510
Joined: Wed Jan 20, 2010 11:03 am

Re: [DEV] Browser & OS in Viewtopic

Post by null2 »

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...
Sorry for my bad english. I'm from USA.
sakkiotto
Registered User
Posts: 231
Joined: Mon Jun 13, 2005 9:45 pm

Re: [DEV] Browser & OS in Viewtopic

Post by sakkiotto »

for tapatalk users??? 8-)
Difadon
Registered User
Posts: 55
Joined: Wed Nov 06, 2013 3:36 pm
Location: Špindlerův Mlýn
Name: Jan Nejedlý
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by Difadon »

Hello,

I added support for Android, iPhone and Windows Phone (iPhone + Windows Phone -> I can´t testing).

Perhaps someone can handle distribution for the version.

1. Open file */includes/user_agent.php

2. Find:

Code: Select all

$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac');
Replace with:

Code: Select all

$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android', 'iPhone', 'Windows Phone');
3. Find:

Code: Select all

if (substr($version, 0, 3) == 10.0)
				$system = 'Windows 10';
		}
	}
Add after:

Code: Select all

	elseif ($system == 'Android')
	{
		$system = 'Android';
	}
	elseif ($system == 'iPhone')
	{
		$system = 'iPhone';
	}
	elseif ($system == 'Windows Phone')
	{
		$system = 'Windows_Phone';
	}
Upload this pack to */images/user_agent/os/
https://webshare.cz/file/1Me3Bd6kp5/icons-zip
User avatar
sysz
Registered User
Posts: 278
Joined: Mon Jan 30, 2012 11:36 pm
Location: Sweden, Helsingborg
Name: Kimmy Lindell Ekström
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by sysz »

Edit: Never mind.
Currently working on the community
Mcclures
Registered User
Posts: 33
Joined: Sun Apr 10, 2016 6:04 am

Re: [DEV] Browser & OS in Viewtopic

Post by Mcclures »

Any way we can add on those OS with the ? mark? I want to add chromebook and arch linux.
MaFeSa
Registered User
Posts: 175
Joined: Wed Feb 11, 2009 7:48 am

Re: [DEV] Browser & OS in Viewtopic

Post by MaFeSa »

Thanks for this extension ;)
User avatar
Leinad4Mind
Translator
Posts: 857
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by Leinad4Mind »

Difadon wrote:Hello,

I added support for Android, iPhone and Windows Phone (iPhone + Windows Phone -> I can´t testing).

Perhaps someone can handle distribution for the version.

1. Open file */includes/user_agent.php

2. Find:

Code: Select all

$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac');
Replace with:

Code: Select all

$systems = array('Amiga', 'BeOS', 'FreeBSD', 'HP-UX', 'Linux', 'NetBSD', 'OS/2', 'SunOS', 'Symbian', 'Unix', 'Windows', 'Sun', 'Macintosh', 'Mac', 'Android', 'iPhone', 'Windows Phone');
3. Find:

Code: Select all

if (substr($version, 0, 3) == 10.0)
				$system = 'Windows 10';
		}
	}
Add after:

Code: Select all

	elseif ($system == 'Android')
	{
		$system = 'Android';
	}
	elseif ($system == 'iPhone')
	{
		$system = 'iPhone';
	}
	elseif ($system == 'Windows Phone')
	{
		$system = 'Windows_Phone';
	}
Upload this pack to */images/user_agent/os/
https://webshare.cz/file/1Me3Bd6kp5/icons-zip
One year later... LOL
I've submit on Github today.
Cheers
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 27084
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [DEV] Browser & OS in Viewtopic

Post by Paul »

This topic has been marked as [ABD] - Abandoned as the extension author has not been active recently. If the extension author wishes to continue development, please PM anyone on the Extensions Team to request this topic be unlocked.

Notice!
We do not recommend that a user of the phpBB software install this extension, or any other extension that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Extensions Team
Locked

Return to “Abandoned Extensions”