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>
Post Reply Previous topicNext topic
User avatar

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

Browser & OS in Viewtopic

Post by dmzx »

Extension Name: Browser & OS in Viewtopic
Author: dmzx special thanks to martin

Extension Description:
This extension shows browser icon and OS icon in viewtopic.
Works with new made posts and older posts will be indicated like this Image untill you edit the post.




- Changed code to core/functions.
- Changed browser/os functions.
- Code update.
- Code cleanup.


- Update service.yml
- Code update.


Added Windows 10 and Spartan browser

Screenshots:
Image

Image

Older posts are indicated like this:
Image

Extension Download:
Download-link
Browser-OS in Viewtopic v1.0.3
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `browsericon`.
  3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
  4. 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
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Browser & OS in Viewtopic` under the Disabled Extensions list, and click its `Enable` link.

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

If by any chance you was clever enough to hard code this old 3.0.X mod into 3.1.X then delete the edits you did (pm me for the modx file if needed) leave the sql in the database :wink: upload the ext install it then go to old posts and all your browser and OS icons are still there.

If by any chance you did have a few posts that had no icons then your see the unkown icons just make an edit to give them posts some.
Image

User avatar

dsaf
Users
Users
Posts: 33
Joined: 17 Jan 2015, 17:51
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by dsaf »

Error on mine and enabling in ACP:

Code: Select all

Return to the index page
General Error
SQL ERROR [ mysql4 ]

Duplicate column name 'user_agent' [1060]

SQL

ALTER TABLE `egcn_posts` ADD COLUMN `user_agent` varchar(255) NULL

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 1428
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 1809
CALL: phpbb\db\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools.php
LINE: 802
CALL: phpbb\db\tools->sql_column_add()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 550
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 496
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 305
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 202
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 185
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 80
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 187
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 179
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
Please notify the board administrator or webmaster: dsafdonotreply@dsaf.co.uk
Powered by phpBB® Forum Software © phpBB Limited

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

WHat are you enabling in acp ?

User avatar

dsaf
Users
Users
Posts: 33
Joined: 17 Jan 2015, 17:51
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by dsaf »

The ext.

Added it to the ftp, click enable, takes me to the next screen to enable again.. and then crashes.

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 »

dsaf wrote:The ext.

Added it to the ftp, click enable, takes me to the next screen to enable again.. and then crashes.
Looks like you already have the 'user_agent' column in your database.

Check this in table posts.

dmzx

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

Duplicate column name 'user_agent'

did you have any form of icons installed befor ?(hard coded) or old database but updated ?

Are you trying to get me to login as you and peek ? :rolling:

EDit posted at same time.

User avatar

dsaf
Users
Users
Posts: 33
Joined: 17 Jan 2015, 17:51
    Windows 7 Chrome

Re: Browser & OS in Viewtopic

Post by dsaf »

I dont think i've tried to install this at all since upgrading to 3.1.* It was all fresh...

You can if you want.. :eyes2: :rolling:

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

Small fix

Open ext/dmzx/browsericon/includes/user_agent.php

line 170
Find This may be a partial find and not the whole line

Code: Select all

return '<span class="user-agent" onclick="alert(\'' . utf8_htmlspecialchars($description) . '\')">' . $result . '</span>';
Replace with Replace the preceding lines with the following

Code: Select all

return '<li class="user-agent" onclick="alert(\'' . utf8_htmlspecialchars($description) . '\')">' . $result . '</li>';
Now it will be valid

if you want a pop up with even more info in it then replace it with this

Code: Select all

return '<li class="user-agent" onmouseover="alert(\'' . utf8_htmlspecialchars($description) . '\')">' . $result . '</li>';
Note if you get fed up with a pop up just tick the check mark in the pop up and it will revert back to the original way of working.

User avatar

rammstein
Users
Users
Posts: 78
Joined: 13 Mar 2015, 19:08
    Windows 7 Firefox

Re: Browser & OS in Viewtopic

Post by rammstein »

Hello
how do to enabled in the profile I have both? ? but how I can change and also for member
thank you


hello
comment on fais pour activé dans le profil j'ai les deux ? ? mais comment je peut change et pour les membre aussi
merci

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 »

rammstein wrote:hello
how do to enabled in the profile I have both? ? but how I can change and also for member
thank you


hello
comment on fais pour activé dans le profil j'ai les deux ? ? mais comment je peut change et pour les membre aussi
merci

Dont know what you mean, you can enable only the extension in ACP.

User avatar

rammstein
Users
Users
Posts: 78
Joined: 13 Mar 2015, 19:08
    Windows 7 Firefox

Re: Browser & OS in Viewtopic

Post by rammstein »

Ok j'ai trouvé il faut juste faire un nouveau poste sa marche

merci

ok I found it just make a new post his walk

thank you

User avatar

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

Re: Browser & OS in Viewtopic

Post by martin »

Enable the ext after installing then make a post it only shows in topics so you wont see it in the profile page the only place it shows is in the mini profile in view topic.

User avatar

dzyasseron
Users
Users
Posts: 4
Joined: 07 Dec 2014, 17:06
    Ubuntu Firefox

Re: Browser & OS in Viewtopic

Post by dzyasseron »

Oh great
thank you

User avatar

cristian
Users
Users
Posts: 31
Joined: 12 Jun 2015, 21:16
    Windows XP Firefox

Re: Browser & OS in Viewtopic

Post by cristian »

Thankyou :beers: :beers: nice mod

Post Reply Previous topicNext topic