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

ZippeL
Users
Users
Posts: 20
Joined: 20 Aug 2016, 06:37
    Windows 10 Firefox

Re: Browser & OS in Viewtopic

Post by ZippeL »

dmzx wrote: 20 Aug 2016, 22:10 :thumbup:

[ Post made via Samsung Galaxy S4 ] Image
Can you add Steam OS & Browser in ext?

User avatar

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

Re: Browser & OS in Viewtopic

Post by Tarantino »

Was this based on this one: http://web.archive.org/web/201506021724 ... -t933.html
Can the next version add the screen size too?
And the choice of appear like this:
Image

PS: If I migrate from a 3.0 with the breizh mod what will happen to information of that mod? Will it be continued to this extension?

Thanks :tumbsyes:

User avatar

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

Re: Browser & OS in Viewtopic

Post by rogerio24 »

I have installed this in the phpbb 3.2 but does not show me the images related to OS and type browser?
How do I fix this?
Thanks

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: 18 Jan 2017, 00:33 I have installed this in the phpbb 3.2 but does not show me the images related to OS and type browser?
How do I fix this?
Thanks
I figured out where is the error

For example in this link to get this thread I can not see the browser and OS images

http://www.tdtlatinoamerica.com.ar/foro ... 1-s50.html (I have this sintaxis thanks to SEO Url extension https://www.phpbb.com/community/viewtop ... &t=2288486)

Now with another link to go to same place I'm not getting any issue:

http://www.tdtlatinoamerica.com.ar/foro ... 182#p39182 (Traditional link)

User avatar

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

Re: Browser & OS in Viewtopic

Post by Tarantino »

If I migrate from a 3.0 with the breizh mod to 3.1 what will happen to information of that mod? Is it possible to port to this extension? How?

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: 18 Jan 2017, 00:48
rogerio24 wrote: 18 Jan 2017, 00:33 I have installed this in the phpbb 3.2 but does not show me the images related to OS and type browser?
How do I fix this?
Thanks
I figured out where is the error

For example in this link to get this thread I can not see the browser and OS images

http://www.tdtlatinoamerica.com.ar/foro ... 1-s50.html (I have this sintaxis thanks to SEO Url extension https://www.phpbb.com/community/viewtop ... &t=2288486)

Now with another link to go to same place I'm not getting any issue:

http://www.tdtlatinoamerica.com.ar/foro ... 182#p39182 (Traditional link)
@dmzx: What do you think about this issue?

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

Why use seo crap ? there is an ext on this site that will do the same as the seo ext you use but with out any problems.

see here all posts before you installed the ext will have an unknown image all posts after you installed the et with have the right images
http://www.tdtlatinoamerica.com.ar/foro ... 262#p39262
Image

User avatar

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

Re: Browser & OS in Viewtopic

Post by rogerio24 »

martin wrote: 19 Jan 2017, 03:16 why use seo crap ? there is an ext on this site that will do the same as the seo ext you use but with out any problems.

see here all posts before you installed the ext will have an unknown image all posts after you installed the et with have the right images
http://www.tdtlatinoamerica.com.ar/foro ... 262#p39262
Hi Martin
Could you be polite and use other words please?
You do not understand what I mean. I will make a video to understand
Meantime could you provide me the link related to SEO ext that you mention before?
Thanks


User avatar

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

Re: Browser & OS in Viewtopic

Post by Tarantino »

Hi rogerio,

try this, it should work. I guess it's a bad coding.

Open this file: ext/dmzx/browsericon/event/listener.php

FIND:

Code: Select all

include_once $this->root_path . 'ext/dmzx/browsericon/includes/user_agent.' . $this->php_ext;
REPLACE WITH:

Code: Select all

include_once generate_board_url() . '/ext/dmzx/browsericon/includes/user_agent.' . $this->php_ext;
Then tell me if it worked :thumbup:

If it doesn't work you need to do some edits on user_agent.php on this function:

Code: Select all

function ua_get_filename($name, $folder)
{
	if (substr($name, 0, 11) == 'unknown')
		return '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 'ext/dmzx/browsericon/images/user_agent/'.$folder.'/'.$name.'.png';
}
maybe put return './ext instead of return 'ext

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

This ext was done at the first 3.1 release 30 Jun 2015 and as is still works on 3.1 and 3.2 yes it does need an update but at the moment it installs and works fine.

Note phpbb has changed a few times since 30 Jun 2015

User avatar

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

Re: Browser & OS in Viewtopic

Post by rogerio24 »

Tarantino wrote: 22 Jan 2017, 17:09 Hi rogerio,

try this, it should work. I guess it's a bad coding.

Open this file: ext/dmzx/browsericon/event/listener.php

FIND:

Code: Select all

include_once $this->root_path . 'ext/dmzx/browsericon/includes/user_agent.' . $this->php_ext;
REPLACE WITH:

Code: Select all

include_once generate_board_url() . '/ext/dmzx/browsericon/includes/user_agent.' . $this->php_ext;
Then tell me if it worked :thumbup:

If it doesn't work you need to do some edits on user_agent.php on this function:

Code: Select all

function ua_get_filename($name, $folder)
{
	if (substr($name, 0, 11) == 'unknown')
		return '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 'ext/dmzx/browsericon/images/user_agent/'.$folder.'/'.$name.'.png';
}
maybe put return './ext instead of return 'ext
The first option did not work
Let me try with the second option
Thanks

User avatar

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

Re: Browser & OS in Viewtopic

Post by rogerio24 »

It did not work either

[phpBB Debug] PHP Warning: in file [ROOT]/ext/dmzx/browsericon/event/listener.php on line 74: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0
[phpBB Debug] PHP Warning: in file [ROOT]/ext/dmzx/browsericon/event/listener.php on line 74: include_once(http://www.tdtlatinoamerica.com.ar/foro ... _agent.php): failed to open stream: no suitable wrapper could be found
[phpBB Debug] PHP Warning: in file [ROOT]/ext/dmzx/browsericon/event/listener.php on line 74: include_once(): Failed opening 'http://www.tdtlatinoamerica.com.ar/foro ... _agent.php' for inclusion (include_path='.:/opt/php-7.0/pear')

Fatal error: Uncaught Error: Call to undefined function dmzx\browsericon\event\get_useragent_icons() in /home/u419299182/public_html/forotdt/ext/dmzx/browsericon/event/listener.php:78 Stack trace: #0 [internal function]: dmzx\browsericon\event\listener->viewtopic_modify_post_row(Object(phpbb\event\data), 'core.viewtopic_...', Object(phpbb\event\dispatcher)) #1 /home/u419299182/public_html/forotdt/vendor/symfony/event-dispatcher/EventDispatcher.php(184): call_user_func(Array, Object(phpbb\event\data), 'core.viewtopic_...', Object(phpbb\event\dispatcher)) #2 /home/u419299182/public_html/forotdt/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'core.viewtopic_...', Object(phpbb\event\data)) #3 /home/u419299182/public_html/forotdt/phpbb/event/dispatcher.php(60): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('core.viewtopic_...', Object(phpbb\event\data)) #4 /home/u419299182/public_html/forotdt/phpbb/event/dispatcher.php(46): phpbb\event in /home/u419299182/public_html/forotdt/ext/dmzx/browsericon/event/listener.php on line 78

User avatar

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

Re: Browser & OS in Viewtopic

Post by Tarantino »

Clean the cache and put back the original code on the 1st one and do only the 2nd change.

If it doesnt work either this should:

Code: Select all

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';
}
if not... this WILL LOOL:

Code: Select all

function ua_get_filename($name, $folder)
{
	if (substr($name, 0, 11) == 'unknown')
		return 'http://www.tdtlatinoamerica.com.ar/forotdt/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 'http://www.tdtlatinoamerica.com.ar/forotdt/ext/dmzx/browsericon/images/user_agent/'.$folder.'/'.$name.'.png';
}

User avatar

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

Re: Browser & OS in Viewtopic

Post by rogerio24 »

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';
}

Post Reply Previous topicNext topic