[1.1.1] mChat Archive Search

Adds a convenient search box at the top of mChat's archive page that allows you to search all messages
Post Reply
User avatar
kasimi
mChat developer
Posts: 738
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

[1.1.1] mChat Archive Search

#1

Post by kasimi » 22 Aug 2018, 10:21

mChat add-on
Archive Search


Requested by BanterFace in the support section, this extension adds a convenient search box at the top of mChat's archive page that allows you to search all messages. To be able to use this feature, a user needs the Can search board permission (in the Misc permissions tab; the internal permission name is u_search).

Important notes
  • The search functionality is very limited. What this extension basically does is a WHERE message LIKE %keyword% query. This means that, for example, when searching for quote, messages that contain a [quote][/quote] BBCode will be listed in the results.
  • By default, the collation of mChat's message column in the phpbb_mchat table is utf8_bin and is therefore case sensitive, which affects this extension's search feature. If you prefer the search to be case insensitive, change the collation to utf8_unicode_ci. You can do this in your preferred database management tool such as phpMyAdmin, either manually or by running this query:

    Code: Select all

    - This code is only accessible to donors -
    As always, before altering the database, make a backup!
    You can change it back to utf8_bin by running this query:

    Code: Select all

    - This code is only accessible to donors -
For a demo, register an account on this board if you haven't already, and take a look at the mChat archive. :+1:

Requirements
  • PHP at least 5.6.0
  • phpBB at least 3.2.0
  • mChat at least 2.0.0
  • MySQL database (please read here if you're using a different database)

Download

This extension is only available to Donors. How to get access.

phpbb-ext-mchat-archivesearch-1.1.1.zip

How to install, update and uninstall extensions: https://www.phpbb.com/extensions/installing/
Install path: ext/kasimi/mchatarchivesearch/

Changelog
  • 1.1.1 - 2018-09-04
    • Added two date buttons: search on specific day, jump to specific day
    • Require MySQL database
    • Updated PHP requirement from 5.4.7 to 5.6.0
    • Added version check
  • 1.0.0 - 2018-08-22
    • First release
Old versions:
You do not have the required permissions to view the files attached to this post.

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

Re: [1.0.0] mChat Archive Search

#2

Post by terry2 » 23 Aug 2018, 10:17

Works well nice.

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

Re: [1.0.0] mChat Archive Search

#3

Post by kasimi » 01 Sep 2018, 09:17

The upcoming release will be working with MySQL databases only. If you're using a different database, help me convert this statement to the syntax of your engine.

The query takes a UTC Unix timestamp (in the example below it's 08/31/2018 @ 10:21pm (UTC)), applies a timezone conversion (either ±seconds or ±hh:mm) and formats it as a date. Example output: 2018-10-1

Code: Select all

- This code is only accessible to donors -

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

Re: [1.1.1] mChat Archive Search

#4

Post by kasimi » 04 Sep 2018, 10:23

Version 1.1.1 is now available in the first post. :+1: Go to the archive to test it.

It adds two date pickers: one is right next to the search field and it allows you to filter search results by day, and another one on the right side next to the pagination which allows you to jump to messages of a certain day in the archive. Note that for second one to work, you need at least mChat 2.1.1 (not yet in the CDB), or you can manually add this PHP event to your mChat.

User avatar
lopoto
Donor
Posts: 24
Joined: 03 Jun 2017, 19:20

Re: [1.1.1] mChat Archive Search

#5

Post by lopoto » 04 Sep 2018, 13:28

kasimi wrote:
04 Sep 2018, 10:23
Note that for second one to work, you need at least mChat 2.1.1 (not yet in the CDB),
link ? :geek:

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

Re: [1.1.1] mChat Archive Search

#6

Post by kasimi » 04 Sep 2018, 13:59

As usual, see my GitHub.

User avatar
lopoto
Donor
Posts: 24
Joined: 03 Jun 2017, 19:20

Re: [1.1.1] mChat Archive Search

#7

Post by lopoto » 04 Sep 2018, 16:16

ok thx for inf.

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

Re: [1.1.1] mChat Archive Search

#8

Post by terry2 » 05 Sep 2018, 15:05

Working well.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest