[1.1.0] mChat Edit Details

Displays a popup with details about edited messages
User avatar
kasimi
mChat developer
Posts: 642
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

[1.1.0] mChat Edit Details

#1

Post by kasimi » 11 Nov 2016, 17:20

Image This mChat add-on extension adds an icon to edited messages. When clicking on the icon a popup more details is displayed. If a message was edited multiple times, information of the latest edit is displayed.

Note that to get this extension working it is necessary to manually add a new template event to mChat. See the requirements section below.

To see this extension in action have a look at mChat's archive pages here on this board. It shouldn't take you long to find an edited message. :)


Screenshots
  • Before editing a message:

    Image
  • After editing a message:

    Image
  • When clicking on the edit icon a popup is displayed:

    Image
  • Users with u_mchat_ip permission can also see the IP address of the user who edited the message:

    Image
Requirements
  • PHP at least 5.4.7
  • phpBB at least 3.2.0
  • mChat at least 2.1.0
  • If you use mChat 2.0.3 or earlier, you need to use version 1.0.2 of this extension.
  • If you use mChat 2.0.0 or older, the following edit is required so that the icon can be displayed:
    • Open ext/dmzx/mchat/styles/prosilver/template/mchat_messages.html (view on GitHub)
    • Find {mchatrow.MCHAT_TIME}</span></div>
    • Replace with {mchatrow.MCHAT_TIME}</span><!-- EVENT dmzx_mchat_messages_header_after --></div>
Download

This extension is only available to Donors. How to get access.
phpbb-ext-mchat-editdetails-1.1.0.zip
How to install, update and uninstall extensions: https://www.phpbb.com/extensions/installing/
Install path: ext/kasimi/mchateditdetails/

Changelog
  • v1.1.0 - 2018-07-30
    • Dropped support for phpBB 3.1 and mChat 2.0.x. You need at least phpBB 3.2.0 and at least mChat 2.1.0.
    • Only include script data if mChat is rendered
    • Use Twig template syntax
  • v1.0.2 - 2017-04-07
    • Fixed bug in JavaScript that in some cases prevents code from other extensions from running.
  • v1.0.1 - 2016-11-12
    • Fixed compatibility with Relative Dates extension
  • v1.0.0 - 2016-11-11
    • First release
Old versions:
You do not have the required permissions to view the files attached to this post.

terry2
Donor
Posts: 127
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: mChat Edit Details

#2

Post by terry2 » 11 Nov 2016, 19:48

Great addon thankyou.

User avatar
kasimi
mChat developer
Posts: 642
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: mChat Edit Details

#3

Post by kasimi » 11 Nov 2016, 20:25

Thanks, let's hope it will show in the download numbers. :)

Please keep an eye on your board's performance, especially if it's a large one. The extension adds quite a complex SQL query. It performed ok in my local tests but it could make a noticeable difference if you have lots of messages (100k or more), I'm not sure. I might have to look into adding some indices to the phpbb_mchat_log table.

terry2
Donor
Posts: 127
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: mChat Edit Details

#4

Post by terry2 » 12 Nov 2016, 10:40

Mchat prunes every 2 days but will turn prune off to see how it runs our chat is always busy with bs being posted lol.

Tarantino
Distinguished Donor
Posts: 69
Joined: 21 Oct 2016, 12:59

Re: mChat Edit Details

#5

Post by Tarantino » 12 Nov 2016, 15:55

On my forum I had a little bug.

I needed to edit the file: dmzx_mchat_messages_header_after.html

Code: Select all

- This code is only accessible to donors -
to this:

Code: Select all

- This code is only accessible to donors -
Or else: Image

Maybe its related with "Relative Dates Extension"
EDIT: Yup, I confirm. Problem occur because of that extension. I'll disable it since I don't like it. xD

User avatar
kasimi
mChat developer
Posts: 642
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: mChat Edit Details

#6

Post by kasimi » 12 Nov 2016, 16:26

Thanks for reporting. I posted version 1.0.1 that fixes this issue, just in case you feel like using the Relative Dates extension in the future again. :)

dsaf
Posts: 6
Joined: 20 Oct 2016, 21:47

Re: mChat Edit Details

#7

Post by dsaf » 21 Nov 2016, 15:55

Will you enable a feature to display the old edited message and the new one in the popup? Would be very handy to see what they edited?

User avatar
kasimi
mChat developer
Posts: 642
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: mChat Edit Details

#8

Post by kasimi » 21 Nov 2016, 20:34

Well, the edit times are stored by mChat itself, this extension only offers a way to display them. It doesn't record anything in the database itself. The previous texts would need to be stored in addition which could be done but at the moment I don't think it's worth the effort. If implemented, letting users know that their previous texts are stored as well would be a decent thing I think. All in all it's not as easy as just sending some data to the template.

terry2
Donor
Posts: 127
Joined: 22 Oct 2016, 18:22
Location: My castle

Re: mChat Edit Details

#9

Post by terry2 » 22 Nov 2016, 09:58

I think Dmzx had an ext that showed the message of edited posts and deleted messages too.

User avatar
kasimi
mChat developer
Posts: 642
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: mChat Edit Details

#10

Post by kasimi » 22 Nov 2016, 11:52

Sounds like what dsaf is looking for. Feel free to give him directions so that he can check it out. :+1:

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests